/* ============================================================
   ARTICLE PAGE — STUDY IN CHINA
   Enhanced for professional editorial/article experience
   Untouched: nav, banner, discount, footer, section headings
   ============================================================ */

/* ---------------------- READING PROGRESS BAR ---------------------- */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--brand-red);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ---------------------- BANNER (untouched) ---------------------- */
.about-page-banner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 300px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    position: relative;
}

.about-page-banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 1;
}

.about-page-banner .container-fluid {
    position: relative;
    z-index: 2;
}

.about-page-banner h1 {
    margin-left: 150px;
}

@media (max-width: 576px) {
    .about-page-banner .container-fluid {
        justify-content: flex-start !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .about-page-banner h1 {
        margin-left: 50px;
        font-size: 2rem;
    }
}

/* ---------------------- ARTICLE META BAR ----------------------
   Sits just below the banner — author, date, read time, share.
   Pure addition; banner CSS is not touched.
---------------------------------------------------------------- */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 740px) 300px;
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (min-width: 1400px) {
    .article-layout {
        grid-template-columns: minmax(0, 740px) 340px;
        max-width: 1300px;
        gap: 60px;
    }
}


.article-meta-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 900;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.article-meta-bar .meta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.article-meta-bar .meta-left {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.82rem;
    color: #777;
}

.article-meta-bar .meta-left i {
    color: var(--brand-red);
    margin-right: 4px;
}

.article-meta-bar .meta-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-share span {
    font-size: 0.78rem;
    color: #999;
    margin-right: 4px;
}

.meta-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    color: var(--brand-grey);
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.25s ease;
}

.meta-share a:hover {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 576px) {
    .article-meta-bar .meta-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ---------------------- TOC BOX (untouched links/headings) ---------------------- */
.toc-box h5 {
    color: var(--brand-grey);
}

.toc-link-box {
    width: 50%;
}

@media (max-width: 576px) {
    .toc-link-box {
        width: auto;
    }
}

.toc-link {
    display: block;
    text-decoration: none;
    color: var(--brand-grey);
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: #fff;
}

.toc-link:hover {
    padding: 10px 12px;
    margin-bottom: 10px;
    color: var(--brand-red);
    transform: translateX(5px);
    box-shadow: 0 10px 10px -5px rgba(211, 17, 17, 0.2);
}

html {
    scroll-behavior: smooth;
}

/* ---------------------- ARTICLE LAYOUT WRAPPER ----------------------
   Two-column layout on desktop: main content + sticky sidebar.
   On mobile it collapses to single column.
---------------------------------------------------------------- */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        display: none;
    }
}

@media (min-width: 1400px) {
    .article-layout {
        grid-template-columns: minmax(0, 900px) 380px;
        max-width: 1500px;
        gap: 60px;
        padding: 40px 40px;
    }
}

@media (min-width: 1600px) {
    .article-layout {
        grid-template-columns: minmax(0, 1000px) 420px;
        max-width: 1700px;
        gap: 70px;
        padding: 40px 60px;
    }
}

@media (min-width: 1920px) {
    .article-layout {
        grid-template-columns: minmax(0, 1100px) 460px;
        max-width: 1900px;
        gap: 80px;
        padding: 40px 80px;
    }
}

/* ---------------------- STICKY SIDEBAR ---------------------- */
.article-sidebar {
    position: sticky;
    top: 72px;
    align-self: start;
}

.sidebar-toc-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    padding: 20px 22px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}

.sidebar-toc-card h6 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--brand-red);
    margin-bottom: 14px;
}

.sidebar-toc-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-toc-card ul li {
    border-bottom: 1px solid #f4f4f4;
}

.sidebar-toc-card ul li:last-child {
    border-bottom: none;
}

.sidebar-toc-card ul li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 4px;
    text-decoration: none;
    font-size: 0.83rem;
    color: #555;
    transition: all 0.2s ease;
    line-height: 1.3;
}

