:root {
    --ink: #020202;
    --ink-soft: #334155;
    --muted: #7A7A7A;
    --paper: #ffffff;
    --soft: #EDEEF3;
    --soft-2: #f4f7fb;
    --green: #61CE70;
    --green-dark: #4caf60;
    --green-soft: #d8f1dc;
    --purple: #63387F;
    --accent: #1d4ed8;
    --accent-dark: #1e40af;
    --accent-soft: #dbeafe;
    --line: #dbe4ef;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    --radius: 14px;
    --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: #ffffff;
    line-height: 1.6;
    font-weight: 400;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

h1, h2, h3, h4 { line-height: 1.25; color: var(--ink); font-family: "Poppins", system-ui, sans-serif; font-weight: 500; }
h1 { font-size: 2.25rem; margin: 0 0 12px; }
h2 { font-size: 1.6rem; margin: 0 0 10px; }
h3 { font-size: 1.2rem; margin: 0 0 8px; }

/* ============ Header ============ */
.site-header {
    background: var(--soft);
    position: sticky;
    top: 0;
    z-index: 50;
    transition: padding 0.3s, background 0.3s;
}
.site-header__bar {
    padding: 18px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: padding 0.3s;
}
.site-header__logo {
    flex: 0 0 auto;
    display: block;
}
.site-header__logo {
    /* Reserved layout box stays a fixed size — shrink animation uses transform */
    width: 280px;
    height: 94px;
    overflow: visible;
    transition: width 0.25s ease, height 0.25s ease;
}
.site-header__logo img {
    width: 280px;
    max-width: none;
    height: auto;
    display: block;
    transform-origin: left top;
    transition: transform 0.25s ease;
    will-change: transform;
}
.site-header__nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
}

.primary-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    row-gap: 4px;
    column-gap: 2px;
}
.primary-nav a {
    display: inline-block;
    padding: 8px 12px;
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.primary-nav a:hover { color: var(--green-dark); }
.primary-nav a[aria-current="page"] { color: var(--green-dark); text-decoration: underline; text-underline-offset: 4px; }

/* Language bar — sits between header and rainbow divider */
.lang-bar {
    background: var(--soft);
    padding: 6px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--ink-soft);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}
.lang-bar__label { font-weight: 500; }
.lang-bar__flags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    align-items: center;
}
.lang-bar__flags a {
    display: inline-flex;
    line-height: 0;
    padding: 2px;
    border-radius: 2px;
}
.lang-bar__flags a img {
    width: 22px;
    height: auto;
    display: block;
}
.lang-bar__flags a[aria-current="true"] { box-shadow: 0 0 0 2px var(--green); }
.lang-bar__arrow--up { display: none; }

/* Sticky shrink — applied by JS with hysteresis (shrink >120, expand <60) to avoid oscillation.
   Logo scales via transform (no layout reflow). Container width/height also shrink so the nav
   reflows to the smaller logo width — but transitions are short and only on the header itself,
   not the page below. */
.site-header.is-shrunk .site-header__logo {
    width: 120px;
    height: 40px;
}
.site-header.is-shrunk .site-header__logo img {
    transform: scale(0.4286); /* 120/280 */
}

.site-header__toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    margin-left: auto;
}
.site-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    margin: 4px 0;
}

/* ============ Layout ============ */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}
.section { margin: 48px 0; }
.section--tight { margin: 28px 0; }
.section__head { text-align: center; margin-bottom: 28px; }
.section__head h2 { color: var(--purple); }
.section__head h2 a { color: inherit; }
.section__head p { color: var(--muted); max-width: 640px; margin: 0 auto; }
.feature h2 { color: var(--purple); }

