/* ==========================================================================
   Escapade Zone - Responsive Stylesheet
   ========================================================================== */

/* ==========================================================================
   Tablet Styles (768px and below)
   ========================================================================== */

@media (max-width: 768px) {
    /* Typography adjustments */
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
        --text-2xl: 1.5rem;
        --space-16: 3rem;
        --space-20: 4rem;
        --space-24: 5rem;
    }

    /* Container adjustments */
    .container {
        padding: 0 var(--space-6);
    }

    /* Header & Navigation */
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        padding: var(--space-6);
        transform: translateY(-100vh);
        transition: transform var(--transition-normal);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: var(--space-4);
    }

    .nav-toggle {
        display: flex;
    }

    /* Hero Section */
    .hero {
        padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-16);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--space-3);
    }

    .hero-stats {
        justify-content: center;
        gap: var(--space-6);
    }

    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }

    .feature {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    /* Newsletter */
    .newsletter-form .form-group {
        flex-direction: column;
    }

    .newsletter-form input[type="email"] {
        margin-bottom: var(--space-3);
    }

    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }

    .contact-form .form-row {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-8);
    }

    /* Cookie Banner */
    .cookie-content {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }

    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Legal Pages */
    .purposes-grid,
    .rights-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .contact-section {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .retention-table .retention-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
        text-align: center;
    }

    .cookie-row {
        grid-template-columns: 1fr;
        gap: var(--space-2);
        text-align: center;
    }

    .browser-settings {
        grid-template-columns: 1fr;
    }

    .third-party-cookies {
        grid-template-columns: 1fr;
    }

    /* Thank You Page */
    .next-steps {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .thank-you-actions {
        gap: var(--space-6);
    }
}

/* ==========================================================================
   Mobile Styles (480px and below)
   ========================================================================== */