.sidebar-toc-card ul li a::before {
    content: '';
    flex-shrink: 0;
    width: 3px;
    height: 3px;
    background: #ccc;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sidebar-toc-card ul li a:hover,
.sidebar-toc-card ul li a.active {
    color: var(--brand-red);
    padding-left: 8px;
}

.sidebar-toc-card ul li a:hover::before,
.sidebar-toc-card ul li a.active::before {
    background: var(--brand-red);
    width: 5px;
    height: 5px;
}

/* CTA card in sidebar */
.sidebar-cta-card {
    background: linear-gradient(135deg, #D31111 0%, #9b0c0c 100%);
    border-radius: 10px;
    padding: 22px 22px;
    color: #fff;
    text-align: center;
}

.sidebar-cta-card h6 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #fff;
}

.sidebar-cta-card p {
    font-size: 0.8rem;
    opacity: 0.88;
    margin-bottom: 16px;
    line-height: 1.5;
}

.sidebar-cta-card a.btn {
    background: #fff;
    color: var(--brand-red);
    font-weight: 700;
    font-size: 0.83rem;
    padding: 9px 20px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.25s ease;
}

.sidebar-cta-card a.btn:hover {
    background: #f5e5e5;
    transform: translateY(-2px);
}

/* ---------------------- ARTICLE CONTENT SECTIONS ----------------------
   Typography, spacing, and visual polish for all .py-4 sections.
   Section background colours (bg-white / bg-light) are preserved.
---------------------------------------------------------------- */

/* Section scroll margin — clears the sticky meta bar */
section[id] {
    scroll-margin-top: 70px;
}

/* Section headings — add a red left-accent line */
section h2.fw-bold {
    position: relative;
    padding-left: 16px;
    font-size: 1.6rem;
    color: #1a1a1a;
}

section h2.fw-bold::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 4px;
    width: 4px;
    background: var(--brand-red);
    border-radius: 2px;
}

/* Sub-headings with emoji */
section h5.fw-bold {
    font-size: 1rem;
    color: #222;
    margin-top: 1.6rem;
}

/* Body paragraphs — already have inline styles, add gentle base */
section p {
    font-size: 1rem;
}

/* Images inside sections — styled consistently */
section .img-fluid.rounded {
    border-radius: 10px !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.10) !important;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
}

/* Image caption helper (optional) */
.img-caption {
    font-size: 0.78rem;
    color: #999;
    text-align: center;
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
}

/* ---------------------- KEY STAT HIGHLIGHT BOXES ----------------------
   Drop these inside sections for quick-glance data.
   Usage: <div class="stat-highlight-row"> ... </div>
---------------------------------------------------------------- */
.stat-highlight-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.stat-highlight-box {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-top: 3px solid var(--brand-red);
    border-radius: 8px;
    padding: 18px 16px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
}

.stat-highlight-box .stat-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--brand-red);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-highlight-box .stat-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---------------------- INLINE CALLOUT / INFO BOX ----------------------
   Usage: <div class="article-callout"> ... </div>
---------------------------------------------------------------- */
.article-callout {
    background: #fff8f8;
    border-left: 4px solid var(--brand-red);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 24px 0;
    font-size: 0.93rem;
    color: #444;
    line-height: 1.6;
}

.article-callout strong {
    color: var(--brand-red);
}

/* ---------------------- MYTH VS REALITY CARDS ----------------------
   Replaces the plain <ul> in section 6 for visual impact.
   Classes to add in the HTML: .myth-card, .reality-card
---------------------------------------------------------------- */
.myth-reality-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

@media (max-width: 576px) {
    .myth-reality-grid {
        grid-template-columns: 1fr;
    }
}

.myth-card,
.reality-card {
    border-radius: 10px;
    padding: 20px;
}

.myth-card {
    background: #fff5f5;
    border: 1px solid #ffd5d5;
}

.reality-card {
    background: #f4fbf7;
    border: 1px solid #b7e4c7;
}

.myth-card h6,
.reality-card h6 {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.myth-card h6 { color: #c0392b; }
.reality-card h6 { color: #1a7a42; }

.myth-card ul,
.reality-card ul {
    padding-left: 18px;
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.7;
    color: #444;
}

/* ---------------------- SCHOLARSHIP TABLE ----------------------
   For section 3 — a clean visual table beats a bullet list.
   Add class="scholarship-table" to a <table> in section 3.
---------------------------------------------------------------- */
.scholarship-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.88rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin: 20px 0;
}

.scholarship-table thead tr {
    background: var(--brand-red);
    color: #fff;
}

.scholarship-table thead th {
    padding: 13px 16px;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.4px;
}

.scholarship-table tbody tr {
    background: #fff;
    transition: background 0.2s ease;
}

.scholarship-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.scholarship-table tbody tr:hover {
    background: #fff5f5;
}

.scholarship-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: #444;
    vertical-align: top;
}

/* ---------------------- CAREER PATHWAY CHIPS ----------------------
   Small pill badges for career outcomes in section 7.
   Usage: <div class="career-chips"> <span>Engineering</span> … </div>
---------------------------------------------------------------- */
.career-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.career-chips span {
    display: inline-block;
    background: #fff0f0;
    color: var(--brand-red);
    border: 1px solid #ffd0d0;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.career-chips span:hover {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
    transform: translateY(-2px);
}

/* ---------------------- SECTION DIVIDER ----------------------
   Visual breathing room between sections.
   Usage: <div class="section-divider"></div>
---------------------------------------------------------------- */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e8e8e8 30%, #e8e8e8 70%, transparent);
    margin: 0;
}

