/* ========================================
   YouPlaySports - Responsive Styles
   Mobile-First Design Approach
   ======================================== */

/* ========== Large Desktop (1440px+) ========== */
@media (min-width: 1440px) {
    .hero-headline {
        font-size: var(--font-size-6xl);
    }
    
    .section-container {
        padding: var(--spacing-4xl) var(--spacing-lg);
    }
}

/* ========== Desktop (1024px - 1439px) ========== */
@media (max-width: 1439px) {
    .hero-headline {
        font-size: var(--font-size-5xl);
    }
}

/* ========== Tablet (768px - 1023px) ========== */
@media (max-width: 1023px) {
    /* Header / Navigation */
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-pure-white);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-xl);
        gap: var(--spacing-md);
        transform: translateX(-100%);
        transition: transform var(--transition-base);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .nav-cta-btn {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .hero-content {
        text-align: center;
        max-width: 100%;
    }
    
    .hero-headline {
        font-size: var(--font-size-4xl);
    }
    
    .hero-subtext {
        font-size: var(--font-size-lg);
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .mockup-container {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .mockup-primary {
        width: 240px;
    }
    
    .mockup-secondary {
        width: 200px;
        right: -30px;
        top: 50px;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--spacing-lg);
    }
    
    /* Footer */
    .footer-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }
    
    .footer-links {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== Mobile (320px - 767px) ========== */
@media (max-width: 767px) {
    /* Global Adjustments */
    html {
        font-size: 15px;
    }
    
    /* Header */
    .nav-container {
        padding: 0 var(--spacing-sm);
    }
    
    .logo img {
        height: 32px;
    }
    
    /* Hero Section */
    .hero-section {
        padding: var(--spacing-2xl) var(--spacing-sm);
        min-height: auto;
    }
    
    .hero-container {
        gap: var(--spacing-xl);
    }
    
    .hero-headline {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-subtext {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-sm);
    }
    
    .app-store-badge,
    .btn-secondary {
        width: 100%;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Make "See How It Works" button match App Store button size */
    .btn-secondary {
        padding: var(--spacing-sm) var(--spacing-lg);
        min-height: 54px;
    }
    
    .app-store-badge img {
        margin: 0 auto;
    }
    
    .mockup-container {
        max-width: 320px;
    }
    
    .mockup-primary {
        width: 200px;
    }
    
    .mockup-secondary {
        width: 170px;
        right: -20px;
        top: 40px;
    }
    
    /* Section Containers */
    .section-container {
        padding: var(--spacing-2xl) var(--spacing-sm);
    }
    
    .section-title {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--spacing-2xl);
    }
    
    /* Features Section - FIXED: Stack vertically instead of horizontal scroll */
    .features-section {
        overflow-x: visible;
    }
    
    .features-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: var(--spacing-lg);
        padding-bottom: 0;
    }
    
    .feature-card {
        flex: none;
        max-width: 100%;
    }
    
    .feature-image img {
        width: 200px;
        margin: 0 auto;
    }
    
    .feature-title {
        font-size: var(--font-size-xl);
    }
    
    .feature-description {
        font-size: var(--font-size-sm);
    }
    
    /* How It Works Section */
    .steps-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .step-number {
        width: 70px;
        height: 70px;
        font-size: var(--font-size-2xl);
    }
    
    .step-card h3 {
        font-size: var(--font-size-lg);
    }
    
    .step-card p {
        font-size: var(--font-size-sm);
    }
    
    /* CTA Section */
    .cta-section {
        padding: var(--spacing-2xl) var(--spacing-sm);
    }
    
    .cta-headline {
        font-size: var(--font-size-3xl);
        margin-bottom: var(--spacing-lg);
    }
    
    .btn-primary-large img {
        height: 50px;
    }
    
    .cta-subtext {
        font-size: var(--font-size-sm);
    }
    
    /* Footer */
    .main-footer {
        padding: var(--spacing-2xl) var(--spacing-sm) var(--spacing-md);
    }
    
    .footer-container {
        gap: var(--spacing-xl);
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-column h4 {
        font-size: var(--font-size-base);
    }
    
    .footer-column ul {
        gap: var(--spacing-xs);
    }
    
    .footer-column a {
        font-size: var(--font-size-sm);
    }
}

/* ========== Small Mobile (320px - 480px) ========== */
@media (max-width: 480px) {
    .hero-headline {
        font-size: var(--font-size-2xl);
    }
    
    .mockup-primary {
        width: 170px;
    }
    
    .mockup-secondary {
        width: 145px;
        right: -15px;
        top: 30px;
    }
    
    .section-title {
        font-size: var(--font-size-2xl);
    }
    
    .feature-card {
        max-width: 100%;
    }
}

/* ========== Landscape Orientation ========== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-xl) var(--spacing-sm);
    }
    
    .nav-links {
        height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }
}

/* ========== Print Styles ========== */
@media print {
    .main-header,
    .mobile-menu-toggle,
    .hero-buttons,
    .cta-section,
    .main-footer {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .hero-section {
        margin-top: 0;
        page-break-after: always;
    }
}

/* ========== 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;
    }
}

/* ========== High Contrast Mode ========== */
@media (prefers-contrast: high) {
    .btn-secondary {
        border-width: 3px;
    }
    
    .feature-card:hover {
        outline: 3px solid var(--color-navy);
    }
}