/* ==========================================
   Responsive Breakpoints:
   - 1920px (Extra large desktops)
   - 1440px (Large desktops)
   - 1024px (Tablets landscape)
   - 768px (Tablets portrait)
   - 480px (Mobile landscape)
   - 360px (Mobile portrait)
   ========================================== */

/* ==========================================
   Extra Large Desktops (1920px and above)
   ========================================== */

@media (min-width: 1920px) {
    .container {
        max-width: 1440px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .section-title {
        font-size: 3.5rem;
    }
}

/* ==========================================
   Large Desktops (1440px)
   ========================================== */

@media (max-width: 1440px) {
    .container {
        max-width: 1140px;
    }
}

/* ==========================================
   Tablets Landscape & Small Desktops (1024px)
   ========================================== */

@media (max-width: 1024px) {
    .container {
        max-width: 960px;
    }

    /* Navigation */
    .nav-list {
        gap: var(--spacing-md);
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    /* About Section */
    .about-grid {
        gap: var(--spacing-xl);
    }

    .about-image-placeholder {
        height: 400px;
    }

    .about-image-placeholder i {
        font-size: 6rem;
    }

    /* Values Grid */
    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Clients Grid */
    .clients-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    /* Contact Grid */
    .contact-grid {
        gap: var(--spacing-xl);
    }
}

/* ==========================================
   Tablets Portrait (768px)
   ========================================== */

@media (max-width: 768px) {
    :root {
        --spacing-3xl: 64px;
        --spacing-2xl: 48px;
    }

    .container {
        padding: 0 var(--spacing-md);
    }

    /* Header */
    .header-content {
        position: relative;
    }

    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--primary-color);
        padding: var(--spacing-2xl) var(--spacing-md);
        transition: left 0.3s ease;
        z-index: 1001;
        box-shadow: var(--shadow-lg);
    }

    .nav.mobile-active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .nav-link {
        font-size: 1.1rem;
    }

    .cta-btn {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1002;
    }

    /* Mobile Menu Overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding: var(--spacing-2xl) 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .trust-indicators {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .trust-item {
        width: 100%;
        justify-content: center;
    }

    /* Section Spacing */
    section {
        padding: var(--spacing-2xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    /* About Section */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .about-content {
        order: 2;
    }

    .about-visual {
        order: 1;
    }

    .about-image-placeholder {
        height: 300px;
    }

    .about-image-placeholder i {
        font-size: 5rem;
    }

    /* Values Grid */
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: 2.5rem;
    }

    /* Clients Grid */
    .clients-grid {
        grid-template-columns: 1fr;
    }

    /* Contact Section */
    .contact-info-centered {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-wrapper {
        order: 1;
    }

    .contact-info {
        order: 2;
        margin-top: var(--spacing-xl);
    }

    .social-links {
        justify-content: center;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* Back to Top & WhatsApp Buttons */
    .back-to-top,
    .whatsapp-float {
        width: 50px;
        height: 50px;
    }

    .whatsapp-float {
        bottom: calc(var(--spacing-md) + 60px);
        right: var(--spacing-md);
    }

    .back-to-top {
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }

    .whatsapp-float i {
        font-size: 1.8rem;
    }
}

/* ==========================================
   Mobile Landscape (480px)
   ========================================== */

@media (max-width: 480px) {
    :root {
        --spacing-xl: 32px;
        --spacing-2xl: 40px;
        --spacing-3xl: 48px;
    }

    /* Typography */
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    /* Header */
    .logo {
        font-size: 1.25rem;
    }

    .logo i {
        font-size: 1.75rem;
    }

    /* Hero Section */
    .hero-content {
        padding: var(--spacing-xl) 0;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .trust-item {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }

    .trust-item i {
        font-size: 1.5rem;
    }

    /* Buttons */
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.95rem;
    }

    /* Service Cards */
    .service-card,
    .value-card,
    .client-card {
        padding: var(--spacing-lg);
    }

    .service-icon,
    .value-icon {
        width: 60px;
        height: 60px;
    }

    .service-icon i,
    .value-icon i {
        font-size: 2rem;
    }

    /* About Section */
    .about-item {
        padding: var(--spacing-md);
    }

    .about-image-placeholder {
        height: 250px;
    }

    .about-image-placeholder i {
        font-size: 4rem;
    }

    /* Stats Section */
    .stat-icon {
        width: 60px;
        height: 60px;
    }

    .stat-icon i {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* Client Cards */
    .client-card i {
        font-size: 2.5rem;
    }

    .client-card h3 {
        font-size: 1.1rem;
    }

    /* Contact Section */
    .contact-form-wrapper {
        padding: var(--spacing-lg);
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }

    .contact-icon i {
        font-size: 1.2rem;
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .map-placeholder {
        padding: var(--spacing-xl);
    }

    .map-placeholder i {
        font-size: 2.5rem;
    }

    /* Footer */
    .footer-logo {
        font-size: 1.3rem;
    }

    .footer-logo i {
        font-size: 1.75rem;
    }

    /* Form Elements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--spacing-sm);
        font-size: 1rem;
    }
}

/* ==========================================
   Mobile Portrait (360px)
   ========================================== */

@media (max-width: 360px) {
    :root {
        --font-size-base: 15px;
        --spacing-lg: 24px;
        --spacing-xl: 28px;
        --spacing-2xl: 36px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Header */
    .header {
        padding: var(--spacing-sm) 0;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo i {
        font-size: 1.5rem;
    }

    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-buttons .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }

    /* Section Titles */
    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Cards */
    .service-card,
    .value-card,
    .client-card,
    .stat-card {
        padding: var(--spacing-md);
    }

    .service-icon,
    .value-icon,
    .stat-icon {
        width: 50px;
        height: 50px;
    }

    .service-icon i,
    .value-icon i,
    .stat-icon i {
        font-size: 1.75rem;
    }

    /* Stats */
    .stat-number {
        font-size: 1.75rem;
    }

    .stat-label {
        font-size: 0.95rem;
    }

    /* Contact Info */
    .contact-info-item {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-xl) 0 var(--spacing-sm);
    }

    .footer-grid {
        gap: var(--spacing-lg);
    }

    /* Back to Top & WhatsApp */
    .back-to-top,
    .whatsapp-float {
        width: 45px;
        height: 45px;
    }

    .whatsapp-float i {
        font-size: 1.5rem;
    }
}

/* ==========================================
   Landscape Orientation Fix
   ========================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--spacing-3xl) 0;
    }

    .hero-content {
        padding: var(--spacing-xl) 0;
    }

    .trust-indicators {
        flex-direction: row;
        gap: var(--spacing-md);
    }
}

/* ==========================================
   Print Styles
   ========================================== */

@media print {
    .header,
    .mobile-menu-toggle,
    .back-to-top,
    .whatsapp-float,
    .contact-form-wrapper {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }

    .hero {
        min-height: auto;
        page-break-after: always;
    }
}

/* ==========================================
   High Resolution Displays
   ========================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for retina displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ==========================================
   Dark Mode Support (Optional)
   ========================================== */

@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here if needed */
}

/* ==========================================
   Accessibility - Reduced Motion
   ========================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-animate {
        opacity: 1;
        transform: none;
    }
}