@media (max-width: 480px) {
    /* Typography adjustments */
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
        --space-12: 2rem;
        --space-16: 2.5rem;
        --space-20: 3rem;
    }

    /* Container adjustments */
    .container {
        padding: 0 var(--space-4);
    }

    /* Header adjustments */
    .nav-logo h1 {
        font-size: var(--text-xl);
    }

    .logo-tagline {
        font-size: 0.6rem;
    }

    /* Hero Section */
    .hero {
        padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-12);
    }

    .hero-title {
        font-size: var(--text-3xl);
        line-height: 1.2;
    }

    .hero-description {
        font-size: var(--text-base);
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-4);
        align-items: center;
    }

    .stat {
        text-align: center;
    }

    /* Buttons */
    .btn-primary,
    .btn-outline,
    .btn-secondary {
        padding: var(--space-3) var(--space-5);
        font-size: var(--text-sm);
    }

    /* Section spacing */
    .services,
    .about,
    .testimonials,
    .newsletter,
    .contact {
        padding: var(--space-16) 0;
    }

    /* Section headers */
    .section-header {
        margin-bottom: var(--space-12);
    }

    .section-header h2 {
        font-size: var(--text-3xl);
    }

    /* Service cards */
    .service-card {
        padding: var(--space-6);
    }

    .service-icon {
        width: 64px;
        height: 64px;
        margin-bottom: var(--space-4);
    }

    .service-icon i {
        font-size: var(--text-2xl);
    }

    /* SVG illustrations responsive */
    .hero-illustration,
    .team-illustration {
        max-height: 250px;
    }

    /* About features */
    .about-features {
        gap: var(--space-4);
    }

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

    .feature-icon i {
        font-size: var(--text-base);
    }

    /* Testimonial cards */
    .testimonial-card {
        padding: var(--space-6);
    }

    .testimonial-card::before {
        font-size: var(--text-4xl);
    }

    /* Newsletter section */
    .newsletter-text h2 {
        font-size: var(--text-3xl);
    }

    .newsletter-text p {
        font-size: var(--text-base);
    }

    .form-consent {
        font-size: var(--text-xs);
    }

    /* Contact section */
    .contact-item {
        gap: var(--space-3);
    }

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

    .contact-icon i {
        font-size: var(--text-base);
    }

    .contact-form {
        padding: var(--space-6);
    }

    /* Footer */
    .footer {
        padding: var(--space-12) 0 var(--space-6);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        text-align: center;
    }

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

    /* Cookie elements */
    .cookie-banner {
        padding: var(--space-4);
    }

    .cookie-content {
        gap: var(--space-3);
    }

    .cookie-text h3 {
        font-size: var(--text-base);
    }

    .cookie-text p {
        font-size: var(--text-xs);
    }

    .cookie-buttons {
        gap: var(--space-2);
    }

    .cookie-buttons button {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-xs);
    }

    .cookie-modal {
        padding: var(--space-2);
    }

    .cookie-modal-content {
        max-height: 90vh;
    }

    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding: var(--space-4);
    }

    .cookie-category {
        padding: var(--space-3);
        margin-bottom: var(--space-4);
    }

    /* Legal pages */
    .legal-page {
        padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-16);
    }

    .legal-header {
        margin-bottom: var(--space-12);
    }

    .legal-header h1 {
        font-size: var(--text-3xl);
    }

    .legal-section {
        margin-bottom: var(--space-8);
    }

    .legal-section h2 {
        font-size: var(--text-xl);
        margin-bottom: var(--space-4);
    }

    .legal-section h3 {
        font-size: var(--text-lg);
        margin-bottom: var(--space-3);
    }

    .contact-info {
        padding: var(--space-4);
    }

    .purposes-grid .purpose-item,
    .rights-grid .right-item {
        padding: var(--space-4);
    }

    .right-item i {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-3);
    }

    .retention-info {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .retention-item {
        padding: var(--space-4);
    }

    .browser-item {
        padding: var(--space-3);
        gap: var(--space-3);
    }

    .browser-item i {
        font-size: var(--text-xl);
    }

    .warning-box {
        padding: var(--space-3);
        gap: var(--space-2);
    }

    /* Thank you page */
    .thank-you-page {
        padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-16);
    }

    .thank-you-icon i {
        font-size: var(--text-5xl);
    }

    .thank-you-content h1 {
        font-size: var(--text-3xl);
    }

    .thank-you-message {
        font-size: var(--text-base);
        margin-bottom: var(--space-8);
    }

    .what-next h2,
    .recommendations h2 {
        font-size: var(--text-2xl);
        margin-bottom: var(--space-6);
    }

    .step {
        padding: var(--space-4);
    }

    .step-icon {
        width: 40px;
        height: 40px;
        margin-bottom: var(--space-3);
    }

    .step-icon i {
        font-size: var(--text-base);
    }

    .recommendation-card {
        padding: var(--space-4);
    }

    .recommendation-icon {
        width: 56px;
        height: 56px;
        margin-bottom: var(--space-3);
    }

    .recommendation-icon i {
        font-size: var(--text-xl);
    }
}

/* ==========================================================================
   Small Mobile Styles (360px and below)
   ========================================================================== */

@media (max-width: 360px) {
    /* Further reduce spacing for very small screens */
    :root {
        --space-4: 0.75rem;
        --space-6: 1rem;
        --space-8: 1.5rem;
        --space-12: 1.75rem;
        --space-16: 2rem;
        --space-20: 2.5rem;
    }

    .container {
        padding: 0 var(--space-3);
    }

    /* Header */
    .nav-logo h1 {
        font-size: var(--text-lg);
    }

    /* Hero section */
    .hero-title {
        font-size: var(--text-2xl);
    }

    .hero-buttons {
        width: 100%;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }

    /* Cards and components */
    .service-card,
    .testimonial-card,
    .contact-form {
        padding: var(--space-4);
    }

    .service-icon {
        width: 56px;
        height: 56px;
    }

    .service-icon i {
        font-size: var(--text-xl);
    }

    /* Form elements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: var(--space-2);
    }

    /* Cookie banner */
    .cookie-buttons {
        width: 100%;
    }

    .cookie-buttons button {
        flex: 1;
        min-width: 0;
    }

    /* Modal adjustments */
    .cookie-modal-header h2 {
        font-size: var(--text-lg);
    }

    /* Legal pages */
    .legal-header h1 {
        font-size: var(--text-2xl);
    }

    .legal-section h2 {
        font-size: var(--text-lg);
    }

    /* Thank you page */
    .thank-you-content h1 {
        font-size: var(--text-2xl);
    }

    .what-next h2,
    .recommendations h2 {
        font-size: var(--text-xl);
    }
}

