/* ===== Responsive Design ===== */

/* Large Desktops */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Desktops */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .section-title {
        font-size: 2.3rem;
    }
    
    .hero-stats {
        gap: 25px;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .service-card, .team-member {
        padding: 30px 20px;
    }
}

/* Tablets (Portrait) */
@media (max-width: 991.98px) {
    /* Navigation */
    .navbar-collapse {
        background: white;
        padding: 20px;
        border-radius: 10px;
        margin-top: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .navbar-nav {
        padding: 10px 0;
    }
    
    .navbar-nav .nav-link {
        padding: 12px 15px !important;
        margin: 5px 0;
    }
    
    .phone-numbers {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        padding-top: 20px;
        margin-top: 20px;
    }
    
    .phone-link {
        justify-content: center;
        padding: 10px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
        text-align: center;
    }
    
    .hero-description {
        font-size: 1.1rem;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-content {
        padding: 80px 0;
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-image {
        margin-top: 40px;
    }
    
    /* Other Sections */
    .about-image {
        padding-right: 0;
        margin-bottom: 40px;
    }
    
    .contact-form-wrapper {
        margin-top: 40px;
    }
    
    .footer-logo,
    .footer-links,
    .contact-mini {
        margin-bottom: 30px;
    }
    
    /* Grid adjustments */
    .row {
        margin-left: -15px;
        margin-right: -15px;
    }
    
    [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Mobile Landscape */
@media (max-width: 767.98px) {
    /* Global */
    .section-padding {
        padding: 60px 0 !important;
    }
    
    .section-title {
        font-size: 2rem;
        line-height: 1.3;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    /* Hero Section */
    .hero-section {
        min-height: auto;
        padding: 70px 0 40px;
    }
    
    .hero-content {
        padding: 40px 0;
    }
    
    .hero-stats {
        gap: 30px;
        margin: 30px 0;
    }
    
    .stat-item {
        flex: 0 0 30%;
        text-align: center;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        margin-bottom: 10px;
    }
    
    /* About Section */
    .about-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .about-actions .btn {
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }
    
    /* Cards */
    .service-card,
    .team-member,
    .contact-card {
        padding: 25px 20px;
        margin-bottom: 20px;
    }
    
    /* Contact Section */
    .contact-form-wrapper {
        padding: 25px 20px;
    }
    
    .emergency-contact {
        padding: 20px;
        text-align: center;
    }
    
    /* Footer */
    .footer-bottom {
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 20px;
    }
    
    .footer-social .social-icon {
        margin: 0 5px;
    }
    
    /* Grid System Fix */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Mobile Portrait */
@media (max-width: 575.98px) {
    /* Global */
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .stat-item {
        flex: 0 0 100%;
        max-width: 200px;
    }
    
    .stat-item h3 {
        font-size: 2.2rem;
    }
    
    /* Services */
    .service-card {
        padding: 25px 15px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    /* Team */
    .team-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .team-member {
        padding: 25px 15px;
    }
    
    /* Projects */
    .project-image {
        height: 200px;
    }
    
    /* Floating Elements */
    .floating-element {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* Experience Badge */
    .experience-badge {
        padding: 15px;
        right: 15px;
        bottom: -15px;
    }
    
    .years {
        font-size: 1.8rem;
    }
    
    /* Brand Logo */
    .brand-logo {
        height: 35px;
        margin-right: 10px;
    }
    
    .brand-main {
        font-size: 1.1rem;
    }
    
    /* Counter */
    .counter-item h3 {
        font-size: 2.2rem;
    }
    
    .counter-icon {
        font-size: 2.2rem;
    }
    
    /* Contact Quick */
    .contact-quick {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .quick-contact {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 15px;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .team-avatar {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .brand-logo {
        height: 30px;
    }
    
    .brand-main {
        font-size: 1rem;
    }
}

/* Height Adjustments for Landscape */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 70px 0 30px;
    }
    
    .hero-content {
        padding: 30px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        margin: 20px 0;
    }
    
    .hero-cta {
        margin-bottom: 20px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-cta,
    .scroll-indicator,
    .social-links,
    .contact-form-wrapper,
    .footer,
    .back-to-top,
    .floating-element,
    .hero-bg-animation,
    #particles-js {
        display: none !important;
    }
    
    body {
        color: #000;
        background: white;
    }
    
    .hero-section,
    .services-section,
    .about-section,
    .projects-section,
    .team-section,
    .contact-section {
        padding: 20px 0 !important;
    }
    
    .hero-section {
        background: white !important;
        color: black;
    }
    
    .hero-title, .section-title {
        color: black;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .services-section,
    .projects-section,
    .contact-section,
    .about-section {
        background: #1a1a1a;
    }
    
    .service-card,
    .team-member,
    .contact-form-wrapper {
        background: #2d2d2d;
        color: #e0e0e0;
        border-color: #444;
    }
    
    .section-title,
    .service-title,
    .feature-text h4 {
        color: #e0e0e0;
    }
    
    .section-description,
    .service-description,
    .about-text,
    .feature-text p {
        color: #aaa;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .form-control::placeholder {
        color: #888;
    }
}

/* Animation Performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High DPI Screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .service-card,
    .team-member {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover,
    .team-member:hover,
    .project-card:hover,
    .contact-card:hover {
        transform: none;
    }
    
    .navbar-nav .nav-link:hover::before {
        width: 0;
    }
    
    .btn:hover {
        transform: none;
    }
}