/**
 * RESPONSIVE DESIGN SYSTEM
 * Mobile-First Media Queries for All Breakpoints
 * 
 * Breakpoint Strategy:
 * - Mobile First: Base styles for mobile (< 576px)
 * - Small: 576px (Large phones in landscape)
 * - Medium: 768px (Tablets)
 * - Large: 992px (Tablets landscape / small desktops)
 * - Extra Large: 1200px (Desktops)
 * - XXL: 1400px (Large desktops)
 */

/* ============================================
   BASE MOBILE STYLES (< 576px)
   All base styles assume mobile-first
   ============================================ */

/* Navigation - Mobile Default */
.navigation-minimal {
    padding: 1rem 0;
}

.nav-container {
    padding: 0 1.5rem;
    gap: 1rem;
}

/* Hide desktop menu on mobile */
.nav-menu {
    display: none;
}

.nav-cta {
    display: none;
}

/* Show mobile toggle */
.nav-mobile-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

/* Mobile toggle active state */
.nav-mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   HERO SECTION - MOBILE LAYOUT
   ============================================ */

.hero-section {
    min-height: auto;
    padding: 4rem 0 2rem;
}

.hero-content {
    padding: 2rem 1.5rem;
    order: 1;
}

.hero-visual {
    padding: 1rem 1.5rem 2rem;
    order: 2;
}

.hero-headline {
    font-size: clamp(2rem, 10vw, 3rem);
    margin-bottom: 1.5rem;
}

