/* CESRA Theme — Main Stylesheet */

/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
    --c-blue:        #0096c7;
    --c-blue-dark:   #007ba8;
    --c-blue-light:  #48cae4;
    --c-blue-pale:   #e8f6fb;
    --c-red:         #e63946;
    --c-red-dark:    #c1121f;
    --c-dark:        #0a2540;
    --c-dark2:       #0f2e4e;
    --c-mid:         #1e4060;
    --c-grey:        #5f6e80;
    --c-light:       #f5f4f0;
    --c-border:      #e4e2dc;
    --c-white:       #ffffff;
    --c-text:        #1c2d3e;

    --font-head: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius:   8px;
    --shadow:   0 4px 20px rgba(0,0,0,.07);
    --shadow-md: 0 8px 32px rgba(0,0,0,.12);
    --transition: .2s ease;

    --header-h: 72px;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--c-text);
    background: var(--c-white);
    padding-top: var(--header-h);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    color: var(--c-dark);
}
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p  { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Layout utilities ───────────────────────────────────────────────────────── */
.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}
.section {
    padding: 80px 0;
}
.section-alt {
    background: var(--c-light);
}
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p   { color: var(--c-grey); font-size: 1.05rem; }
.section-eyebrow {
    display: inline-block;
    font-family: var(--font-head);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-blue);
    margin-bottom: 10px;
}
.section-footer-link {
    text-align: center;
    margin-top: 40px;
}
.text-center { text-align: center; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 11px 24px;
    border-radius: 6px;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-lg { padding: 14px 30px; font-size: 1rem; }

.btn-primary {
    background: var(--c-blue);
    color: var(--c-white);
    border-color: var(--c-blue);
    box-shadow: 0 4px 14px rgba(0,150,199,.3);
}
.btn-primary:hover { background: var(--c-blue-dark); border-color: var(--c-blue-dark); color: #fff; box-shadow: 0 6px 20px rgba(0,150,199,.4); }

.btn-secondary {
    background: transparent;
    color: var(--c-blue);
    border-color: var(--c-blue);
}
.btn-secondary:hover { background: var(--c-blue); color: #fff; box-shadow: 0 4px 14px rgba(0,150,199,.25); }

.btn-dark {
    background: var(--c-dark);
    color: #fff;
    border-color: var(--c-dark);
}
.btn-dark:hover { background: var(--c-mid); border-color: var(--c-mid); color: #fff; }

.btn-outline {
    background: transparent;
    color: var(--c-white);
    border-color: rgba(255,255,255,.6);
}
.btn-outline:hover { background: rgba(255,255,255,.18); border-color: #fff; color: #fff; }

.btn-ghost {
    background: transparent;
    color: rgba(255,255,255,.8);
    border-color: transparent;
    text-decoration: underline;
}
.btn-ghost:hover { color: #fff; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: #ffffff;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0,60,100,.08), 0 4px 16px rgba(0,60,100,.06);
    transition: box-shadow var(--transition);
}
.site-header.scrolled {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 24px rgba(0,60,100,.12);
}
.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 24px;
}

/* Logo */
.header-logo { flex-shrink: 0; }
.header-logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}
.header-logo-link:hover { text-decoration: none; }
.logo-text {
    font-family: var(--font-head);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--c-dark);
    letter-spacing: .08em;
    line-height: 1;
}
.logo-snowflake {
    font-size: 1.2rem;
    line-height: 1;
    display: inline-block;
}
.logo-snowflake-blue { color: var(--c-blue); filter: drop-shadow(0 0 4px rgba(0,150,199,.4)); }
.logo-snowflake-red  { color: var(--c-red);  filter: drop-shadow(0 0 4px rgba(230,57,70,.4)); }

/* Nav */
.primary-nav { margin-left: auto; }

.nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.nav-list > li {
    display: flex;
    align-items: center;
    list-style: none;
}
.nav-list li a {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    color: rgba(10,37,64,.72);
    font-size: .875rem;
    font-weight: 600;
    border-radius: 5px;
    line-height: 1;
    transition: color var(--transition), background var(--transition);
}
.nav-list li a:hover { color: var(--c-blue); background: rgba(0,150,199,.07); text-decoration: none; }
.nav-list li.current-menu-item > a,
.nav-list li.current_page_item > a { color: var(--c-blue); }

/* Member login CTA in nav */
.nav-list li.nav-cta > a {
    background: var(--c-blue);
    color: #fff;
    padding: 8px 18px;
    border-radius: 20px;
    margin-left: 8px;
    box-shadow: 0 3px 10px rgba(0,150,199,.25);
}
.nav-list li.nav-cta > a:hover { background: var(--c-blue-dark); color: #fff; box-shadow: 0 4px 14px rgba(0,150,199,.35); }

/* Logged-in nav items */
.nav-list li.nav-portal > a {
    background: var(--c-blue-pale);
    color: var(--c-blue);
    padding: 8px 14px;
    border-radius: 5px;
    margin-left: 8px;
    font-weight: 700;
}
.nav-list li.nav-portal > a:hover { background: var(--c-blue); color: #fff; }
.nav-list li.nav-logout > a {
    color: rgba(10,37,64,.38);
    font-size: .8rem;
    padding: 8px 10px;
}
.nav-list li.nav-logout > a:hover { color: var(--c-red); background: rgba(230,57,70,.07); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: rgba(10,37,64,.65);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    background: #ffffff;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(0,150,199,.12) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    pointer-events: none;
    opacity: .6;
}
.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--c-blue), var(--c-red));
}
.hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 80px 24px;
    max-width: 900px;
    margin: 0 auto;
}
.hero-logo-wrap { margin-bottom: 24px; }
.hero-logo-wrap img {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    filter: drop-shadow(0 8px 32px rgba(0,150,199,.2));
}
.hero-logo-text {
    font-family: var(--font-head);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    background: linear-gradient(90deg, var(--c-blue), var(--c-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: .08em;
    line-height: 1;
}
.hero-sub-brand {
    font-family: var(--font-head);
    font-size: .8rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--c-grey);
    margin-top: 8px;
}
.hero-divider {
    width: 200px;
    height: 3px;
    background: linear-gradient(90deg, var(--c-blue), var(--c-red));
    margin: 28px auto;
    border-radius: 2px;
}
.hero-headline {
    color: var(--c-dark);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 16px;
}
.hero-sub {
    color: var(--c-grey);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.hero-overlay { display: none; }

/* ── About section ──────────────────────────────────────────────────────────── */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 64px;
    align-items: center;
}
.about-text .section-eyebrow { display: block; margin-bottom: 10px; }
.about-text h2 { margin-bottom: 20px; }
.about-body {
    font-size: 1.05rem;
    color: var(--c-grey);
    margin-bottom: 28px;
    line-height: 1.75;
}
.about-stat-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.about-stat {
    background: var(--c-blue);
    padding: 32px 24px;
    text-align: center;
}
.about-stat:nth-child(1) { background: var(--c-blue); }
.about-stat:nth-child(2) { background: var(--c-dark); }
.about-stat:nth-child(3) { background: var(--c-red); }
.about-stat:nth-child(4) { background: #1ab3d9; }
.about-stat-num {
    display: block;
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}
.about-stat-label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.72);
}

