/* ========================================
   ROMANTIC PILOT - Subject Page Stylesheet
   ======================================== */

/* --- Subject Header --- */
.subject-header {
    position: relative;
    padding: 8rem 0 4rem;
    overflow: hidden;
    background: var(--gradient-hero);
}

.subject-header-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 50% at 70% 50%, rgba(43, 124, 186, 0.15), transparent),
        radial-gradient(ellipse 40% 60% at 20% 80%, rgba(135, 206, 235, 0.08), transparent);
}

.subject-header-bg::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(135, 206, 235, 0.3), transparent);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    position: relative;
    z-index: 1;
}
.breadcrumb a { color: rgba(255,255,255,0.5); transition: color 0.2s ease; }
.breadcrumb a:hover { color: rgba(255,255,255,0.9); }
.breadcrumb span:last-child { color: rgba(255,255,255,0.85); }
.breadcrumb-sep { color: rgba(255,255,255,0.25); font-size: 0.9rem; }

.subject-header-content { position: relative; z-index: 1; }

.subject-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #87ceeb;
    margin-bottom: 1rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid rgba(135, 206, 235, 0.3);
    border-radius: 50px;
}

.subject-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    max-width: 700px;
}

.subject-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.65);
    max-width: 600px;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.subject-modules { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.module-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.6);
    transition: all 0.3s var(--ease-out);
    user-select: none;
}
.module-pill:hover { border-color: rgba(135,206,235,0.4); color: rgba(255,255,255,0.9); }
.module-pill.active {
    background: rgba(43,124,186,0.4);
    border-color: rgba(135,206,235,0.5);
    color: #ffffff;
}

/* --- Main --- */
.subject-main { padding: 5rem 0 7rem; }

/* --- Module Code Badge --- */
.module-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--color-math), #45b7aa);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}
.module-code-s2 { background: linear-gradient(135deg, #2b7cba, #5da8d9); }

/* ========================================
   VIEW SYSTEM
   ======================================== */
.view { display: none; }
.view.active {
    display: block;
    animation: viewFadeIn 0.4s ease forwards;
}
@keyframes viewFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ========================================
   VIEW 1: MODULE SELECTION
   ======================================== */
.module-select-intro {
    text-align: center;
    margin-bottom: 3rem;
}
.module-select-heading {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 0.6rem;
}
.module-select-sub {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
}

.module-select-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.module-select-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}
.module-select-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-math), #45b7aa);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.msc-s2::before { background: linear-gradient(90deg, #2b7cba, #5da8d9); }

.module-select-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 60, 100, 0.12);
    border-color: rgba(43, 124, 186, 0.2);
}
.module-select-card:hover::before { opacity: 1; }

.msc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.msc-count {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--color-math);
    background: rgba(14, 154, 167, 0.1);
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
}
.msc-count-s2 { color: var(--color-aviation); background: rgba(43,124,186,0.1); }

.msc-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.msc-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.msc-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.msc-topic-tag {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(14, 154, 167, 0.07);
    color: var(--color-math);
    border: 1px solid rgba(14, 154, 167, 0.15);
}
.msc-topic-tag-s2 {
    background: rgba(43, 124, 186, 0.07);
    color: var(--color-aviation);
    border-color: rgba(43, 124, 186, 0.15);
}
.msc-topic-more { opacity: 0.6; }

.msc-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-math);
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    transition: gap 0.2s ease;
}
.module-select-card:hover .msc-cta { gap: 0.75rem; }
.msc-cta-s2 { color: var(--color-aviation); }

/* ========================================
   VIEW 2: RESOURCE CARDS
   ======================================== */
.resource-view-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-muted);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.55rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.back-btn:hover {
    color: var(--color-text);
    border-color: rgba(43, 124, 186, 0.3);
    background: rgba(43, 124, 186, 0.04);
    transform: translateX(-2px);
}

.resource-module-tabs {
    display: flex;
    gap: 0.4rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.3rem;
}
.rmt-btn {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 0.45rem 1.1rem;
    border-radius: 7px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--color-text-muted);
    transition: all 0.2s ease;
}
.rmt-btn:hover { color: var(--color-text); }
.rmt-btn.active {
    background: var(--gradient-main);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(43, 124, 186, 0.3);
}

.resource-module-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
}
.resource-module-name {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 0.2rem;
}
.resource-module-sub {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* --- Resource Cards Section (light blue background) --- */
.resource-cards-section {
    background: #dde9f5;
    border-radius: 24px;
    padding: 2.5rem;
}

.resource-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* --- Individual Resource Card --- */
.resource-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 2px 12px rgba(26, 58, 92, 0.06);
    transition: all 0.3s var(--ease-out);
    cursor: default;
}
.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(26, 58, 92, 0.12);
}