/* ============ Hero ============ */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 56px 40px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.hero--image {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(29, 78, 216, 0.65)),
        center / cover no-repeat var(--hero-image, none);
}
.hero h1 { color: #fff; max-width: 720px; }
.hero p { color: rgba(255, 255, 255, 0.9); font-size: 1.05rem; max-width: 640px; }
.hero__cta {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 24px;
    background: #fff;
    color: var(--accent-dark) !important;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
}
.hero__cta:hover { background: var(--accent-soft); }
.hero__sub {
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
    padding: 36px 32px;
}
.hero--with-circle {
    background:
        url("/uploads/2022/02/hero-1-circle.png") center right / auto no-repeat,
        linear-gradient(180deg, #EDEEF3 0%, #FFFFFF 100%);
    color: var(--ink);
    padding: 64px 40px;
    border: 1px solid var(--line);
}
.hero--with-circle h1 { color: var(--ink); }
.hero--with-circle p { color: var(--ink-soft); }

/* ============ Cards ============ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card a { text-decoration: none; }
.card__icon { width: 48px; height: 48px; margin-bottom: 12px; }
.card__media {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
}
.card h3 { margin-top: 0; }
.card p { color: var(--ink-soft); margin: 0; }

/* Service cards (homepage) */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.service-card {
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--ink);
    display: flex;
    flex-direction: column;
}
.service-card img { height: 140px; width: 100%; object-fit: cover; }
.service-card__body { padding: 16px 18px; }
.service-card__body h3 { margin: 0 0 6px; }
.service-card__body p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Course icon grid — 10 in a single row on full screen, no borders, tightly packed */
.course-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
}
.course-tile {
    background: transparent;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 12px 6px;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.15s, background 0.15s;
}
.course-tile:hover { transform: translateY(-2px); background: var(--soft); }
.course-tile img { width: 50px; height: 50px; margin: 0 auto 8px; }
.course-tile span { display: block; font-weight: 500; font-size: 0.85rem; line-height: 1.25; }

/* Stats strip */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 28px;
}
.stat { text-align: center; }
.stat__icon {
    display: block;
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
}
.stat__value {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.1;
}
.stat__label { color: var(--muted); font-size: 0.95rem; display: block; }

/* Long-form text block */
.prose { max-width: 780px; margin: 0 auto; }
.prose p {
    margin: 0 0 18px;
    color: var(--ink-soft);
    font-size: 1.05rem;
    line-height: 1.7;
}
.prose p:last-child { margin-bottom: 0; }

/* Rainbow strip — sits between header and page content */
.rainbow-bar {
    height: 10px;
    width: 100%;
    background: linear-gradient(
        to right,
        #DF3013 0%, #DF3013 12.5%,
        #B6246E 12.5%, #B6246E 25%,
        #630048 25%, #630048 37.5%,
        #093589 37.5%, #093589 50%,
        #037953 50%, #037953 62.5%,
        #94BD07 62.5%, #94BD07 75%,
        #EB8700 75%, #EB8700 87.5%,
        #F6B800 87.5%, #F6B800 100%
    );
}

/* Two-column feature */
.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
}
.feature img { border-radius: var(--radius-sm); }
.feature--reverse { direction: rtl; }
.feature--reverse > * { direction: ltr; }

/* Partner filter + cards */
.partner-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}
.partner-filters input,
.partner-filters select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--soft-2);
}
.partner-filters input:focus,
.partner-filters select:focus {
    outline: 2px solid var(--green);
    outline-offset: 1px;
    background: var(--paper);
}
.partner-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1100px) {
    .partner-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
    .partner-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .partner-grid { grid-template-columns: 1fr; }
}
.partner-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.partner-card h3 { margin: 0; font-size: 1.05rem; }
.partner-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--soft-2);
    color: var(--accent-dark);
}
.chip--type { background: var(--green-soft); color: var(--green-dark); }
.partner-card p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.partner-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
    background: var(--paper);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.contact-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.contact-card ul { list-style: none; padding: 0; margin: 0; }