/* ==========================================================================
   Landscape Mobile Styles
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: calc(var(--header-height) + var(--space-6)) 0 var(--space-12);
    }

    .hero-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-4);
    }

    .hero-description {
        margin-bottom: var(--space-6);
    }

    .hero-stats {
        flex-direction: row;
        gap: var(--space-4);
        justify-content: center;
    }

    .nav-menu {
        max-height: 60vh;
        overflow-y: auto;
    }
}

/* ==========================================================================
   Large Desktop Styles (1400px and above)
   ========================================================================== */

@media (min-width: 1400px) {
    :root {
        --container-max-width: 1320px;
    }

    .hero-title {
        font-size: var(--text-6xl);
    }

    .section-header h2 {
        font-size: var(--text-5xl);
    }

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   Print Media Queries
   ========================================================================== */

@media print {
    /* Hide interactive elements */
    .cookie-banner,
    .cookie-modal,
    .nav-toggle,
    .btn-primary,
    .btn-outline,
    .btn-secondary,
    .social-links,
    .newsletter-form,
    .contact-form {
        display: none !important;
    }

    /* Adjust layout for print */
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: var(--space-8) !important;
    }

    .services-grid,
    .testimonials-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: var(--space-6) !important;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr 1fr !important;
    }

    /* Ensure proper page breaks */
    .service-card,
    .testimonial-card,
    .legal-section {
        break-inside: avoid;
    }

    /* Adjust colors for print */
    .hero,
    .newsletter,
    .footer {
        background: transparent !important;
        color: #000 !important;
    }

    .service-icon,
    .feature-icon,
    .contact-icon {
        background: #f0f0f0 !important;
        color: #000 !important;
    }
}

/* ==========================================================================
   High DPI / Retina Display Support
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize for high DPI displays */
    .image-placeholder {
        border-width: 1px;
    }

    .service-card,
    .testimonial-card {
        border-width: 1px;
    }
}

/* ==========================================================================
   Accessibility Media Queries
   ========================================================================== */

/* Large text support */
@media (min-width: 768px) {
    .large-text {
        font-size: 1.2em;
    }
    
    .large-text .btn-primary,
    .large-text .btn-outline,
    .large-text .btn-secondary {
        padding: var(--space-4) var(--space-8);
        font-size: var(--text-lg);
    }
}

/* Touch-friendly adjustments */
@media (pointer: coarse) {
    .btn-primary,
    .btn-outline,
    .btn-secondary {
        min-height: 44px;
        padding: var(--space-3) var(--space-6);
    }

    .nav-link {
        padding: var(--space-3) 0;
    }

    .social-links a {
        width: 48px;
        height: 48px;
    }

    .cookie-buttons button {
        min-height: 44px;
    }

    input[type="checkbox"] {
        width: 24px;
        height: 24px;
    }
}

/* Dark mode support (if user preference is set) */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1f2937;
        --gray-50: #374151;
        --gray-100: #4b5563;
        --gray-200: #6b7280;
        --gray-300: #9ca3af;
        --gray-400: #d1d5db;
        --gray-500: #e5e7eb;
        --gray-600: #f3f4f6;
        --gray-700: #f9fafb;
        --gray-800: #ffffff;
        --gray-900: #ffffff;
    }

    .image-placeholder {
        background-color: var(--gray-800);
        border-color: var(--gray-600);
        color: var(--gray-400);
    }

    .hero-illustration,
    .team-illustration {
        filter: drop-shadow(0 5px 15px rgba(255, 255, 255, 0.1));
    }

    .cookie-banner,
    .cookie-modal-content,
    .contact-form {
        background-color: var(--gray-100);
        border-color: var(--gray-300);
    }
}