/* ---------------------- CHALLENGES SECTION — ICON ROWS ----------------------
   Adds a styled card wrapper to each h5 + p block in section 5.
   Usage: wrap each block in <div class="challenge-item"> … </div>
---------------------------------------------------------------- */
.challenge-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    margin-bottom: 14px;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.challenge-item:hover {
    box-shadow: 0 6px 20px rgba(211,17,17,0.08);
    transform: translateX(4px);
}

.challenge-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: #fff5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.challenge-content h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.challenge-content p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ---------------------- BACK TO TOP BUTTON ---------------------- */
#back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 42px;
    height: 42px;
    background: var(--brand-red);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(211,17,17,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    background: #b00e0e;
    transform: translateY(-3px);
}

/* ---------------------- DISCOUNT SECTION (untouched) ---------------------- */
.discount {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 50px;
}

.discount__container {
    text-align: center;
}

.discount__container h2 {
    margin-bottom: 2rem;
    font-size: 3rem;
    font-weight: 500;
    font-family: var(--header-font);
    color: var(--white);
}

.discount__container h2 span {
    font-size: 1.5rem;
}

/* ── MOBILE TOC STRIP (visible only below 1024px) ── */
.mobile-toc-strip {
    display: none;
}

@media (max-width: 768px) {
    .discount {
        background-size: cover;
        background-position: center center;
        padding: 40px 20px;
    }

    .discount__container h2 {
        font-size: 1.8rem;
    }

    .discount__container h2 span {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .discount {
        background-size: cover;
        background-position: center center;
        padding: 30px 16px;
    }

    .discount__container h2 {
        font-size: 1.4rem;
    }

    .discount__container h2 span {
        font-size: 1rem;
    }
}


@media (max-width: 576px) {
    section .img-fluid.rounded {
        height: 220px !important;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    section .img-fluid.rounded {
        height: 300px !important;
    }
}


@media (max-width: 1024px) {
    .mobile-toc-strip {
        display: block;
        background: #fff;
        border: 1px solid #f0f0f0;
        border-radius: 10px;
        margin: 20px 16px;
        padding: 16px 18px;
        box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    }

    .mobile-toc-strip h6 {
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 1.4px;
        text-transform: uppercase;
        color: var(--brand-red);
        margin-bottom: 12px;
    }

    .mobile-toc-strip ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .mobile-toc-strip ul li a {
        display: inline-block;
        padding: 5px 12px;
        background: #fff5f5;
        color: var(--brand-grey);
        border: 1px solid #ffd0d0;
        border-radius: 20px;
        font-size: 0.78rem;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-toc-strip ul li a:hover {
        background: var(--brand-red);
        color: #fff;
        border-color: var(--brand-red);
    }
}

/* ── MOBILE STICKY CTA (visible only below 1024px) ── */
.mobile-sticky-cta {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-sticky-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--brand-red);
        color: #fff;
        text-align: center;
        padding: 14px 20px;
        font-weight: 700;
        font-size: 0.95rem;
        text-decoration: none;
        z-index: 998;
        letter-spacing: 0.3px;
        box-shadow: 0 -4px 16px rgba(211,17,17,0.25);
        transition: background 0.2s ease;
    }

    .mobile-sticky-cta:hover {
        background: #b00e0e;
        color: #fff;
    }

    /* Push the back-to-top button above the sticky CTA */
    #back-to-top {
        bottom: 72px;
    }
}

/* Hide the sidebar itself on small/medium screens (already set, kept for clarity) */
@media (max-width: 1024px) {
    .article-sidebar {
        display: none;
    }
}