/* ======================================
   RESPONSIVE — Mobile-first overrides
   360px Android Chrome is the primary device
   ====================================== */

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-wrapper {
        gap: var(--space-5);
    }

    .about-content {
        gap: var(--space-5);
    }

    .mentors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .outcomes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }

    .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mega-menu {
        width: 520px;
    }

    .programs-layout {
        grid-template-columns: 220px 1fr;
    }

    .card-course-horizontal {
        grid-template-columns: 1fr 2fr;
    }

    .timeline {
        flex-wrap: wrap;
        gap: var(--space-3);
    }
}

@media (max-width: 768px) {
    /* Section spacing */
    .section {
        padding: var(--space-8) 0;
    }

    .section-header {
        margin-bottom: var(--space-5);
    }

    /* Navigation — full-screen ink overlay */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        background: var(--ink-950);
        padding: 100px var(--space-4) var(--space-5);
        gap: var(--space-1);
        z-index: 1000;
        transform: translateX(100%);
        transition: transform 0.35s var(--ease-out);
        justify-content: flex-start;
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-family: var(--font-display);
        font-size: 1.5rem;
        font-weight: 480;
        color: rgba(255,255,255,.7);
        padding: var(--space-2) 0;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #fff;
    }

    .nav-links a::after {
        display: none;
    }

    /* CTA pair — show both, stacked, pinned to bottom of mobile menu */
    .nav-cta-group {
        display: flex;
        flex-direction: column;
        gap: var(--space-2);
        width: 100%;
        margin-top: auto;
        padding-top: var(--space-3);
    }

    .nav-counsel,
    .nav-apply {
        width: 100%;
        justify-content: center;
        padding: var(--space-2) var(--space-3);
        font-size: 1rem;
    }

    .nav-counsel {
        border-color: rgba(255,255,255,.25);
        color: #fff !important;
    }

    .hamburger {
        display: flex !important;
    }

    .hamburger.active span {
        background: #fff;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-overlay {
        display: none;
    }

    /* Mega menu — disabled on mobile */
    .mega-menu {
        display: none !important;
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 100px 0 var(--space-8);
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .terminal {
        max-width: 100%;
    }

    .terminal-body {
        min-height: 180px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .hero-trust {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-2);
    }

    .hero-trust-divider {
        display: none;
    }

    /* Outcomes */
    .outcomes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Programs grid */
    .programs-grid {
        grid-template-columns: 1fr;
    }

    /* Programs layout (courses page) */
    .programs-layout {
        grid-template-columns: 1fr;
    }

    .programs-filter {
        position: static;
        display: flex;
        gap: var(--space-2);
        flex-wrap: wrap;
        align-items: center;
        padding: var(--space-2);
    }

    .programs-filter h4 {
        display: none;
    }

    .filter-group {
        margin-bottom: 0;
    }

    .filter-group label {
        display: none;
    }

    .card-course-horizontal {
        grid-template-columns: 1fr;
    }

    .card-course-horizontal .card-image {
        min-height: 160px;
    }

    /* Mentors */
    .mentors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stories scroll */
    .card-proof {
        flex: 0 0 280px;
    }

    /* Timeline */
    .timeline {
        flex-direction: column;
        gap: var(--space-3);
    }

    .timeline::before {
        display: none;
    }

    .timeline-line {
        display: none;
    }

    .timeline-step {
        display: flex;
        align-items: center;
        gap: var(--space-2);
        text-align: left;
    }

    .timeline-dot {
        margin: 0;
        flex-shrink: 0;
    }

    /* Corporate strip */
    .corporate-strip .container {
        flex-direction: column;
        text-align: center;
    }

    /* Forms */
    .form-wrapper {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .lead-form {
        padding: var(--space-3);
    }

    /* Grids */
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .videos-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .problems-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tools-directory {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .footer-proof {
        flex-direction: column;
        gap: var(--space-2);
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    /* About / Contact */
    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Final CTA */
    .final-cta {
        min-height: auto;
        padding: var(--space-8) 0;
    }

    /* Course detail */
    .course-detail-meta {
        flex-wrap: wrap;
        gap: 8px 16px;
    }

    .course-shell {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        padding-top: var(--space-6);
    }

    .course-aside {
        position: static;
        order: -1;
    }

    .course-block > h2 {
        font-size: 1.375rem;
    }

    /* Mobile CTA */
    .mobile-cta {
        display: block;
    }

    .whatsapp-btn {
        bottom: 76px;
        display: flex;
    }

    /* Sticky CTA bar adjustments */
    .sticky-cta-bar .course-name {
        font-size: 0.875rem;
    }

    .sticky-cta-bar .cohort-date {
        display: none;
    }

    /* Reframe */
    .reframe {
        padding: var(--space-8) 0;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 var(--space-2); }

    .section { padding: var(--space-8) 0; }

    /* Problems grid single column on smallest screens */
    .problems-grid {
        grid-template-columns: 1fr;
    }

    .tools-directory {
        grid-template-columns: 1fr;
    }

    .outcomes-grid {
        gap: var(--space-2);
    }

    .stat-number {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .mentors-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2);
    }

    .lead-form { padding: var(--space-3); }

    .trust-logos span {
        font-size: 0.6875rem;
        padding: 6px 10px;
    }

    .marquee-item {
        font-size: 0.75rem;
        padding: 6px 14px;
    }

    .card-proof {
        flex: 0 0 260px;
    }

    .card-proof-photo {
        height: 160px;
    }
}

/* Larger screens — ensure grid doesn't get too wide */
@media (min-width: 1400px) {
    .hero-grid {
        gap: var(--space-12);
    }
}

/* ======================================
   NEW COMPONENT RESPONSIVE — 768px
   ====================================== */
@media (max-width: 768px) {
    .event-card { flex-direction: column; }

    .job-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .newsletter-bar {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        width: 100%;
        flex-direction: column;
    }

    .newsletter-form input {
        min-width: 100%;
    }

    .sitemap-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

/* ======================================
   NEW COMPONENT RESPONSIVE — 480px
   ====================================== */
@media (max-width: 480px) {
    .scholarship-card {
        padding: var(--space-3);
    }

    .story-card {
        padding: var(--space-3);
    }

    .payment-option {
        width: 100%;
    }

    .sitemap-grid {
        grid-template-columns: 1fr;
    }

    .error-code {
        font-size: clamp(3rem, 12vw, 5rem);
    }

    .community-stat .stat-number {
        font-size: 2rem;
    }

    .alumni-card {
        padding: var(--space-3);
    }
}