/* --- Resource Card Icons --- */
.rc-icon-wrap {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.25rem;
    flex-shrink: 0;
}
.rc-icon-wrap svg { width: 28px; height: 28px; }

/* Question Bank — rose/pink */
.rc-qb { background: #fce7f3; }
.rc-qb svg { stroke: #be185d; }

/* Practice Exams — slate blue */
.rc-pe { background: #e2e8f0; }
.rc-pe svg { stroke: #1e3a5f; }

/* Key Concepts — violet */
.rc-kc { background: #ede9fe; }
.rc-kc svg { stroke: #6d28d9; }

/* Past Papers — amber/cream */
.rc-pp { background: #fef3c7; }
.rc-pp svg { stroke: #92400e; }
.rc-pp svg polygon { fill: #92400e; }

/* Bootcamps — cool gray */
.rc-bc { background: #f1f5f9; }
.rc-bc svg { stroke: #334155; }

/* Flashcards — light purple */
.rc-fl { background: #f3e8ff; }
.rc-fl svg { stroke: #7c3aed; }

.rc-title {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2e3d;
    letter-spacing: -0.01em;
}

.rc-desc {
    font-size: 0.85rem;
    color: #5a7a92;
    line-height: 1.65;
    flex: 1;
}

.rc-soon {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    margin-top: auto;
    align-self: flex-start;
}

/* ========================================
   CLICKABLE RESOURCE CARDS
   ======================================== */
.resource-card.rc-clickable { cursor: pointer; }

.rc-cta-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #be185d;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
    transition: gap 0.2s ease;
}
.resource-card.rc-clickable:hover .rc-cta-row { gap: 0.65rem; }

/* ========================================
   VIEW 3: TOPIC CARDS
   ======================================== */
.topic-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.topic-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 2px 12px rgba(26, 58, 92, 0.06);
    transition: all 0.3s var(--ease-out);
    cursor: default;
    min-height: 140px;
}
.topic-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(26, 58, 92, 0.10);
}

.topic-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.topic-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-math);
    background: rgba(14, 154, 167, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(14, 154, 167, 0.15);
}

.topic-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a2e3d;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* --- Live topic card (PDF available) --- */
a.topic-card {
    text-decoration: none;
    color: inherit;
}
.topic-card.tc-live {
    cursor: pointer;
    border: 1.5px solid rgba(14, 154, 167, 0.2);
}
.topic-card.tc-live:hover {
    border-color: rgba(14, 154, 167, 0.45);
    box-shadow: 0 12px 32px rgba(14, 154, 167, 0.12);
}

.tc-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--color-math);
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.tc-links {
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(14, 154, 167, 0.15);
}

.tc-cta-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-math);
    text-decoration: none;
    padding: 0.32rem 0;
    border-bottom: 1px solid rgba(14, 154, 167, 0.08);
    transition: gap 0.2s ease;
}
.tc-cta-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.tc-cta-row:hover { gap: 0.65rem; }

/* ========================================
   COURSE INFO SECTION (VIEW 2 — below resource cards)
   ======================================== */
.course-info-section {
    margin-top: 3.5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.cis-heading {
    font-family: var(--font-body);
    font-size: 1.55rem;
    font-weight: 700;
    color: #0d1b2a;
    letter-spacing: -0.01em;
    margin-bottom: 1.1rem;
}

.cis-text {
    font-size: 0.93rem;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.cis-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
    margin-bottom: 2.75rem;
}

.cis-img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    display: block;
}

.cis-paras {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cis-paras p {
    font-size: 0.91rem;
    color: #374151;
    line-height: 1.78;
    margin: 0;
}

.cis-tips {
    list-style: decimal;
    padding-left: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 0;
}

.cis-tips li {
    font-size: 0.91rem;
    color: #374151;
    line-height: 1.72;
    padding-left: 0.25rem;
}

/* ========================================
   ATPL THEORY PAGE
   ======================================== */

/* Header background accent (aviation blue) */
.atpl-header-bg {
    background:
        radial-gradient(ellipse 60% 50% at 70% 50%, rgba(30, 64, 175, 0.2), transparent),
        radial-gradient(ellipse 40% 60% at 20% 80%, rgba(59, 130, 246, 0.1), transparent);
}

/* Module code badge for ATPL subjects */
.module-code-atpl {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    width: auto;
    min-width: 52px;
    padding: 0 0.85rem;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
}

/* ===== Featured: About ATPL card ===== */
.atpl-featured-card {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    background: linear-gradient(135deg, #1e3a5f 0%, #2b6cb0 60%, #3b9fd8 100%);
    border-radius: 24px;
    padding: 2.75rem 3rem;
    cursor: pointer;
    transition: all 0.35s var(--ease-out);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}
.atpl-featured-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -40px;
    width: 320px; height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.07), transparent 65%);
    pointer-events: none;
}
.atpl-featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 28px 64px rgba(30, 64, 175, 0.3);
}

.afc-icon-wrap {
    width: 88px;
    height: 88px;
    background: rgba(255,255,255,0.14);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.15);
}
.afc-icon-wrap svg {
    width: 38px;
    height: 38px;
    stroke: #ffffff;
}

.afc-content { flex: 1; }

.afc-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.67rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 0.22rem 0.8rem;
    margin-bottom: 0.7rem;
}

.afc-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.afc-desc {
    font-size: 0.91rem;
    color: rgba(255,255,255,0.72);
    line-height: 1.7;
    max-width: 560px;
    margin-bottom: 1.4rem;
}

.afc-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 9px;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s ease;
}
.atpl-featured-card:hover .afc-cta {
    background: rgba(255,255,255,0.24);
    gap: 0.65rem;
}

/* ===== Grid intro heading ===== */
.atpl-grid-intro { margin-bottom: 2rem; }

.atpl-grid-heading {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.atpl-grid-sub {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    max-width: 580px;
    line-height: 1.6;
}

/* ===== 13 Subject Cards Grid ===== */
.atpl-subject-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.atpl-subject-card {
    border-radius: 18px;
    padding: 1.5rem 1.4rem;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px var(--color-border);
}
/* White overlay — faintly shows photo */
.atpl-subject-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(255,255,255,0.82);
    transition: background 0.45s ease;
    z-index: 0;
}
/* Hover: overlay → subtle dark gradient for text readability */
.atpl-subject-card:hover::before {
    background: linear-gradient(
        to bottom,
        rgba(15,23,42,0.05) 0%,
        rgba(15,23,42,0.55) 100%
    );
}
.atpl-subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 44px rgba(30,64,175,0.15);
    border-color: transparent;
}
/* Keep all children above the overlay */
.atpl-subject-card > * {
    position: relative;
    z-index: 1;
}

