/* Responsive Styles for Eminence Zenith */
/* Mobile-First Approach */

/* Small Mobile (320px and up) */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    /* Navigation Mobile */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-white);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-menu.active {
        top: 100%;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu.active .nav-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-menu.active .nav-toggle span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-menu.active .nav-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Campaign Hero Mobile */
    .campaign-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .campaign-sidebar {
        position: static;
        order: -1;
    }
    
    .campaign-stats-card {
        padding: 1.5rem;
    }
    
    .campaign-metrics {
        gap: 1rem;
    }
    
    .pledge-options {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-share {
        align-self: center;
    }
    
    .image-gallery {
        justify-content: center;
    }
    
    .gallery-thumb {
        width: 60px;
        height: 45px;
    }
    
    /* Campaign Story Mobile */
    .story-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .story-sidebar {
        order: -1;
    }
    
    .impact-preview {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    /* Journey Mobile */
    .timeline {
        grid-template-columns: 1fr;
    }
    
    .phase-card {
        padding: 1.5rem;
    }
    
    /* Rewards Mobile */
    .tier-pledge {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .pledge-amount {
        text-align: center;
        font-size: 1.125rem;
    }
    
    .btn-select-reward {
        width: 100%;
    }
    
    .tier-details {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .custom-amount-input {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-amount-input input {
        max-width: none;
        text-align: center;
    }
    
    .rewards-footer {
        grid-template-columns: 1fr;
    }
    
    /* Impact Mobile */
    .impact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .impact-item {
        padding: 1.5rem 1rem;
    }
    
    /* Financial Mobile */
    .transparency-stats {
        grid-template-columns: 1fr;
    }
    
    .transparency-card {
        padding: 2rem 1.5rem;
    }
    
    /* FAQ Mobile */
    .lifecycle-table-container {
        font-size: 0.875rem;
    }
    
    .lifecycle-table th,
    .lifecycle-table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* EOI Mobile */
    .eoi-form {
        padding: 2rem 1.5rem;
    }
    
    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    /* Mobile Disclaimer Show */
    .mobile-disclaimer {
        display: block;
    }
    
    /* Add padding to body to account for disclaimer */
    body {
        padding-bottom: 60px;
    }
}

/* Large Mobile (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background-white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        opacity: 0;
        visibility: hidden;
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    /* Campaign Hero Tablet */
    .campaign-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .campaign-sidebar {
        position: static;
    }
    
    .main-image img {
        height: 300px;
    }
    
    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .grid-item:last-child {
        grid-column: 1 / -1;
    }
    
    /* Journey */
    .timeline {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Rewards Tablet */
    .tier-pledge {
        flex-direction: row;
    }
    
    .tier-details {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Impact */
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Financial */
    .transparency-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Show mobile disclaimer */
    .mobile-disclaimer {
        display: block;
    }
    
    body {
        padding-bottom: 60px;
    }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Campaign Story Tablet */
    .story-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Journey */
    .timeline {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Rewards */
    .rewards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .reward-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* Impact */
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Financial */
    .transparency-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (1025px and up) */
@media (min-width: 1025px) {
    /* Campaign Hero Desktop */
    .campaign-layout {
        grid-template-columns: 1fr 400px;
    }
    
    .campaign-sidebar {
        position: sticky;
        top: 100px;
    }
    
    /* Navigation - hide mobile elements */
    .nav-toggle {
        display: none;
    }
    
    .nav-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        background: transparent;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
    }
    
    /* Remove mobile disclaimer on desktop */
    .mobile-disclaimer {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
}

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .container {
        padding: 0 2rem;
    }
    
    .section {
        padding: 6rem 0;
    }
    
    /* Hero larger text */
    .slide-content h1 {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }
    
    /* About enhanced layout */
    .image-grid {
        gap: 2rem;
    }
    
    .grid-item img {
        height: 300px;
    }
    
    /* Journey enhanced spacing */
    .timeline {
        gap: 3rem;
    }
    
    /* Rewards enhanced layout */
    .rewards-grid {
        gap: 3rem;
    }
    
    .reward-card {
        padding: 2.5rem;
    }
    
    /* Impact enhanced layout */
    .impact-item {
        padding: 3rem 2rem;
    }
    
    /* Financial enhanced layout */
    .transparency-card {
        padding: 4rem;
    }
    
    /* FAQ enhanced layout */
    .lifecycle-table th,
    .lifecycle-table td {
        padding: 1.25rem;
    }
    
    .faq-question {
        padding: 2rem;
        font-size: 1.25rem;
    }
    
    .faq-answer.open {
        padding: 0 2rem 2rem;
    }
    
    /* EOI enhanced layout */
    .eoi-form {
        padding: 4rem;
    }
}

/* Ultra Wide (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    /* Journey full width timeline */
    .timeline {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Impact full grid */
    .impact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Financial full stats grid */
    .transparency-stats {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Print Styles */
@media print {
    .nav,
    .slideshow-controls,
    .mobile-disclaimer,
    .btn,
    .reward-actions,
    .eoi-form {
        display: none !important;
    }
    
    .hero {
        height: auto;
        page-break-after: always;
    }
    
    .slide {
        position: static;
        opacity: 1 !important;
        background: none !important;
    }
    
    .slide-content {
        position: static;
        transform: none;
        color: var(--text-charcoal) !important;
        text-shadow: none !important;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 2rem 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        padding-bottom: 0;
    }
}

/* Landscape Mobile Orientation */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        height: 100vh;
    }
    
    .slide-content h1 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
    
    .hero-stats {
        padding: 1rem 0;
    }
    
    .slideshow-controls {
        bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
    
    .slide-indicators {
        gap: 0.25rem;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images and borders for high DPI */
    .reward-card,
    .phase-card,
    .impact-item,
    .transparency-card {
        border-width: 1px;
    }
    
    .progress-bar {
        height: 6px;
    }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
    .slideshow,
    .slide,
    .hero-stats,
    .btn,
    .nav-menu,
    .reward-card,
    .phase-card,
    .impact-item {
        transition: none !important;
        animation: none !important;
    }
    
    .slide-content {
        transform: translate(-50%, -50%) !important;
    }
    
    .grid-item:hover img,
    .reward-card:hover,
    .phase-card:hover,
    .impact-item:hover {
        transform: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-green: #000000;
        --text-charcoal: #000000;
        --secondary-sand: #ffffff;
        --background-white: #ffffff;
        --accent-gold: #000000;
    }
    
    .btn.primary {
        background: #000000;
        color: #ffffff;
        border: 2px solid #000000;
    }
    
    .btn.ghost {
        background: #ffffff;
        color: #000000;
        border: 2px solid #000000;
    }
    
    .reward-card,
    .phase-card,
    .transparency-card {
        border: 2px solid #000000;
    }
}

/* Focus Visible Support */
@supports selector(:focus-visible) {
    button:focus,
    input:focus,
    select:focus,
    textarea:focus,
    a:focus {
        outline: none;
    }
    
    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible,
    a:focus-visible {
        outline: 2px solid var(--accent-gold);
        outline-offset: 2px;
    }
}

/* Container Queries (future-proofing) */
@supports (container-type: inline-size) {
    .rewards-grid,
    .impact-grid,
    .timeline {
        container-type: inline-size;
    }
    
    @container (min-width: 600px) {
        .reward-card {
            padding: 2.5rem;
        }
    }
    
    @container (min-width: 900px) {
        .rewards-grid {
            grid-template-columns: repeat(3, 1fr);
        }
    }
}