/* ── Grades ─────────────────────────────────────────────────────────────────── */
.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.grade-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-top: 4px solid var(--c-blue);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: var(--shadow);
}
.grade-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}
.grade-card:nth-child(2) { border-top-color: var(--c-blue-light); }
.grade-card:nth-child(3) { border-top-color: var(--c-red); }
.grade-card:nth-child(4) { border-top-color: #7c3aed; }
.grade-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 16px;
    color: var(--c-blue);
}
.grade-card:nth-child(2) .grade-icon { color: #1ab3d9; }
.grade-card:nth-child(3) .grade-icon { color: var(--c-red); }
.grade-card:nth-child(4) .grade-icon { color: #7c3aed; }
.grade-icon svg { width: 100%; height: 100%; }
.grade-card h3 { margin-bottom: 6px; font-size: 1.05rem; }
.grade-who {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--c-blue);
    margin-bottom: 12px;
}
.grade-card:nth-child(2) .grade-who { color: #1ab3d9; }
.grade-card:nth-child(3) .grade-who { color: var(--c-red); }
.grade-card:nth-child(4) .grade-who { color: #7c3aed; }
.grade-desc {
    font-size: .875rem;
    color: var(--c-grey);
    line-height: 1.6;
    margin-bottom: 20px;
}
.grade-link {
    font-size: .875rem;
    font-weight: 600;
    color: var(--c-blue);
}
.grade-link:hover { text-decoration: underline; }

/* ── Benefits ───────────────────────────────────────────────────────────────── */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.benefit-card {
    padding: 28px 24px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-white);
    box-shadow: var(--shadow);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.benefit-card:hover {
    border-color: var(--c-blue);
    box-shadow: 0 8px 28px rgba(0,150,199,.13);
    transform: translateY(-3px);
}
.benefit-icon {
    width: 44px;
    height: 44px;
    color: var(--c-blue);
    margin-bottom: 16px;
    background: #e8f6fb;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}
.benefit-icon svg { width: 100%; height: 100%; }
.benefit-card h3 { margin-bottom: 10px; font-size: 1rem; }
.benefit-card p  { font-size: .875rem; color: var(--c-grey); line-height: 1.6; margin: 0; }

/* ── Join CTA ───────────────────────────────────────────────────────────────── */
.section-cta {
    background: linear-gradient(135deg, #0077a8 0%, #0096c7 55%, #1ab3d9 100%);
    position: relative;
    overflow: hidden;
}
.section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 40% 80% at 5% 50%, rgba(255,255,255,.14) 0%, transparent 60%),
        radial-gradient(ellipse 35% 60% at 95% 50%, rgba(255,255,255,.08) 0%, transparent 60%);
    pointer-events: none;
}
.cta-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}
.cta-text h2 {
    color: #fff;
    margin-bottom: 10px;
    font-size: clamp(1.4rem, 3vw, 2rem);
}
.cta-text p { color: rgba(255,255,255,.85); margin: 0; font-size: 1.05rem; }
.cta-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ── News cards ─────────────────────────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}
.news-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card-img {
    display: block;
    height: 180px;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.news-card-img-placeholder {
    background: linear-gradient(135deg, var(--c-blue-pale), #c8ecf7);
}
.news-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.news-date {
    display: block;
    font-size: .78rem;
    font-weight: 600;
    color: var(--c-blue);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 8px;
}
.news-card-body h2,
.news-card-body h3 { font-size: 1rem; margin-bottom: 10px; line-height: 1.35; }
.news-card-body h2 a,
.news-card-body h3 a { color: var(--c-text); }
.news-card-body h2 a:hover,
.news-card-body h3 a:hover { color: var(--c-blue); text-decoration: none; }
.news-card-body p { font-size: .875rem; color: var(--c-grey); flex: 1; margin-bottom: 16px; }
.news-read-more { font-size: .875rem; font-weight: 600; color: var(--c-blue); margin-top: auto; }
.news-read-more:hover { text-decoration: underline; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--c-dark); color: rgba(255,255,255,.75); }

.footer-top { padding: 64px 0 48px; }
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
}
.footer-logo { margin-bottom: 16px; }
.footer-logo .logo-text { font-size: 1.4rem; color: #fff; }
.footer-logo .logo-snowflake-blue { color: var(--c-blue-light); }
.footer-logo .logo-snowflake-red  { color: var(--c-red); }
.footer-brand p { font-size: .875rem; color: rgba(255,255,255,.5); line-height: 1.7; }

.footer-col h4 {
    font-family: var(--font-head);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.38);
    margin-bottom: 16px;
}
.footer-nav-list li { margin-bottom: 10px; }
.footer-nav-list a {
    font-size: .875rem;
    color: rgba(255,255,255,.62);
    transition: color var(--transition);
}
.footer-nav-list a:hover { color: var(--c-blue-light); text-decoration: none; }

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .875rem;
    color: rgba(255,255,255,.62);
}
.footer-contact svg { flex-shrink: 0; margin-top: 2px; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 20px 0;
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom p,
.footer-legal { font-size: .8rem; color: rgba(255,255,255,.32); }
.footer-legal a { color: rgba(255,255,255,.42); }
.footer-legal a:hover { color: rgba(255,255,255,.7); text-decoration: none; }

/* Skillsure credit badge */
.footer-skillsure {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
}
.footer-skillsure:hover { text-decoration: none; }
.footer-skillsure-label {
    font-size: .72rem;
    color: rgba(255,255,255,.32);
    white-space: nowrap;
}
.footer-skillsure-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,150,199,.15);
    border: 1px solid rgba(0,150,199,.28);
    color: rgba(72,202,228,.9);
    padding: 4px 12px 4px 9px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 700;
    font-family: var(--font-head);
    white-space: nowrap;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.footer-skillsure:hover .footer-skillsure-badge {
    background: rgba(0,150,199,.28);
    border-color: rgba(72,202,228,.5);
    color: #48cae4;
}

