/* ============================================================
   PURE EDUCATION — Course Page Styles
   Loaded only on single-pe_course.php and archive-pe_course.php
   ============================================================ */

/* ── Course Hero ───────────────────────────────────────────── */
.course-hero {
    background: var(--navy);
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
}
.course-hero-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 75% 30%, rgba(30,58,95,0.9) 0%, transparent 55%),
        radial-gradient(ellipse at 10% 80%, rgba(201,150,58,0.08) 0%, transparent 50%);
}
.course-hero-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 64px 64px;
}
.course-hero-inner {
    position: relative; z-index: 2;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    align-items: center;
}
.course-hero-emoji {
    font-size: 3.5rem; line-height: 1;
    margin-bottom: 1.2rem; display: block;
}
.course-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 300;
    color: var(--white);
    line-height: 1.05;
    margin-bottom: 1.2rem;
    letter-spacing: -0.02em;
}
.course-hero h1 em { font-style: italic; color: var(--gold-light); }
.course-hero-desc {
    color: rgba(255,255,255,0.6);
    font-size: 1.05rem;
    max-width: 520px;
    line-height: 1.75;
    margin-bottom: 2rem;
}

/* Course tag pills */
.course-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.course-tag {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 100px;
    padding: 0.35rem 0.9rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
}
.course-tag strong { color: var(--gold-light); }

/* At-a-glance card */
.course-apply-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}
.course-apply-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
}
.apply-fact {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gray-2);
    font-size: 0.875rem;
}
.apply-fact:last-of-type { border-bottom: none; }
.apply-fact-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
.apply-fact-label {
    color: var(--text-light);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.15rem;
}
.apply-fact-val { color: var(--navy); font-weight: 600; }

/* Breadcrumb */
.page-hero-breadcrumb {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}
.page-hero-breadcrumb a { color: var(--gold-light); transition: color var(--transition-fast); }
.page-hero-breadcrumb a:hover { color: var(--gold); }
.page-hero-breadcrumb .sep { color: rgba(255,255,255,0.3); }

/* ── Sticky Sub-nav ────────────────────────────────────────── */
.course-nav {
    background: var(--white);
    border-bottom: 1px solid var(--gray-2);
    position: sticky;
    top: 76px;
    z-index: 99;
}
.course-nav-inner {
    display: flex; gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.course-nav-inner::-webkit-scrollbar { display: none; }
.cnav-btn {
    padding: 1rem 1.4rem;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-light);
    border-bottom: 2.5px solid transparent;
    transition: all var(--transition-fast);
    white-space: nowrap;
    cursor: pointer;
    background: none;
    border-top: none; border-left: none; border-right: none;
    font-family: var(--font-body);
}
.cnav-btn.active,
.cnav-btn:hover { color: var(--navy); border-bottom-color: var(--gold); }

/* ── Overview Section ──────────────────────────────────────── */
.course-overview { background: var(--cream); }
.overview-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}
.overview-body h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    color: var(--navy); margin-bottom: 1.2rem;
}
.overview-body p { color: var(--text-mid); line-height: 1.8; margin-bottom: 1.2rem; }
.highlights-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}
.highlights-box h4 {
    font-family: var(--font-display);
    font-size: 1.15rem; color: var(--navy);
    margin-bottom: 1.2rem;
}
.highlight-item {
    display: flex; gap: 0.75rem; align-items: flex-start;
    margin-bottom: 1rem; font-size: 0.875rem;
}
.highlight-item:last-child { margin-bottom: 0; }
.hi-icon {
    width: 32px; height: 32px;
    background: var(--gold-pale);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0;
}
.highlight-item strong { display: block; color: var(--navy); margin-bottom: 0.15rem; }
.highlight-item p { color: var(--text-light); line-height: 1.55; }

/* ── Specialisations ───────────────────────────────────────── */
.specialisations { background: var(--white); }
.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 1.2rem;
    margin-top: 2.5rem;
}
.spec-card {
    background: var(--gray-1);
    border-radius: var(--radius-md);
    padding: 1.4rem;
    border: 1.5px solid transparent;
    transition: all var(--transition);
    cursor: default;
}
.spec-card:hover {
    border-color: var(--gold);
    background: var(--gold-pale);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.spec-emoji { font-size: 1.8rem; margin-bottom: 0.75rem; display: block; }
.spec-card h4 { font-size: 0.92rem; font-weight: 600; color: var(--navy); margin-bottom: 0.3rem; }
.spec-card p  { font-size: 0.75rem; color: var(--text-light); line-height: 1.5; }

/* ── Countries Where Offered ───────────────────────────────── */
.course-countries { background: var(--navy); }
.country-option {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: all var(--transition);
}
.country-option:hover {
    background: rgba(201,150,58,0.08);
    border-color: rgba(201,150,58,0.3);
    transform: translateX(4px);
}
.co-flag { font-size: 2.5rem; text-align: center; }
.co-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--white); margin-bottom: 0.3rem;
}
.co-detail { font-size: 0.8rem; color: rgba(255,255,255,0.5); line-height: 1.55; }
.co-meta { text-align: right; }
.co-tuition { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-bottom: 0.4rem; }
.co-tuition strong { color: var(--gold-light); font-size: 1rem; display: block; }
.co-arrow {
    width: 36px; height: 36px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.4);
    margin-left: 1rem; flex-shrink: 0;
    transition: all var(--transition-fast);
    font-style: normal;
}
.country-option:hover .co-arrow {
    background: var(--gold); border-color: var(--gold); color: var(--navy);
}

