/* ===================================
   Bridge Course - Responsive Stylesheet
   Mobile-first responsive design
   =================================== */

/* ===================================
   Tablet & Medium Devices (max-width: 1024px)
   =================================== */
@media screen and (max-width: 1024px) {
    /* Typography adjustments */
    :root {
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
    }

    /* Container */
    .container {
        padding: 0 var(--spacing-md);
    }

    /* Hero Section */
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
    }

    .hero-image {
        order: -1;
    }

    .phone-mockup {
        max-width: 300px;
    }

    .floating-card {
        font-size: var(--text-sm);
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
    }

    .stat-number {
        font-size: var(--text-3xl);
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    /* Subjects Grid */
    .subjects-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* Steps Container */
    .steps-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    /* Download Section */
    .download-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .download-image {
        order: -1;
    }

    .download-buttons {
        justify-content: center;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-column:first-child {
        grid-column: 1 / -1;
    }
}

/* ===================================
   Mobile & Small Devices (max-width: 768px)
   =================================== */
@media screen and (max-width: 768px) {
    /* Typography */
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
        --text-xl: 1.125rem;
    }

    /* Section spacing */
    .features,
    .subjects,
    .exams,
    .how-it-works,
    .testimonials,
    .faq,
    .download {
        padding: var(--spacing-2xl) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-2xl);
    }

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

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

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-xl);
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease-in-out;
        gap: var(--spacing-lg);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }
    
    body.menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: var(--spacing-md) 0;
        border-bottom: 1px solid var(--border-color);
    }

    .btn-primary-nav {
        width: 100%;
        text-align: center;
        display: block;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* Hero Section */
    .hero {
        padding: 6rem 0 3rem;
        min-height: auto;
    }

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

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

    .hero-features-list {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .stat-item {
        text-align: center;
        padding: var(--spacing-md);
        background: var(--bg-secondary);
        border-radius: var(--radius-lg);
    }

    .phone-mockup {
        max-width: 250px;
    }

    .floating-card {
        display: none;
    }

    /* Buttons */
    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-large {
        padding: 1rem 1.5rem;
        font-size: var(--text-base);
    }

    /* Features Grid */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .feature-card {
        padding: var(--spacing-xl);
    }

    /* Subjects Grid */
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .subject-card {
        padding: var(--spacing-xl);
    }

    .subject-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    /* Exams Grid */
    .exams-grid {
        grid-template-columns: 1fr;
    }

    .exam-card {
        padding: var(--spacing-lg);
    }

    .exam-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Steps */
    .step-card {
        padding: var(--spacing-xl);
    }

    .step-icon {
        width: 60px;
        height: 60px;
    }

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

    /* Testimonials */
    .testimonials-slider {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        padding: var(--spacing-xl);
    }

    .slider-controls {
        gap: var(--spacing-md);
    }

    /* FAQ */
    .faq-question {
        font-size: var(--text-base);
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .faq-answer p {
        padding: 0 var(--spacing-lg) var(--spacing-md);
        font-size: var(--text-sm);
    }

    /* Download Section */
    .download {
        padding: var(--spacing-2xl) 0;
    }

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

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

    .download-buttons {
        flex-direction: column;
        width: 100%;
    }

    .download-btn {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-2xl) 0 var(--spacing-lg);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

    .footer-column:first-child {
        grid-column: 1;
    }

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

    .footer-keywords {
        gap: var(--spacing-sm);
    }

    /* Scroll to Top */
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* ===================================
   Extra Small Devices (max-width: 480px)
   =================================== */
@media screen and (max-width: 480px) {
    /* Typography */
    :root {
        --text-5xl: 1.75rem;
        --text-4xl: 1.5rem;
        --text-3xl: 1.25rem;
    }

    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Hero */
    .hero-badge {
        font-size: 0.7rem;
        padding: var(--spacing-xs) var(--spacing-md);
    }

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

    .hero-cta {
        gap: var(--spacing-md);
    }

    .phone-mockup {
        max-width: 200px;
    }

    /* Feature Cards */
    .feature-icon {
        width: 60px;
        height: 60px;
    }

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

    /* Subject Cards */
    .subject-icon {
        width: 70px;
        height: 70px;
    }

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

    /* Download */
    .download-btn {
        padding: var(--spacing-sm) var(--spacing-lg);
    }

    .download-btn i {
        font-size: var(--text-2xl);
    }

    .download-btn .large {
        font-size: var(--text-base);
    }

    /* Footer */
    .footer-brand {
        font-size: var(--text-xl);
    }

    .footer-brand i {
        font-size: var(--text-2xl);
    }
}

/* ===================================
   Landscape Mobile (max-height: 500px)
   =================================== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 0 2rem;
    }

    .hero-container {
        gap: var(--spacing-xl);
    }

    .phone-mockup {
        max-width: 200px;
    }

    .nav-menu {
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .header,
    .hamburger,
    .scroll-to-top,
    .download,
    .footer {
        display: none;
    }

    body {
        background: var(--white);
    }

    .hero,
    .features,
    .subjects,
    .exams,
    .testimonials,
    .faq {
        page-break-inside: avoid;
    }
}

/* ===================================
   Accessibility - Prefers Reduced Motion
   =================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-shape,
    .floating-card,
    .phone-mockup {
        animation: none !important;
    }
}

/* ===================================
   High Contrast Mode Support
   =================================== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }

    .btn-outline {
        border-width: 3px;
    }

    .feature-card,
    .subject-card,
    .exam-card,
    .testimonial-card {
        border: 2px solid var(--black);
    }
}

/* ===================================
   Dark Mode Support (Optional)
   =================================== */
@media (prefers-color-scheme: dark) {
    /* Uncomment to enable dark mode support */
    /*
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2a2a2a;
        --bg-tertiary: #3a3a3a;
        --text-primary: #ffffff;
        --text-secondary: #b0b0b0;
        --border-color: #404040;
    }

    .header {
        background: var(--bg-primary);
    }

    .feature-card,
    .subject-card,
    .exam-card,
    .testimonial-card,
    .faq-item {
        background: var(--bg-secondary);
    }
    */
}