/* ── Generic page / post content ────────────────────────────────────────────── */
.page-main { min-height: 60vh; }
.page-container { padding-top: 56px; padding-bottom: 80px; max-width: 860px; }
.page-header { margin-bottom: 32px; }
.page-title { margin-bottom: 12px; }
.page-title-bar {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--c-blue), var(--c-red));
    border-radius: 2px;
    transition: width .4s ease;
}
body.page .page-title { font-size: clamp(1.6rem, 4vw, 2.4rem); }
body.page .page-title-bar { width: 120px; }
.page-body { font-size: 1.05rem; line-height: 1.75; color: #334; }
.page-body h2 { margin: 2rem 0 1rem; }
.page-body h3 { margin: 1.5rem 0 .75rem; }
.page-body ul, .page-body ol { margin: 0 0 1rem 1.5rem; list-style: revert; }
.page-body li { margin-bottom: .4rem; }
.page-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.page-body a { color: var(--c-blue); }

.post-thumbnail { margin-bottom: 32px; }
.post-thumbnail img { border-radius: var(--radius); width: 100%; max-height: 400px; object-fit: cover; }
.post-meta-top { font-size: .85rem; color: var(--c-grey); margin-bottom: 10px; font-weight: 500; }
.post-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--c-border); }

/* Pagination */
.posts-pagination { margin-top: 48px; }
.posts-pagination .nav-links { display: flex; gap: 8px; justify-content: center; }
.posts-pagination a, .posts-pagination span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--c-border);
    border-radius: 5px;
    font-size: .875rem;
    color: var(--c-text);
}
.posts-pagination a:hover { border-color: var(--c-blue); color: var(--c-blue); text-decoration: none; }
.posts-pagination .current { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }

