/* ==========================================
   Responsive Design Styles
   Mobile-first approach with progressive enhancement
   ========================================== */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
    
    .hero-content {
        gap: var(--spacing-2xl);
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    :root {
        --font-size-3xl: 2.25rem;
        --font-size-2xl: 1.875rem;
    }
    
    .container {
        max-width: 960px;
    }
    
    .hero-content {
        gap: var(--spacing-xl);
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    :root {
        --font-size-3xl: 2rem;
        --font-size-2xl: 1.75rem;
        --spacing-2xl: 3rem;
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: var(--spacing-lg);
        box-shadow: var(--box-shadow-lg);
        transform: translateY(-100vh);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Hero Section */
    .hero {
        padding: calc(80px + var(--spacing-xl)) 0 var(--spacing-xl) 0;
        min-height: 70vh;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-image {
        order: 1;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
    
    /* Contact Section */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .contact-info-centered {
        text-align: left;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
    
    .footer-newsletter {
        grid-column: 1 / -1;
    }
}

/* Small Tablet (576px to 767px) */
@media (max-width: 767px) {
    :root {
        --font-size-3xl: 1.875rem;
        --font-size-2xl: 1.5rem;
        --font-size-xl: 1.25rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 2.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .navbar .container {
        padding: var(--spacing-sm);
    }
    
    .nav-brand h2 {
        font-size: var(--font-size-md);
    }
    
    /* Hero Section */
    .hero {
        padding: calc(70px + var(--spacing-lg)) 0 var(--spacing-lg) 0;
        min-height: 60vh;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-description {
        font-size: var(--font-size-sm);
    }
    
    /* Sections */
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .feature-card {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: var(--font-size-md);
    }
    
    /* Contact Hero */
    .contact-hero {
        padding: calc(70px + var(--spacing-md)) 0 var(--spacing-md) 0;
    }
    
    /* Contact Form */
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .contact-form-container {
        padding: var(--spacing-lg);
    }
    
    /* FAQ */
    .faq-question {
        padding: var(--spacing-md);
    }
    
    .faq-answer {
        padding: 0 var(--spacing-md) var(--spacing-md) var(--spacing-md);
    }
    
    .faq-question h3 {
        font-size: var(--font-size-sm);
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .footer-legal {
        justify-content: center;
    }
    
    .footer-cookies-notice {
        justify-content: center;
        text-align: center;
    }
    
    /* Cookie Consent */
    .cookie-consent-content {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }
    
    .cookie-consent-text {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

/* Mobile (up to 575px) */
@media (max-width: 575px) {
    :root {
        --font-size-3xl: 1.75rem;
        --font-size-2xl: 1.375rem;
        --font-size-xl: 1.125rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.5rem;
        --spacing-2xl: 2rem;
    }
    
    body {
        font-size: var(--font-size-xs);
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Typography */
    h1 { font-size: var(--font-size-2xl); }
    h2 { font-size: var(--font-size-xl); }
    h3 { font-size: var(--font-size-lg); }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: var(--font-size-xs);
    }
    
    .btn-large {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }
    
    /* Navigation */
    .nav-brand h2 {
        font-size: var(--font-size-sm);
    }
    
    .nav-brand i {
        font-size: var(--font-size-md);
    }
    
    /* Hero */
    .hero {
        padding: calc(60px + var(--spacing-md)) 0 var(--spacing-md) 0;
        min-height: 50vh;
    }
    
    .hero-content {
        gap: var(--spacing-lg);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* Contact Hero */
    .contact-hero {
        padding: calc(60px + var(--spacing-sm)) 0 var(--spacing-sm) 0;
    }
    
    .contact-hero-content p {
        font-size: var(--font-size-sm);
    }
    
    /* Contact Methods */
    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .contact-icon {
        align-self: center;
    }
    
    .contact-info-centered .contact-methods {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        margin: var(--spacing-xl) 0;
    }
    
    /* Contact Form */
    .contact-form-container {
        padding: var(--spacing-md);
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    /* Image Content */
    .image-content {
        margin: var(--spacing-lg) 0;
    }
    
    /* Feature Cards */
    .feature-card {
        text-align: center;
        padding: var(--spacing-md) var(--spacing-sm);
    }
    
    .feature-icon {
        margin: 0 auto var(--spacing-sm) auto;
        width: 45px;
        height: 45px;
        font-size: var(--font-size-sm);
    }
    
    /* FAQ */
    .faq-question {
        padding: var(--spacing-sm);
    }
    
    .faq-answer {
        padding: 0 var(--spacing-sm) var(--spacing-sm) var(--spacing-sm);
    }
    
    .faq-question h3 {
        font-size: var(--font-size-xs);
        line-height: 1.4;
    }
    
    /* Footer */
    .footer-content {
        padding: var(--spacing-xl) 0 var(--spacing-md) 0;
    }
    
    .footer-about .footer-logo {
        justify-content: center;
        margin-bottom: var(--spacing-sm);
    }
    
    .footer-about .footer-logo i {
        font-size: var(--font-size-lg);
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-links {
        text-align: left;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
    }
    
    .newsletter-input-group {
        flex-direction: column;
        border-radius: 0;
    }
    
    .newsletter-input-group input {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    
    .newsletter-btn {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: var(--spacing-sm);
    }
    
    /* Content wrapper */
    .content-wrapper p {
        text-align: left;
    }
    
    /* CTA Section */
    .cta-content p {
        font-size: var(--font-size-sm);
    }
    
    /* Cookie Consent */
    .cookie-consent-banner {
        padding: var(--spacing-sm);
    }
    
    .cookie-consent-text p {
        font-size: var(--font-size-xs);
    }
    
    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-consent-actions .btn {
        flex: 1;
        max-width: 120px;
    }
}

/* Extra Small Mobile (up to 375px) */
@media (max-width: 375px) {
    :root {
        --font-size-3xl: 1.5rem;
        --font-size-2xl: 1.25rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 0.875rem;
        --spacing-lg: 1rem;
        --spacing-xl: 1.25rem;
        --spacing-2xl: 1.5rem;
    }
    
    .container {
        padding: 0 var(--spacing-xs);
    }
    
    /* Navigation */
    .navbar .container {
        padding: var(--spacing-xs);
    }
    
    .nav-brand h2 {
        font-size: var(--font-size-xs);
    }
    
    .nav-brand i {
        font-size: var(--font-size-sm);
    }
    
    /* Hero */
    .hero-content {
        gap: var(--spacing-md);
    }
    
    /* Contact Form */
    .contact-form-container {
        padding: var(--spacing-sm);
    }
    
    /* Feature Cards */
    .feature-card {
        padding: var(--spacing-sm);
    }
    
    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: var(--font-size-xs);
    }
    
    /* Footer */
    .footer-grid {
        gap: var(--spacing-md);
    }
    
    .social-link {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-xs);
    }
}

/* High DPI/Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and icons for high DPI displays */
    .feature-icon,
    .contact-icon,
    .social-link {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .hamburger,
    .hero-buttons,
    .btn,
    .contact-form,
    .newsletter-form,
    .social-links,
    .cookie-consent-banner {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, blockquote {
        orphans: 3;
        widows: 3;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* Landscape Orientation on Mobile */
@media (max-width: 991px) and (orientation: landscape) {
    .hero {
        min-height: 50vh;
        padding: calc(60px + var(--spacing-sm)) 0 var(--spacing-sm) 0;
    }
    
    .contact-hero {
        padding: calc(60px + var(--spacing-xs)) 0 var(--spacing-xs) 0;
    }
    
    .section {
        padding: var(--spacing-lg) 0;
    }
}

/* 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;
        scroll-behavior: auto !important;
    }
    
    .hero-image img:hover,
    .feature-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Dark Mode Support (if enabled by user) */
@media (prefers-color-scheme: dark) {
    /* Note: This is optional - uncomment if you want to support dark mode */
    /*
    :root {
        --white: #1f2937;
        --off-white: #111827;
        --light-gray: #374151;
        --gray: #d1d5db;
        --dark-gray: #f3f4f6;
        --charcoal: #ffffff;
    }
    */
}

/* Focus Styles for Better Accessibility */
@media (any-hover: hover) {
    .btn:focus-visible,
    .nav-link:focus-visible,
    .form-group input:focus-visible,
    .form-group select:focus-visible,
    .form-group textarea:focus-visible {
        outline: 2px solid var(--primary-red);
        outline-offset: 2px;
    }
}

/* Ensure touch targets are at least 44px on touch devices */
@media (any-pointer: coarse) {
    .btn,
    .nav-link,
    .social-link,
    .newsletter-btn,
    .faq-question {
        min-height: 44px;
        min-width: 44px;
    }
}