.contact-card li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.contact-card li:last-child { border-bottom: 0; }
.contact-card a { text-decoration: none; font-weight: 600; }
.contact-form label {
    display: block;
    font-weight: 600;
    margin: 12px 0 4px;
    font-size: 0.9rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    background: var(--soft-2);
}
.contact-form textarea { min-height: 120px; resize: vertical; }
.contact-form button {
    margin-top: 16px;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
}
.contact-form button:hover { background: var(--accent-dark); }
.form-status {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 0.95rem;
    line-height: 1.45;
}
.form-status--ok { background: #e6f4ea; color: #1e4d2b; border: 1px solid #b6dfc1; }
.form-status--err { background: #fdecec; color: #8a1f1f; border: 1px solid #f3c0c0; }
.form-status ul { margin: 4px 0 0; padding-left: 20px; }
.contact-form .hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.map-link {
    margin: 16px 0 0;
    font-weight: 600;
}
.map-link a { color: var(--purple); text-decoration: none; }
.map-link a:hover { text-decoration: underline; }

/* CTA strip */
.cta-strip {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: #fff;
    border-radius: var(--radius);
    padding: 36px;
    text-align: center;
}
.cta-strip h2 { color: #fff; }
.cta-strip a {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 28px;
    background: #fff;
    color: var(--accent-dark) !important;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
}

/* ============ Footer ============ */
.site-footer {
    background: linear-gradient(180deg, #ffffff 0%, var(--soft) 100%);
    margin-top: 48px;
    padding: 50px 0 0;
}
.site-footer__columns {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.site-footer__col h4 {
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 20px;
    font-weight: 500;
    margin: 0 0 14px;
    color: var(--ink);
}
.site-footer__brand img {
    width: 200px;
    max-width: 100%;
    height: auto;
    margin-bottom: 16px;
}
.site-footer__social {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.site-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #2552C3;
    transition: opacity 0.2s;
}
.site-footer__social a:nth-child(2) { color: #002B80; }
.site-footer__social a:hover { opacity: 0.7; }
.site-footer__social svg { width: 22px; height: 22px; }
.site-footer__copy {
    font-size: 16px;
    color: var(--ink);
    margin: 0;
}
.site-footer__links,
.site-footer__contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.site-footer__links li,
.site-footer__contact-list li {
    padding: 4px 0;
}
.site-footer__links a {
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.site-footer__links a:hover { color: var(--green); }
.site-footer__contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 6px 0;
    font-family: "Poppins", system-ui, sans-serif;
    font-weight: 500;
    color: var(--ink);
    font-size: 0.95rem;
}
.site-footer__contact-list svg {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--purple);
    margin-top: 3px;
    transition: color 0.2s;
}
.site-footer__contact-list li:hover svg { color: #FF0000; }
.site-footer__contact-list a {
    color: inherit;
    text-decoration: none;
}
.site-footer__base {
    margin-top: 50px;
    padding: 18px 24px;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--line);
}

/* ============ Home: Hero slider ============ */
.home-slider {
    position: relative;
    height: 560px;
    margin: 0 -24px 32px;
    overflow: hidden;
    background: #1a1a1a;
}
.home-slider__track {
    position: absolute;
    inset: 0;
}
.home-slider__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
}
.home-slider__slide.is-active { opacity: 1; z-index: 1; }
.home-slider__bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1);
    will-change: transform;
}
/* Ken Burns: a keyframe animation (not transition) so it runs on first paint
   for the initially-active slide too. Removing .is-active drops the animation
   declaration, snapping bg back to scale(1) ready for the next cycle. */
.home-slider__slide.is-active .home-slider__bg {
    animation: kenBurns 6.3s ease-out forwards;
}
@keyframes kenBurns {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}
.home-slider__slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}
.home-slider__inner {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 60px;
    text-align: center;
}
.home-slider__desc {
    font-size: 1.9rem;
    font-weight: 500;
    line-height: 1.35;
    color: #fff;
    margin: 0 0 24px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.home-slider__cta {
    display: inline-block;
    padding: 12px 28px;
    background: var(--green);
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.home-slider__cta:hover { background: var(--green-dark); }
.home-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    background: rgba(0, 0, 0, 0.35);
    border: 0;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.home-slider__nav:hover { background: rgba(0, 0, 0, 0.6); }
.home-slider__nav--prev { left: 16px; }
.home-slider__nav--next { right: 16px; }
.home-slider__dots {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}
.home-slider__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 0;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.home-slider__dot.is-active { background: #fff; }

/* Banner strip — 4 image cards. On desktop they overlap the hero slightly
   and sit above it via z-index. Mobile resets the overlap. */
.banner-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: -56px 0 48px;
    position: relative;
    z-index: 6;
}
.banner-strip__item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius-sm);
    aspect-ratio: 4 / 3;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
}
.banner-strip__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.banner-strip__item:hover img { transform: scale(1.05); }
/* Color film tint over the image */
.banner-strip__item::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(99, 56, 127, 0.30);
    z-index: 1;
    transition: background 0.2s ease;
}
.banner-strip__item:hover::before { background: rgba(99, 56, 127, 0.12); }
.banner-strip__title {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    font-weight: 600;
    font-size: 1.15rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    margin: 0;
    padding: 0 12px;
}