/* 404 */
.error-404 { padding: 80px 0; }
.error-code {
    font-family: var(--font-head);
    font-size: clamp(5rem, 15vw, 10rem);
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(90deg, var(--c-blue), var(--c-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}
.error-404 h1 { margin-bottom: 16px; }
.error-404 p  { color: var(--c-grey); margin-bottom: 32px; font-size: 1.1rem; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-brand { grid-column: span 2; }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-stat-block { max-width: 400px; }
}

@media (max-width: 768px) {
    :root { --header-h: 64px; }

    /* Mobile nav */
    .nav-toggle { display: flex; }

    .primary-nav {
        position: absolute;
        top: var(--header-h);
        left: 0;
        width: 100%;
        background: #ffffff;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        box-shadow: 0 8px 24px rgba(0,60,100,.12);
        border-top: 1px solid var(--c-border);
    }
    .primary-nav.open { max-height: 500px; }

    .nav-list { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 16px 20px; }
    .nav-list li a { padding: 12px 16px; border-radius: 6px; font-size: 1rem; color: var(--c-text); }
    .nav-list li a:hover { color: var(--c-blue); background: rgba(0,150,199,.07); }
    .nav-list li.nav-cta { margin-top: 8px; }
    .nav-list li.nav-cta > a { margin-left: 0; text-align: center; border-radius: 8px; }
    .nav-list li.nav-portal { margin-top: 8px; }
    .nav-list li.nav-portal > a { margin-left: 0; text-align: center; color: var(--c-blue); }
    .nav-list li.nav-logout > a { text-align: center; color: rgba(10,37,64,.4); }

    /* Sections */
    .section { padding: 60px 0; }
    .grades-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .benefits-grid { grid-template-columns: 1fr; }
    .cta-inner { flex-direction: column; text-align: center; }
    .cta-actions { justify-content: center; }
    .news-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: auto; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .hero-inner { padding: 60px 24px; }
    .hero-logo-wrap img { max-width: 320px; }
    .hero-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
    .grades-grid { grid-template-columns: 1fr; }
    .about-stat-block { grid-template-columns: 1fr 1fr; }
    .section-header { margin-bottom: 36px; }
}

/* ── Cookie Notice ─────────────────────────────────────────────────────────── */
.cesra-cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border-top: 3px solid var(--c-blue);
    box-shadow: 0 -4px 24px rgba(0,60,100,.12);
    transform: translateY(100%);
    transition: transform .3s ease;
}
.cesra-cookie-notice.cesra-cookie-visible { transform: translateY(0); }
.cesra-cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.cesra-cookie-text {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}
.cesra-cookie-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.4; }
.cesra-cookie-text p {
    margin: 0;
    font-size: .85rem;
    color: var(--c-text);
    line-height: 1.5;
}
.cesra-cookie-link { color: var(--c-blue); text-decoration: underline; }
.cesra-cookie-link:hover { color: var(--c-blue-dark); }
.cesra-cookie-btn {
    flex-shrink: 0;
    background: var(--c-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    padding: 10px 22px;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
}
.cesra-cookie-btn:hover { background: var(--c-blue-dark); }
@media (max-width: 600px) {
    .cesra-cookie-inner { flex-direction: column; gap: 12px; }
    .cesra-cookie-btn { width: 100%; }
}

/* ── Legal Pages ───────────────────────────────────────────────────────────── */
.cesra-legal {
    font-family: Calibri, Candara, 'Segoe UI', Optima, Arial, sans-serif;
    font-size: 1.06rem;
    color: #2a3545;
    line-height: 1.82;
}

/* Meta bar — "Last updated | Print" */
.cesra-legal-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: .8rem;
    color: var(--c-grey);
    background: var(--c-light);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 28px;
}

