/* Mobile-First Responsive Overrides */

/* --- Mobile Base Variables & Resets --- */
:root {
    --touch-target: 44px;
}

/* Make sure all interactive elements are at least 44x44px for touch */
button, 
a.button, 
input[type="submit"], 
.xw-calc-radio-group label,
.xw-calc-btn,
.xw-calc-claim-btn {
    min-height: var(--touch-target);
    min-width: var(--touch-target);
}

/* --- Mobile (max-width: 767px) --- */
@media (max-width: 767px) {
    /* Reduce padding and margins generally */
    section {
        padding: 40px 15px;
    }

    /* Header */
    .site-header {
        padding: 10px 15px;
    }
    .site-branding img {
        max-width: 120px;
    }
    .main-navigation {
        display: none; /* Assume handled by a hamburger script */
    }
    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 24px;
    }

    /* Hero Section */
    .xw-hero-title {
        font-size: 32px;
        line-height: 1.2;
    }
    .xw-hero-ctas {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .xw-floating-stat {
        /* Hide or make swipeable, for simplicity hiding here */
        display: none;
    }

    /* Solutions Grid */
    .xw-solutions-grid {
        grid-template-columns: 1fr;
    }

    /* National Parks */
    .xw-parks-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 20px;
    }
    .xw-park-card {
        min-width: 80vw;
        scroll-snap-align: center;
    }

    /* Calculator */
    .xw-calculator {
        padding: 20px;
    }
    .xw-calc-radio-group {
        flex-direction: column;
    }
    .xw-calc-radio-group label {
        text-align: center;
    }

    /* Stats Grid */
    .xw-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    .xw-stat-number {
        font-size: 24px;
    }

    /* Footer */
    .site-footer {
        padding-bottom: 80px; /* Space for sticky CTA */
    }
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Mobile Sticky CTA Bar */
    .xw-mobile-sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: rgba(10, 10, 10, 0.8);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        z-index: 1000;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .xw-mobile-cta-btn {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        gap: 8px;
    }
    .xw-mobile-cta-btn.whatsapp {
        background: #25d366;
    }
    .xw-mobile-cta-btn.call {
        background: #ffd700;
        color: #000;
    }
}

/* Hide Sticky CTA on larger screens */
@media (min-width: 768px) {
    .xw-mobile-sticky-cta {
        display: none;
    }
}

/* --- Tablet (768px - 1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
    .xw-solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .xw-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    section {
        padding: 60px 30px;
    }
}

/* --- Large Desktop (1440px+) --- */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
    .xw-hero-title {
        font-size: 64px;
    }
    section {
        padding: 100px 0;
    }
}

/* --- Accessibility --- */

/* Skip to content */
.skip-link {
    position: absolute;
    top: -1000px;
    left: -1000px;
    background: #ffd700;
    color: #000;
    padding: 10px 20px;
    z-index: 9999;
}
.skip-link:focus {
    top: 10px;
    left: 10px;
}

/* Focus Visible */
*:focus-visible {
    outline: 3px solid #ffd700 !important;
    outline-offset: 3px !important;
}

@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;
    }
    .xw-parallax-bg {
        background-attachment: scroll !important;
        transform: none !important;
    }
}

@media (prefers-contrast: more) {
    .xw-calculator, .xw-calc-input {
        border-width: 2px;
        border-color: #fff;
        background: #000;
    }
    .xw-calc-btn {
        border: 2px solid #000;
    }
}

/* --- Print Styles --- */
@media print {
    .site-header,
    .site-footer,
    .xw-calculator,
    .xw-mobile-sticky-cta,
    .whatsapp-float-btn {
        display: none !important;
    }
    body {
        background: #fff;
        color: #000;
    }
    a {
        color: #000;
        text-decoration: underline;
    }
}