/* Feature split — 50/50 text + image, light gradient background */
.feature-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    background: linear-gradient(360deg, #FFFFFF 0%, #EDEEF3 100%);
    padding: 60px 32px;
    border-radius: var(--radius);
    margin: 48px 0;
}
.feature-split--white { background: #fff; }
.feature-split--reverse .feature-split__media { order: -1; }
.feature-split__lead {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.85rem;
    margin: 0 0 8px;
}
.feature-split__heading {
    font-size: 1.5rem;
    margin: 0 0 14px;
    color: var(--purple);
}
.feature-split__body p {
    color: var(--ink-soft);
    margin: 0 0 14px;
}
.feature-split__cta {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 22px;
    background: var(--green);
    color: #fff !important;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.feature-split__cta:hover { background: var(--green-dark); }
.feature-split__media img { border-radius: var(--radius-sm); width: 100%; }
/* X-pill cutout: image is masked into two crossed pill shapes (forms an X) */
.feature-split__media--x img {
    border-radius: 0;
    -webkit-mask-image: url('/assets/img/x-pill-mask.svg');
            mask-image: url('/assets/img/x-pill-mask.svg');
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-size: 100% 100%;
            mask-size: 100% 100%;
}

/* Advantages / counter (shared include — used on home + about) */
.advantages { text-align: center; }
.advantages__title {
    font-size: 1.35rem;
    margin: 0 0 32px;
    color: var(--purple);
    font-weight: 500;
}
.counter {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.counter__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.counter__icon {
    width: 50px;
    height: 50px;
    display: block;
}
.counter__value {
    font-size: 2.6rem;
    font-weight: 600;
    color: var(--green);
    line-height: 1.1;
    /* tabular-nums + min-width prevent the count-up animation from reflowing siblings */
    font-variant-numeric: tabular-nums;
    min-width: 6ch;
    text-align: center;
}
.counter__label {
    color: var(--ink-soft);
    font-size: 0.95rem;
    max-width: 200px;
}

/* Blog grid (4 cards) */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--ink);
    transition: transform 0.15s, box-shadow 0.15s;
}
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.blog-card__media {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}
.blog-card__body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card__title {
    font-size: 1rem;
    margin: 0 0 8px;
    line-height: 1.35;
    color: var(--ink);
}
.blog-card__excerpt {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0 0 14px;
    flex: 1;
}
.blog-card__more {
    align-self: flex-start;
    font-size: 0.85rem;
    color: var(--green);
    font-weight: 600;
}
.blog-more {
    text-align: center;
    margin-top: 28px;
}
.blog-more a {
    display: inline-block;
    padding: 10px 26px;
    background: var(--green);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

/* Single post page */
.post { max-width: 820px; margin: 0 auto; padding-bottom: 48px; }
.post-meta { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.post-hero { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); margin-bottom: 24px; }
.post-body { font-size: 1.05rem; line-height: 1.7; color: var(--ink); }
.post-body p { margin: 0 0 18px; }
.post-body ul { padding-left: 22px; margin: 0 0 18px; }
.post-body li { margin-bottom: 6px; }
.post-body video, .post-body figure video {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 12px 0 18px;
    background: #000;
}
.post-body figure { margin: 0 0 18px; }
.post-back {
    display: inline-block;
    margin-top: 8px;
    color: var(--purple);
    text-decoration: none;
    font-weight: 600;
}
.post-back:hover { color: var(--green-dark); }
.post-scores { list-style: none; padding: 0; margin: 0 0 18px; }
.post-scores li {
    display: inline-block;
    background: var(--soft);
    color: var(--ink);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    margin: 0 8px 8px 0;
    font-weight: 500;
}

/* Project detail page */
.project-detail { max-width: 920px; margin: 0 auto 48px; }
.project-detail__hero {
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 24px;
}
.project-detail__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 14px 18px;
    background: var(--soft-2);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    color: var(--ink-soft);
    font-size: 0.95rem;
}
.project-detail__meta strong { color: var(--ink); }
.project-detail__lead {
    font-size: 1.15rem;
    color: var(--ink-soft);
    line-height: 1.6;
    margin: 0 0 24px;
}
.project-detail__body { font-size: 1rem; line-height: 1.7; }
.project-detail__body p { margin: 0 0 16px; }
.project-detail__gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin: 28px 0 8px;
}
.project-detail__gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Page header — purple bar with white H1, used on every interior page (study abroad, about, partners, projects, etc.) */
.page-header {
    background: var(--purple);
    color: #fff;
    border-radius: var(--radius);
    padding: 36px 40px;
    margin-bottom: 32px;
}
.page-header h1 { color: #fff; margin: 0; }
.page-header p { color: rgba(255, 255, 255, 0.92); margin: 8px 0 0; max-width: 720px; }

/* Minimal editorial: white bg, dark text, purple word accent, underline */
.page-header--minimal {
    background: #fff;
    color: var(--ink);
    padding: 28px 0;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
}
.page-header--minimal h1 {
    color: var(--purple);
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    margin: 0;
}
.page-header--minimal p {
    color: var(--muted);
    font-size: 1.05rem;
    margin: 6px 0 0;
    max-width: 720px;
}

/* Small green dot before the title (the picked variant) */
.page-header--minimal.page-header--dot h1::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--green);
    margin-right: 14px;
    vertical-align: middle;
    transform: translateY(-4px);
}