/* Print pill button */
.cesra-legal-print {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--c-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: .78rem;
    padding: 3px 12px;
    border: 1px solid var(--c-blue);
    border-radius: 20px;
    transition: background var(--transition), color var(--transition);
}
.cesra-legal-print:hover { background: var(--c-blue); color: #fff; }

/* Intro summary box */
.cesra-legal-intro {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3fb 100%);
    border-left: 5px solid var(--c-blue);
    padding: 18px 22px;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 36px;
    box-shadow: 0 2px 10px rgba(0,150,199,.07);
}
.cesra-legal-intro p { margin: 0 0 10px; font-size: 1rem; }
.cesra-legal-intro p:last-child { margin: 0; }

/* Amber note / advisory box */
.cesra-legal-note {
    font-size: .875rem;
    color: #6b4c00;
    background: #fffbeb;
    border-left: 4px solid #f0b429;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 12px 16px;
    margin-top: 12px;
    line-height: 1.6;
}

/* Section headings */
.cesra-legal h2 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-dark);
    background: linear-gradient(to right, rgba(0,150,199,.08) 0%, rgba(0,150,199,.02) 60%, transparent 100%);
    border-left: 4px solid var(--c-blue);
    margin: 44px 0 16px;
    padding: 10px 16px;
    border-radius: 0 var(--radius) var(--radius) 0;
    letter-spacing: .01em;
}

.cesra-legal h3 {
    font-family: var(--font-head);
    font-size: .9rem;
    font-weight: 700;
    color: var(--c-blue);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin: 24px 0 8px;
}

