/* Responsive Styles */

/* Tablet Landscape and below */
@media (max-width: 1024px) {
    /* Header */
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hero */
    .hero-section {
        height: 80vh;
    }
    
    .hero-controls {
        padding: 0 var(--space-4);
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
    
    /* Projects Grid */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

/* Medium desktop tightening for nav when translations are longer */
@media (min-width: 1025px) and (max-width: 1280px) {
    /* Give nav more room and tighten spacing */
    .header .container {
        padding-left: var(--space-3);
        padding-right: var(--space-4);
    }
    .main-nav {
        margin: 0 var(--space-4);
    }
    .nav-list {
        gap: var(--space-2);
    }
    .nav-list a {
        font-size: 0.82rem;
    }
    .main-nav .brand-spaced {
        letter-spacing: 0.04em;
    }
}

@media (min-width: 1281px) and (max-width: 1440px) {
    /* Slight left shift of header content and moderate tightening */
    .header .container {
        padding-left: var(--space-4);
        padding-right: var(--space-5);
    }
    .main-nav {
        margin: 0 var(--space-5);
    }
    .nav-list {
        gap: var(--space-3);
    }
    .nav-list a {
        font-size: 0.84rem;
    }
    .main-nav .brand-spaced {
        letter-spacing: 0.06em;
    }
}

/* Tablet Portrait and below */
@media (max-width: 768px) {
    /* Container */
    .container {
        padding: 0 var(--space-4);
    }
    
    /* Header */
    .header-content {
        padding: var(--space-3) 0;
        gap: var(--space-3);
    }
    
    .logo-primary {
        font-size: 1.5rem;
        letter-spacing: 0.18em;
    }

    /* Slightly tighter brand spacing on small screens */
    .brand-spaced {
        letter-spacing: 0.18em;
    }
    
    .logo-accent {
        font-size: 1.125rem;
    }
    
    .logo-text {
        gap: var(--space-1);
    }
    
    .logo-accent::before {
        width: 2px;
        height: 2px;
        left: -6px;
    }
    
    /* Navigation */
    .main-nav {
        margin: 0 var(--space-4);
    }
    
    .nav-list {
        gap: var(--space-3);
    }
    
    .nav-list a {
        font-size: 0.85rem;
        letter-spacing: -0.02em;
    }
    
    /* Hero */
    .hero-section {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: var(--text-4xl);
        margin-bottom: var(--space-4);
    }
    
    .hero-subtitle {
        font-size: var(--text-lg);
        margin-bottom: var(--space-6);
    }
    
    .hero-controls {
        display: none;
    }
    
    .hero-indicators {
        bottom: var(--space-6);
    }
    
    /* Trust Indicators */
    .indicators-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
    
    .indicator-item {
        padding: var(--space-4);
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .service-card {
        padding: var(--space-6);
    }
    
    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    /* CTA */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer-column:first-child {
        text-align: center;
    }
    
    .footer-logo {
        margin: 0 auto var(--space-4);
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Sections */
    section {
        padding: var(--space-12) 0;
    }
}

/* Mobile */
@media (max-width: 640px) {
    /* Header & Navigation */
    .header-content {
        gap: var(--space-2);
    }
    
    .main-nav {
        margin: 0 var(--space-2);
    }
    
    .nav-list {
        gap: var(--space-2);
    }
    
    .nav-list a {
        font-size: 0.8rem;
        letter-spacing: -0.03em;
    }

    .brand-spaced {
        letter-spacing: 0.16em;
    }
    
    /* Typography */
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
    
    .section-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-8);
    }
    
    /* Buttons */
    .btn {
        font-size: var(--text-sm);
        padding: var(--space-3) var(--space-5);
        /* Ensure proper touch interaction on mobile */
        min-height: 44px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Cards */
    .service-icon {
        width: 56px;
        height: 56px;
    }

    .service-icon img {
        width: 44px;
        height: 44px;
    }
    
    .service-card h3 {
        font-size: var(--text-xl);
    }
    
    /* Project Cards */
    .project-image {
        height: 200px;
    }
    
    .project-content {
        padding: var(--space-4);
    }
    
    /* Newsletter Form */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 400px) {
    /* Container */
    .container {
        padding: 0 var(--space-3);
    }
    
    /* Trust Indicators */
    .indicators-grid {
        grid-template-columns: 1fr;
    }
    
    /* Language Selector Mobile */
    .mobile-lang-selector {
        flex-wrap: wrap;
        gap: var(--space-2);
    }
    
    .mobile-lang-selector a {
        flex: 1 0 45%;
        text-align: center;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: 100vh;
        min-height: 400px;
    }
    
    .hero-title {
        font-size: var(--text-3xl);
    }
    
    .hero-subtitle {
        font-size: var(--text-base);
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for retina displays */
    .logo-text {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    /* Hide non-essential elements */
    .header,
    .hero-controls,
    .hero-indicators,
    .mobile-menu,
    .cta-section,
    .footer {
        display: none;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .btn {
        border: 1px solid #000;
        padding: 5px 10px;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-slide {
        transition: none;
    }
    
    .mobile-menu {
        transition: none;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}