.hero-subtext {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* CTA Buttons - Stack vertically on mobile */
.hero-cta-group {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cta-primary,
.cta-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 1rem 2rem;
}

/* Hero Stats - Wrap and stack */
.hero-stats {
    flex-wrap: wrap;
    gap: 1.5rem;
}

.stat-item {
    flex: 1 1 calc(50% - 1.5rem);
    min-width: 120px;
}

.stat-divider {
    display: none;
}

/* DRL - Smaller on mobile */
.drl-unit {
    width: 80px;
    height: 28px;
    top: 35%;
}

.drl-left {
    left: 10%;
}

.drl-right {
    right: 10%;
}

.drl-inner-core {
    height: 8px;
}

.drl-outer-glow {
    filter: blur(16px);
    width: 180%;
    height: 300%;
}

/* Spec Badge - Smaller on mobile */
.spec-badge {
    padding: 0.75rem 1rem;
    bottom: 5%;
    right: 5%;
}

.spec-title {
    font-size: 0.75rem;
}

.spec-power {
    font-size: 0.875rem;
}

/* ============================================
   CONTENT SECTIONS - MOBILE LAYOUT
   ============================================ */

.content-section {
    padding: 3rem 0;
}

.section-row {
    min-height: auto;
}

.section-content {
    padding: 2rem 1.5rem;
}

.section-label {
    font-size: 0.6875rem;
    margin-bottom: 1rem;
}

.section-heading {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.section-description {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Image Frames - Full width on mobile */
.image-frame {
    padding: 1rem 1.5rem;
}

.image-background-layer {
    display: none; /* Simplify on mobile */
}

/* ============================================
   EVENT CARDS - MOBILE OPTIMIZATION
   ============================================ */

.event-cards {
    gap: 1rem;
    margin-bottom: 2rem;
}

.event-card {
    padding: 1.25rem;
}

.event-title {
    font-size: 1rem;
}

.event-link {
    opacity: 1; /* Always visible on mobile (no hover) */
    transform: translateY(0);
}

/* ============================================
   IMPACT STATS - MOBILE STACK
   ============================================ */

.impact-stats {
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.impact-number {
    font-size: 2rem;
}

/* ============================================
   WORKSHOP TOPICS - MOBILE LAYOUT
   ============================================ */

.workshop-topics {
    gap: 1rem;
    margin-bottom: 2rem;
}

.topic-item {
    padding: 1rem;
    flex-direction: column;
    gap: 0.75rem;
}

.topic-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
}

.topic-title {
    font-size: 0.9375rem;
}

.topic-desc {
    font-size: 0.8125rem;
}

/* ============================================
   TESTIMONIAL - MOBILE OPTIMIZATION
   ============================================ */

.testimonial-card {
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.testimonial-text {
    font-size: 1rem;
    margin-bottom: 1rem;
}

/* ============================================
   COMMUNITY STATS - MOBILE STACK
   ============================================ */

.community-stats {
    flex-direction: column;
    gap: 1.5rem;
}

.stat-value {
    font-size: 1.75rem;
}

/* ============================================
   FOOTER - MOBILE OPTIMIZATION
   ============================================ */

.footer-overlapping {
    margin-top: -2rem; /* Reduced overlap on mobile */
}

.footer-overlap-spacer {
    height: 2rem;
}

.footer-content {
    padding: 3rem 0 2rem;
}

.footer-grid {
    margin-bottom: 2rem;
}

.footer-column {
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

/* Footer Brand - Full width */
.footer-brand {
    margin-bottom: 2rem;
}

.footer-logo {
    font-size: 1.25rem;
}

.footer-mission {
    font-size: 0.875rem;
}

/* Footer Social - Stack labels */
.footer-social {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

/* Footer Links - Larger touch targets */
.footer-links {
    gap: 1rem;
}

.footer-link {
    font-size: 1rem;
    padding: 0.25rem 0;
}

/* Footer Legal - Stack on mobile */
.footer-legal {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
    padding-top: 2rem;
}

.legal-right {
    justify-content: center;
}

/* ============================================
   SMALL DEVICES (≥ 576px)
   Large phones in landscape
   ============================================ */

@media (min-width: 576px) {
    .hero-headline {
        font-size: clamp(2.5rem, 8vw, 3.5rem);
    }
    
    .section-heading {
        font-size: clamp(2.25rem, 6vw, 3rem);
    }
    
    .stat-item {
        flex: 1 1 auto;
    }
    
    .stat-divider {
        display: block;
    }
    
    .hero-stats {
        justify-content: flex-start;
    }
    
    .drl-unit {
        width: 100px;
        height: 32px;
    }
    
    .drl-left {
        left: 12%;
    }
    
    .drl-right {
        right: 12%;
    }
}

/* ============================================
   MEDIUM DEVICES (≥ 768px)
   Tablets
   ============================================ */

@media (min-width: 768px) {
    /* Navigation - Still mobile menu but better spacing */
    .nav-container {
        padding: 0 2rem;
    }
    
    /* Hero - Better proportions */
    .hero-section {
        padding: 5rem 0 3rem;
    }
    
    .hero-content {
        padding: 3rem 2rem;
    }
    
    .hero-visual {
        padding: 2rem 2rem 3rem;
    }
    
    .hero-headline {
        font-size: clamp(3rem, 7vw, 4rem);
        margin-bottom: 2rem;
    }
    
    .hero-subtext {
        font-size: 1.125rem;
        margin-bottom: 2.5rem;
    }
    
    /* CTA - Side by side on tablet */
    .hero-cta-group {
        flex-direction: row;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .cta-primary,
    .cta-secondary {
        width: auto;
        padding: 1.125rem 2.5rem;
    }
    
    /* Sections - Better spacing */
    .content-section {
        padding: 4rem 0;
    }
    
    .section-content {
        padding: 2rem;
    }
    
    .section-heading {
        font-size: clamp(2.75rem, 6vw, 3.5rem);
        margin-bottom: 2rem;
    }
    
    .section-description {
        font-size: 1.0625rem;
        margin-bottom: 2.5rem;
    }
    
    /* Impact Stats - Side by side */
    .impact-stats {
        flex-direction: row;
        gap: 3rem;
    }
    
    /* Workshop Topics - Better layout */
    .topic-item {
        flex-direction: row;
        padding: 1.25rem;
        gap: 1.25rem;
    }
    
    /* Community Stats - Side by side */
    .community-stats {
        flex-direction: row;
        gap: 3rem;
    }
    
    /* Footer - Two column layout */
    .footer-column {
        margin-bottom: 0;
    }
    
    .footer-legal {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    /* DRL - Larger on tablet */
    .drl-unit {
        width: 120px;
        height: 35px;
    }
    
    .drl-left {
        left: 14%;
    }
    
    .drl-right {
        right: 14%;
    }
    
    .drl-inner-core {
        height: 10px;
    }
    
    .drl-outer-glow {
        filter: blur(20px);
    }
}

/* ============================================
   LARGE DEVICES (≥ 992px)
   Tablets landscape / Small desktops
   ============================================ */

@media (min-width: 992px) {
    /* Navigation - Show desktop menu */
    .nav-menu {
        display: flex;
    }
    
    .nav-cta {
        display: block;
    }
    
    .nav-mobile-toggle {
        display: none;
    }
    
    .nav-container {
        padding: 1.5rem 2.5rem;
        gap: 3rem;
    }
    
    /* Hero - Full desktop layout */
    .hero-section {
        padding: 6rem 0 4rem;
    }
    
    .hero-content {
        padding: 4rem 3rem;
        order: 0;
    }
    
    .hero-visual {
        padding: 3rem 3rem 4rem;
        order: 0;
    }
    
    .hero-headline {
        font-size: clamp(3.5rem, 7vw, 5rem);
        margin-bottom: 2.5rem;
    }
    
    .hero-subtext {
        font-size: 1.25rem;
        margin-bottom: 3rem;
    }
    
    .hero-cta-group {
        margin-bottom: 4rem;
    }
    
    /* Sections - Full spacing */
    .content-section {
        padding: 6rem 0;
    }
    
    .section-row {
        min-height: 600px;
    }
    
    .section-content {
        padding: 3rem;
    }
    
    .section-heading {
        font-size: clamp(3rem, 5vw, 4rem);
        margin-bottom: 2.5rem;
    }
    
    .section-description {
        font-size: 1.125rem;
        margin-bottom: 3rem;
    }
    
    /* Image Background Layer - Show on desktop */
    .image-background-layer {
        display: block;
    }
    
    /* Event Cards - Hover states active */
    .event-link {
        opacity: 0;
        transform: translateY(8px);
    }
    
    .event-card:hover .event-link {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Footer - Full overlap effect */
    .footer-overlapping {
        margin-top: -6rem;
    }
    
    .footer-overlap-spacer {
        height: 6rem;
    }
    
    .footer-content {
        padding: 6rem 0 3rem;
    }
    
    /* DRL - Full size on desktop */
    .drl-unit {
        width: 140px;
        height: 40px;
    }
    
    .drl-left {
        left: 16%;
        transform: translateY(-50%) rotate(-1.5deg);
    }
    
    .drl-right {
        right: 16%;
        transform: translateY(-50%) rotate(1.5deg);
    }
    
    .drl-inner-core {
        height: 12px;
    }
    
    .drl-outer-glow {
        filter: blur(24px);
        width: 200%;
        height: 350%;
    }
    
    .spec-badge {
        padding: 1rem 1.5rem;
        bottom: 10%;
    }
    
    .spec-title {
        font-size: 0.875rem;
    }
    
    .spec-power {
        font-size: 1.125rem;
    }
}

/* ============================================
   EXTRA LARGE DEVICES (≥ 1200px)
   Desktops
   ============================================ */

@media (min-width: 1200px) {
    .nav-container {
        padding: 1.5rem 3rem;
    }
    
    .hero-content {
        padding: 5rem 4rem;
    }
    
    .hero-visual {
        padding: 4rem 4rem 5rem;
    }
    
    .hero-headline {
        font-size: clamp(4rem, 6vw, 5.5rem);
    }
    
    .section-content {
        padding: 4rem;
    }
    
    .section-heading {
        font-size: clamp(3.5rem, 4vw, 4rem);
    }
}

/* ============================================
   XXL DEVICES (≥ 1400px)
   Large desktops
   ============================================ */

@media (min-width: 1400px) {
    .nav-container,
    .container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .hero-headline {
        font-size: 5.5rem;
    }
    
    .section-heading {
        font-size: 4rem;
    }
}

/* ============================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
   ============================================ */

@media (max-height: 600px) and (orientation: landscape) {
    /* Reduce vertical spacing in landscape */
    .hero-section {
        min-height: auto;
        padding: 3rem 0 2rem;
    }
    
    .hero-content,
    .hero-visual {
        padding: 2rem 1.5rem;
    }
    
    .hero-headline {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtext {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-cta-group {
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        margin-top: 1rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    /* Hide navigation and interactive elements */
    .navigation-minimal,
    .nav-mobile-overlay,
    .hero-cta-group,
    .section-cta,
    .event-link,
    .footer-social {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        background: white;
    }
    
    .hero-section,
    .content-section {
        page-break-inside: avoid;
    }
    
    /* Remove animations */
    * {
        animation: none !important;
        transition: none !important;
    }
    
    /* Simplify DRL for print */
    .drl-outer-glow,
    .drl-flicker-layer {
        display: none;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */

@media (prefers-contrast: high) {
    .nav-link,
    .footer-link,
    .section-description {
        color: var(--color-black);
    }
    
    .event-card,
    .topic-item,
    .testimonial-card {
        border: 2px solid var(--color-black);
    }
    
    .cta-primary {
        border: 2px solid var(--color-mazda-red);
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    /* Disable parallax */
    .section-image {
        transform: none !important;
    }
    
    /* Disable DRL animations */
    .drl-outer-glow,
    .drl-inner-core,
    .drl-flicker-layer {
        animation: none !important;
    }
    
    /* Static hover states */
    .event-link {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-link,
    .footer-link,
    .event-card,
    .cta-primary,
    .cta-secondary {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    /* Always show interactive elements (no hover) */
    .event-link {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Remove hover-dependent effects */
    .nav-underline,
    .cta-underline {
        display: none;
    }
    
    /* Simplify animations for performance */
    .drl-outer-glow {
        filter: blur(12px);
    }
}