/* Icon wrap */
.asc-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.4s ease;
}
.asc-icon-wrap svg {
    width: 26px;
    height: 26px;
    transition: stroke 0.4s ease;
}
.atpl-subject-card:hover .asc-icon-wrap {
    background: rgba(255,255,255,0.2) !important;
}
.atpl-subject-card:hover .asc-icon-wrap svg {
    stroke: #fff !important;
}

/* Header row: code + title inline */
.asc-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: auto;
}

.asc-code {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-aviation);
    background: rgba(43, 124, 186, 0.1);
    border: 1px solid rgba(43, 124, 186, 0.15);
    border-radius: 4px;
    padding: 0.18rem 0.55rem;
    flex-shrink: 0;
    transition: all 0.4s ease;
}
.atpl-subject-card:hover .asc-code {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}

.asc-title {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.01em;
    line-height: 1.3;
    transition: color 0.4s ease;
}
.atpl-subject-card:hover .asc-title { color: #fff; }

.asc-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.81rem;
    font-weight: 600;
    color: var(--color-aviation);
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--color-border);
    transition: gap 0.2s ease, color 0.4s ease, border-color 0.4s ease;
}
.atpl-subject-card:hover .asc-cta {
    gap: 0.55rem;
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.2);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1100px) {
    .atpl-subject-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .resource-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .topic-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .cis-split {
        grid-template-columns: 1fr;
    }
    .atpl-featured-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.5rem;
    }
    .atpl-subject-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .module-select-grid {
        grid-template-columns: 1fr;
    }
    .resource-cards-grid {
        grid-template-columns: 1fr;
    }
    .topic-cards-grid {
        grid-template-columns: 1fr;
    }
    .resource-cards-section {
        padding: 1.25rem;
    }
    .subject-header {
        padding: 7rem 0 3rem;
    }
    .resource-module-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .cis-split {
        grid-template-columns: 1fr;
    }
    .cis-heading {
        font-size: 1.25rem;
    }
    .atpl-featured-card {
        padding: 1.5rem;
    }
    .afc-title { font-size: 1.5rem; }
    .afc-icon-wrap { width: 64px; height: 64px; }
}