/* Purple CTA strip variant — purple bg, white text, green button */
.cta-strip--purple { background: var(--purple); }
.cta-strip--purple a {
    background: var(--green);
    color: #fff !important;
}
.cta-strip--purple a:hover { background: var(--green-dark); }

/* Pagination — used by partner grid */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    list-style: none;
    padding: 0;
}
.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font: inherit;
    font-size: 0.95rem;
}
.pagination button:hover:not([disabled]):not(.is-active) { background: var(--soft); }
.pagination button.is-active {
    background: var(--purple);
    color: #fff;
    border-color: var(--purple);
    cursor: default;
}
.pagination button[disabled] { opacity: 0.4; cursor: not-allowed; }
.pagination__ellipsis {
    padding: 8px 6px;
    color: var(--muted);
    user-select: none;
}
.pagination__info {
    width: 100%;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

/* Project cards — image background, dark gradient overlay, white text, green CTA */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.project-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    min-height: 320px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
    background-color: #333;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}
.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(99, 56, 127, 0.62) 0%, rgba(99, 56, 127, 0.82) 100%);
    z-index: 1;
}
.project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.project-card > * { position: relative; z-index: 2; }
.project-card h3 { color: #fff; margin: 0 0 10px; font-size: 1.35rem; }
.project-card p { color: rgba(255, 255, 255, 0.92); margin: 0 0 16px; font-size: 0.95rem; }
.project-card__cta {
    align-self: flex-start;
    background: var(--green);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.project-card__cta:hover { background: var(--green-dark); }

/* Interactive course detail — vertical sidebar of course tabs + body content panel */
.course-detail {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}
.course-detail__nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid var(--line);
    padding-right: 8px;
}
.course-tab {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: transparent;
    border: 0;
    border-left: 4px solid transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: 0.95rem;
    color: var(--ink);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.course-tab img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}
.course-tab:hover { background: var(--soft); }
.course-tab.is-active {
    background: rgba(99, 56, 127, 0.08);
    border-left-color: var(--purple);
    color: var(--purple);
    font-weight: 600;
}
.course-detail__nav-label { display: none; }  /* mobile media query reveals it */
.course-detail__content { padding: 4px 8px; }
.course-detail__content h2 { color: var(--purple); margin-top: 0; }
.course-detail__content p { color: var(--ink-soft); }
.course-detail__content [hidden] { display: none; }

/* Partners strip — 3 logos in a row */
.partners-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    align-items: center;
    justify-items: center;
    padding: 24px 0;
}
.partners-strip img {
    max-width: 220px;
    width: 100%;
    height: auto;
}