/* ── Requirements ──────────────────────────────────────────── */
.course-reqs { background: var(--gray-1); }
.req-tabs { display: flex; gap: 0.75rem; margin-bottom: 2rem; }
.req-tab {
    padding: 0.55rem 1.2rem; border-radius: 100px;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-mid);
    border: 1.5px solid var(--gray-2);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--white);
    font-family: var(--font-body);
}
.req-tab.active,
.req-tab:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.req-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.req-block {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.req-block-head {
    background: var(--navy);
    padding: 1.1rem 1.5rem;
    display: flex; align-items: center; gap: 0.75rem;
}
.req-block-head span { font-size: 1.2rem; }
.req-block-head h3 { color: var(--white); font-family: var(--font-display); font-size: 1.1rem; }
.req-block-body { padding: 1.5rem; }
.req-row {
    display: flex; gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gray-2);
    font-size: 0.875rem;
}
.req-row:last-child { border-bottom: none; }
.req-bullet {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--gold-pale); border: 1.5px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; color: var(--gold);
    flex-shrink: 0; margin-top: 0.15rem;
}
.req-row strong { display: block; color: var(--navy); margin-bottom: 0.2rem; }
.req-row p { color: var(--text-light); line-height: 1.55; }

/* ── Partner Universities Table ────────────────────────────── */
.top-unis { background: var(--white); }
.uni-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.uni-table thead { background: var(--navy); }
.uni-table th {
    padding: 1rem 1.2rem;
    text-align: left;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
}
.uni-table td {
    padding: 1rem 1.2rem;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-2);
    color: var(--text-mid);
}
.uni-table tr:last-child td { border-bottom: none; }
.uni-table tr:hover td { background: var(--gray-1); }
.uni-name { color: var(--navy) !important; font-weight: 600; }
.uni-rank {
    display: inline-flex; align-items: center;
    background: var(--gold-pale);
    color: var(--gold); border-radius: 4px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem; font-weight: 600;
}

/* ── Archive Page ──────────────────────────────────────────── */
.course-archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}
.course-archive-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1.5px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    display: block;
}
.course-archive-card:hover {
    border-color: var(--gold);
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.course-archive-thumb {
    aspect-ratio: 16/9;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem;
    position: relative; overflow: hidden;
}
.course-archive-thumb img {
    position: absolute; inset: 0;
    width: 100%; height: 100%; object-fit: cover;
}
.course-archive-thumb::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(13,27,42,0.5));
}
.course-archive-body { padding: 1.5rem; }
.course-archive-body h2 {
    font-family: var(--font-display);
    font-size: 1.2rem; font-weight: 500;
    color: var(--navy); margin-bottom: 0.4rem;
}
.course-archive-body p { font-size: 0.82rem; color: var(--text-light); margin-bottom: 1rem; line-height: 1.6; }
.course-meta-row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.course-meta-chip { display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; color: var(--text-mid); }

/* Pagination */
.pe-pagination { display: flex; justify-content: center; margin-top: 3rem; }
.pe-pagination .page-numbers { display: flex; gap: 0.5rem; list-style: none; padding: 0; }
.pe-pagination .page-numbers li a,
.pe-pagination .page-numbers li span {
    padding: 0.55rem 1rem; border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-2); font-size: 0.875rem;
    color: var(--text-mid); transition: all 0.18s ease; display: block;
}
.pe-pagination .page-numbers li .current,
.pe-pagination .page-numbers li a:hover {
    background: var(--navy); color: var(--white); border-color: var(--navy);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .overview-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .highlights-box { order: -1; }
}
@media (max-width: 900px) {
    .course-hero-inner { grid-template-columns: 1fr; }
    .course-apply-card { margin-top: 2rem; }
    .req-columns { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .country-option { grid-template-columns: 50px 1fr; }
    .co-meta { display: none; }
    .co-arrow { margin-left: 0; }
    .uni-table th:nth-child(4),
    .uni-table td:nth-child(4) { display: none; }
}
@media (max-width: 500px) {
    .country-option { grid-template-columns: 1fr; }
    .co-flag { display: none; }
    .spec-grid { grid-template-columns: 1fr 1fr; }
    .uni-table th:nth-child(5),
    .uni-table td:nth-child(5) { display: none; }
}