.cesra-legal p { margin: 0 0 14px; }
.cesra-legal ul,
.cesra-legal ol { margin: 0 0 18px; padding-left: 24px; }
.cesra-legal li { margin-bottom: 7px; }
.cesra-legal a { color: var(--c-blue); text-decoration: underline; }
.cesra-legal a:hover { color: var(--c-blue-dark); }
.cesra-legal strong { font-weight: 700; }
.cesra-legal em { font-style: italic; color: #555; }
.cesra-legal code {
    font-family: 'Courier New', Courier, monospace;
    font-size: .82em;
    background: var(--c-light);
    border: 1px solid var(--c-border);
    padding: 1px 6px;
    border-radius: 3px;
}

/* Data tables */
.cesra-legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
    margin: 18px 0 28px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.cesra-legal-table th {
    background: var(--c-dark);
    color: #fff;
    text-align: left;
    padding: 11px 16px;
    font-family: var(--font-head);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.cesra-legal-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--c-border);
    vertical-align: top;
}
.cesra-legal-table tr:last-child td { border-bottom: none; }
.cesra-legal-table tr:nth-child(even) td { background: var(--c-light); }
.cesra-legal-table tr:hover td { background: #e4f4fc; transition: background .15s; }
.cesra-legal-table code { font-size: .78rem; }

.page-body .cesra-legal:first-child { margin-top: -8px; }

/* Print */
@media print {
    .cesra-cookie-notice,
    .site-header,
    .site-footer { display: none !important; }
    .cesra-legal { font-size: .95rem; line-height: 1.65; }
    .cesra-legal h2 { background: none !important; border-left: 3px solid #0096c7; color: #000; page-break-after: avoid; }
    .cesra-legal h3 { color: #000; page-break-after: avoid; }
    .cesra-legal-table th { background: #0a2540 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .cesra-legal-meta { background: none; border: none; padding: 0; font-size: .75rem; }
    .cesra-legal-print { display: none; }
    .cesra-legal-intro { background: none; border-left: 3px solid #0096c7; box-shadow: none; }
}

@media (max-width: 600px) {
    .cesra-legal { font-size: 1rem; }
    .cesra-legal h2 { font-size: 1rem; }
    .cesra-legal-meta { flex-direction: column; align-items: flex-start; }
    .cesra-legal-table { font-size: .82rem; }
    .cesra-legal-table th,
    .cesra-legal-table td { padding: 9px 12px; }
    .cesra-legal-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* ── News Page (home.php) ──────────────────────────────────────────────────── */
.news-page-header {
    background: var(--c-light);
    border-bottom: 3px solid var(--c-blue);
    padding: 56px 0 40px;
    margin-bottom: 0;
}
.news-page-title {
    font-family: var(--font-head);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: var(--c-dark);
    margin: 0 0 10px;
}
.news-page-sub {
    color: var(--c-grey);
    font-size: 1rem;
    margin: 0;
}
.news-container { padding-top: 36px; padding-bottom: 80px; }

/* Category filter pills */
.news-cat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}
.news-cat-pill {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: .8rem;
    font-weight: 600;
    font-family: var(--font-head);
    color: var(--c-grey);
    background: var(--c-light);
    border: 1px solid var(--c-border);
    text-decoration: none;
    transition: all var(--transition);
}
.news-cat-pill:hover,
.news-cat-pill.active { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }

/* News grid */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

/* News card — enhanced */
.news-card {
    background: var(--c-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--c-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-card-img-link { display: block; }
.news-card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    display: block;
    transition: opacity var(--transition);
}
.news-card-img-link:hover .news-card-img { opacity: .92; }
.news-card-img-placeholder {
    background: linear-gradient(135deg, var(--c-blue-pale), #c8ecf7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-card-placeholder-icon { font-size: 2.5rem; opacity: .3; }
.news-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}
.news-card-cats { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.news-cat-tag {
    font-size: .72rem;
    font-weight: 700;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--c-blue);
    background: rgba(0,150,199,.09);
    padding: 2px 9px;
    border-radius: 20px;
    text-decoration: none;
}
.news-cat-tag:hover { background: var(--c-blue); color: #fff; }
.news-date {
    display: block;
    font-size: .78rem;
    color: var(--c-grey);
    font-weight: 500;
    margin-bottom: 8px;
}
.news-card-title { font-size: 1rem; font-weight: 700; line-height: 1.35; margin: 0 0 10px; }
.news-card-title a { color: var(--c-text); text-decoration: none; }
.news-card-title a:hover { color: var(--c-blue); }
.news-card-excerpt { font-size: .875rem; color: var(--c-grey); flex: 1; margin: 0 0 16px; line-height: 1.6; }
.news-read-more { font-size: .875rem; font-weight: 600; color: var(--c-blue); text-decoration: none; margin-top: auto; }
.news-read-more:hover { text-decoration: underline; }

/* Empty state */
.news-empty {
    text-align: center;
    padding: 80px 24px;
    color: var(--c-grey);
}
.news-empty-icon { font-size: 3rem; display: block; margin-bottom: 16px; opacity: .4; }
.news-empty h2 { font-size: 1.4rem; color: var(--c-dark); margin: 0 0 8px; }
.news-empty p { margin: 0; }
.no-posts { color: var(--c-grey); font-size: 1rem; padding: 40px 0; text-align: center; }

@media (max-width: 900px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-page-header { padding: 36px 0 28px; }
}

/* ── Industry Resources ─────────────────────────────────────────────────────── */
.cesra-resources { font-family: var(--font-body); }

.cesra-resources-disclaimer {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #f6d860;
    border-left: 5px solid #f0b429;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 14px 18px;
    margin-bottom: 32px;
}
.cesra-resources-disclaimer-icon { font-size: 1.3rem; flex-shrink: 0; line-height: 1.4; }
.cesra-resources-disclaimer p { margin: 0; font-size: .875rem; color: #6b4c00; line-height: 1.6; }

.cesra-res-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 36px;
}
.cesra-res-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    font-family: var(--font-head);
    color: var(--c-grey);
    background: var(--c-light);
    border: 1px solid var(--c-border);
    text-decoration: none;
    transition: all var(--transition);
}
.cesra-res-cat-pill:hover,
.cesra-res-cat-pill.active { background: var(--c-blue); color: #fff; border-color: var(--c-blue); }

.cesra-res-group { margin-bottom: 48px; }
.cesra-res-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-head);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-dark);
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-border);
}
.cesra-res-group-icon { font-size: 1.3rem; }

.cesra-res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.cesra-res-card {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition);
    overflow: hidden;
}
.cesra-res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cesra-res-card-body { padding: 20px 20px 12px; flex: 1; }
.cesra-res-card-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
}
.cesra-res-card-title a { color: var(--c-text); text-decoration: none; }
.cesra-res-card-title a:hover { color: var(--c-blue); }
.cesra-res-ext-icon { font-size: .75em; color: var(--c-blue); margin-left: 3px; }
.cesra-res-card-desc { font-size: .875rem; color: var(--c-grey); margin: 0 0 10px; line-height: 1.55; }
.cesra-res-card-note {
    font-size: .8rem;
    color: #7a5c00;
    background: #fffbeb;
    border-left: 3px solid #f0b429;
    padding: 6px 10px;
    border-radius: 0 4px 4px 0;
    margin: 0;
}
.cesra-res-card-footer {
    padding: 12px 20px 16px;
    border-top: 1px solid var(--c-border);
}
.cesra-res-btn {
    display: inline-block;
    padding: 8px 18px;
    background: var(--c-blue);
    color: #fff;
    border-radius: var(--radius);
    font-size: .82rem;
    font-weight: 700;
    font-family: var(--font-head);
    text-decoration: none;
    transition: background var(--transition);
}
.cesra-res-btn:hover { background: var(--c-blue-dark); color: #fff; }
.cesra-resources-empty { color: var(--c-grey); padding: 40px 0; text-align: center; }

@media (max-width: 600px) {
    .cesra-res-grid { grid-template-columns: 1fr; }
    .cesra-res-cats { gap: 6px; }
}

/* ── Homepage: Featured Events section ────────────────────────────────────── */
.cesra-hp-featured-section {
    padding: 72px 0 60px;
    background: var(--c-light);
}
.cesra-hp-featured-hdr {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.cesra-hp-featured-title {
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--c-dark);
    margin: 0;
}
.cesra-hp-featured-all {
    font-size: .9rem;
    font-weight: 600;
    color: var(--c-blue);
    text-decoration: none;
    white-space: nowrap;
}
.cesra-hp-featured-all:hover { text-decoration: underline; }