/* ============ Mobile ============ */
@media (max-width: 900px) {
    .site-header__toggle { display: block; }
    .site-header__logo img { width: 200px; }
    .site-header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 24px;
        gap: 12px;
    }
    .site-header__nav.is-open { display: flex; }
    .primary-nav { flex-direction: column; gap: 2px; }
    .primary-nav a { display: block; padding: 10px 12px; }
    /* Row 1: flags (full width). Row 2: 3-column grid — [label right-justified] [arrow] [label left-justified].
       Arrow stays geometrically centered no matter how long the labels are. */
    .lang-bar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        column-gap: 14px;
        row-gap: 4px;
        padding: 6px 16px;
        align-items: center;
    }
    .lang-bar__flags {
        grid-row: 1;
        grid-column: 1 / -1;
        justify-content: center;
    }
    .lang-bar > .lang-bar__label:first-child {
        grid-row: 2;
        grid-column: 1;
        justify-self: end;
        text-align: right;
    }
    .lang-bar__arrow--up {
        grid-row: 2;
        grid-column: 2;
        display: inline-block;
        color: var(--green);
        font-weight: 700;
        font-size: 1.5rem;
        line-height: 1;
        -webkit-text-stroke: 0.6px currentColor;  /* ~40% chunkier strokes */
    }
    .lang-bar > .lang-bar__label:last-child {
        grid-row: 2;
        grid-column: 3;
        justify-self: start;
        text-align: left;
    }
    .lang-bar__arrow--side { display: none; }
    .feature { grid-template-columns: 1fr; }
    .feature--reverse { direction: ltr; }
    .partner-filters { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .site-footer__columns { grid-template-columns: 1fr; gap: 32px; text-align: center; }
    .site-footer__social { justify-content: center; }
    .site-footer__contact-list li { justify-content: center; }
    h1 { font-size: 1.7rem; }
    .hero { padding: 36px 24px; }
    main { padding: 20px 16px 40px; }
    .home-slider { height: 380px; margin: 0 -16px 24px; }
    .home-slider__inner { padding: 0 50px; }
    .home-slider__desc { font-size: 1.15rem; }
    .home-slider__dots { top: auto; bottom: 18px; }
    .banner-strip { grid-template-columns: repeat(2, 1fr); margin: 24px 0 32px; }
    .course-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .feature-split { grid-template-columns: 1fr; padding: 36px 20px; gap: 24px; }
    .feature-split--reverse .feature-split__media { order: 0; }
    .counter { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; }
    .counter__value { font-size: 2.1rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .partners-strip { grid-template-columns: 1fr; gap: 24px; }
    .page-header { padding: 28px 24px; }
    .project-grid { grid-template-columns: 1fr; }
    .course-detail {
        grid-template-columns: 1fr;
        padding: 16px;
        min-width: 0;
    }
    .course-detail__nav-wrap {
        position: relative;
        min-width: 0;        /* allow grid item to be narrower than its content so the aside actually overflows */
        overflow: hidden;    /* contain pseudo-element fades + clip the aside's right edge cleanly to the wrap */
    }
    .course-detail__nav-label {
        display: block;
        margin: 0 0 8px;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--ink-soft);
    }
    .course-detail__nav {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;   /* legacy iOS momentum */
        gap: 6px;
        padding: 0 0 8px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        scroll-behavior: smooth;
        min-width: 0;
        max-width: 100%;
        scrollbar-color: rgba(99, 56, 127, 0.55) rgba(99, 56, 127, 0.08);
        scrollbar-width: auto;
    }
    /* Beefed-up scrollbar — it's the actual affordance that lets users drag the strip
       (clicking inside the strip on desktop doesn't pan it). */
    .course-detail__nav::-webkit-scrollbar { height: 11px; }
    .course-detail__nav::-webkit-scrollbar-track {
        background: rgba(99, 56, 127, 0.08);
        border-radius: 6px;
    }
    .course-detail__nav::-webkit-scrollbar-thumb {
        background: rgba(99, 56, 127, 0.55);
        border-radius: 6px;
    }
    .course-detail__nav::-webkit-scrollbar-thumb:hover { background: rgba(99, 56, 127, 0.75); }
    /* Edge fades + chevrons sit on the (non-scrolling) wrap, anchored above the
       (now larger) scrollbar so they overlay the tab strip without colliding. */
    .course-detail__nav-wrap::before,
    .course-detail__nav-wrap::after {
        position: absolute;
        bottom: 22px;
        width: 64px;
        height: 78px;
        line-height: 78px;
        text-align: center;
        color: var(--purple);
        font-size: 2.6rem;
        font-weight: 700;
        pointer-events: none;
        z-index: 3;
        opacity: 0;
        transition: opacity 0.4s ease;
        animation: course-nav-chevron-blink 2.4s ease-in-out infinite;
    }
    .course-detail__nav-wrap::before {
        content: "\2039"; /* ‹ */
        left: 0;
        background: linear-gradient(to right, var(--paper) 30%, rgba(255, 255, 255, 0));
    }
    .course-detail__nav-wrap::after {
        content: "\203A"; /* › */
        right: 0;
        background: linear-gradient(to left, var(--paper) 30%, rgba(255, 255, 255, 0));
    }
    /* Right chevron visible until the strip is scrolled to its end. */
    .course-detail__nav-wrap:not(.is-nav-end)::after { opacity: 1; }
    /* Left chevron only after the user (or a deep-link) has moved the strip off its start. */
    .course-detail__nav-wrap.is-nav-scrolled::before { opacity: 1; }
    .course-tab {
        flex-direction: column;
        gap: 6px;
        border-left: 0;
        border-top: 3px solid transparent;     /* top indicator slot — stays in flow whether active or not */
        border-bottom: 0;
        flex-shrink: 0;
        text-align: center;
        width: 92px;
        padding: 8px 6px;
        font-size: 0.78rem;
        border-radius: 0;
    }
    .course-tab img { width: 32px; height: 32px; }
    .course-tab.is-active {
        border-left-color: transparent;
        border-top-color: var(--green);        /* indicator: top + brand green */
        background: transparent;
    }
}

/* Keyframes outside the @media — invalid to nest @keyframes inside @media in older parsers. */
@keyframes course-nav-chevron-blink {
    0%, 100% { filter: opacity(0.5); }
    50%      { filter: opacity(1); }
}
