/* XGRR public website - base design system.
   Replaces the old theme stack (bootstrap.css + style.css + responsive.css +
   color-1.css, ~400 KB) with one small stylesheet: tokens, base typography,
   the few grid/utility classes the module pages use, header, page hero,
   home sections and footer. Components for module pages live in
   public-site.css. No JS framework needed (see xgrr-ui.js). */

:root {
    --navy: #0f2747;
    --navy-2: #173a66;
    --brand: #3f63cf;
    --brand-2: #5076db;
    --brand-soft: #eaf0fd;
    --accent: #f2b544;
    --ink: #172033;
    --muted: #5b6578;
    --line: #e6e9f0;
    --soft: #f5f7fb;
    --white: #fff;
    /* surfaces + text that switch with the theme (dark values below) */
    --bg: #fff;
    --surface: #fff;
    --heading: var(--navy);
    --brand-text: var(--brand);
    --link-hover: var(--navy-2);
    --input-bg: #fff;
    --input-border: #cfd5e1;
    --card-hover-border: #cfd9f4;
    --footer-bg: #0b1d36;
    --scroll-thumb: #c9d3ea;
    --placeholder: #c3cbe0;
    --deadline: #b45309;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(15, 39, 71, .06), 0 1px 3px rgba(15, 39, 71, .08);
    --shadow: 0 10px 30px -12px rgba(15, 39, 71, .25);
    --header-h: 72px;
    --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Dark theme: set on <html> before paint by template/vw_theme_init.php.
   --navy keeps its value: it is also the header / hero background. */
html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1524;
    --surface: #14223a;
    --soft: #101c30;
    --line: #26385a;
    --ink: #dde5f2;
    --muted: #a3b1c9;
    --heading: #f1f5fc;
    --brand-text: #9bb3ff;
    --link-hover: #c9d6ff;
    --brand-soft: #1c2c4f;
    --input-bg: #0f1a2d;
    --input-border: #3a4f74;
    --card-hover-border: #3d5a8c;
    --footer-bg: #060e1a;
    --scroll-thumb: #3a4f74;
    --placeholder: #3e5275;
    --deadline: #fbbf24;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 1px 3px rgba(0, 0, 0, .4);
    --shadow: 0 12px 30px -12px rgba(0, 0, 0, .7);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img, svg, video, iframe { max-width: 100%; }
img { height: auto; vertical-align: middle; }
a { color: var(--brand-text); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4, h5, h6, .h4, .h5, .h6 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; color: var(--heading); letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }
h4, .h4 { font-size: 1.15rem; }
h5, .h5 { font-size: 1.05rem; }
h6, .h6 { font-size: .95rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
button, input, select, textarea { font: inherit; color: inherit; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
::selection { background: var(--brand-soft); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout + the small Bootstrap subset the module pages use ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.row > * { width: 100%; padding: 0 12px; }
.col-12 { flex: 0 0 100%; }
@media (min-width: 768px) {
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
}
@media (min-width: 992px) {
    .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
    .mt-lg-0 { margin-top: 0 !important; }
    .mt-lg-5 { margin-top: 3rem !important; }
}
.d-flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .flex-column { flex-direction: column; }
.align-items-center { align-items: center; } .gap-2 { gap: .5rem; } .gap-3 { gap: 1rem; }
.h-100 { height: 100%; } .text-center { text-align: center; } .text-muted { color: var(--muted); }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: .25rem !important; } .mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; } .mb-4 { margin-bottom: 1.5rem !important; } .mb-5 { margin-bottom: 3rem !important; }
.mt-2 { margin-top: .5rem !important; } .mt-3 { margin-top: 1rem !important; } .mt-4 { margin-top: 1.5rem !important; } .mt-5 { margin-top: 3rem !important; }
.me-2 { margin-right: .5rem; } .img-fluid { max-width: 100%; height: auto; }

.form-control { display: block; width: 100%; padding: .65rem .85rem; font-size: 1rem; line-height: 1.5; color: var(--ink); background: var(--input-bg); border: 1px solid var(--input-border); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
.form-control:focus { outline: 0; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(80, 118, 219, .18); }
textarea.form-control { min-height: 120px; resize: vertical; }
select.form-control { appearance: auto; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .7rem 1.35rem; border-radius: 999px; border: 1px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1.2; cursor: pointer; text-decoration: none !important; transition: background-color .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--navy); box-shadow: 0 8px 20px -10px rgba(242, 181, 68, .9); }
.btn-primary:hover { background: #f6c362; color: var(--navy); }
.btn-ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .45); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: #fff; color: var(--navy); }
.btn-brand { background: var(--brand); color: #fff; }
.btn-brand:hover { background: var(--navy-2); color: #fff; }
.btn-outline { background: var(--surface); color: var(--brand-text); border-color: var(--brand-text); }
.btn-outline:hover { background: var(--brand); color: #fff; }

/* ---------- skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; background: #fff; color: var(--navy); padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; }

/* ---------- header ---------- */
/* The blur sits on a pseudo-element: backdrop-filter on the header itself would
   become the containing block of the fixed mobile menu and clip it. */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 1000; height: var(--header-h); transition: box-shadow .25s; }
.site-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(15, 39, 71, .92); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); transition: background-color .25s; }
.site-header.is-scrolled { box-shadow: 0 6px 24px -10px rgba(0, 0, 0, .45); }
.site-header.is-scrolled::before, .nav-open .site-header::before { background: rgba(15, 39, 71, .98); }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.nav-toggle { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .25s, background-color .25s; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; } .nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

.main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: var(--navy); overflow-y: auto; padding: 12px 20px 32px; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility .3s; }
.nav-open .main-nav { transform: none; visibility: visible; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.nav-link, .nav-trigger { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; padding: 14px 6px; color: #e6ecf8; font-weight: 600; font-size: 1rem; background: none; border: 0; text-align: left; cursor: pointer; text-decoration: none !important; }
.nav-link:hover, .nav-trigger:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-search { justify-content: flex-start; gap: 10px; }
@media (min-width: 992px) { .nav-search .nav-search-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.nav-trigger .chev { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; opacity: .8; }
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(-135deg) translateY(-2px); }
.nav-menu { list-style: none; margin: 0 0 10px; padding: 0 0 0 10px; display: none; }
.nav-menu.is-open { display: block; }
.nav-menu a { display: flex; align-items: center; gap: 10px; padding: 10px 8px; color: #c5d0e6; border-radius: 8px; text-decoration: none !important; }
.nav-menu a:hover, .nav-menu a:focus-visible { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-menu img { width: 20px; height: 15px; border-radius: 2px; }
.nav-cta { margin-top: 18px; border: 0 !important; }
.nav-cta .btn { width: 100%; }

@media (min-width: 1100px) {
    .nav-toggle { display: none; }
    .main-nav { position: static; transform: none; visibility: visible; background: none; padding: 0; overflow: visible; margin-left: auto; }
    .nav-list { display: flex; align-items: center; gap: 2px; }
    .nav-list > li { border: 0; position: relative; }
    .nav-link, .nav-trigger { padding: 10px 11px; font-size: .94rem; font-weight: 500; border-radius: 8px; width: auto; white-space: nowrap; }
    .nav-link:hover, .nav-trigger:hover, .nav-trigger[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
    .nav-trigger .chev { width: 7px; height: 7px; }
    .nav-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 240px; padding: 8px; background: var(--surface); border-radius: 12px; box-shadow: 0 18px 40px -12px rgba(15, 39, 71, .35); }
    .nav-menu.is-open { display: block; animation: nav-in .15s ease-out; }
    /* invisible bridge over the 8px gap so the hover menu stays open */
    .nav-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
    .nav-list > li:last-child .nav-menu, .nav-list > li.align-right .nav-menu { left: auto; right: 0; }
    .nav-menu a { color: var(--ink); }
    .nav-menu a:hover, .nav-menu a:focus-visible { color: var(--brand-text); background: var(--brand-soft); }
    .nav-cta { margin: 0 0 0 8px; }
    .nav-cta .btn { width: auto; min-height: 40px; padding: .5rem 1.1rem; font-size: .94rem; }
}
@media (min-width: 1100px) and (max-width: 1279px) {
    /* longer Tetum / Portuguese / Indonesian labels still fit on one line */
    .site-header .container { gap: 10px; }
    .brand img { height: 34px; }
    .nav-link, .nav-trigger { padding: 9px 7px; font-size: .88rem; }
    .nav-cta .btn { padding: .45rem .8rem; font-size: .88rem; }
}
@keyframes nav-in { from { opacity: 0; transform: translateY(-4px); } }
@media (max-width: 420px) { .brand img { height: 32px; } }
body.nav-open { overflow: hidden; }
@media (min-width: 1100px) { body.nav-open { overflow: auto; } }

/* ---------- page hero (module pages) ---------- */
.page-hero { position: relative; margin-top: var(--header-h); padding: 56px 0 48px; color: #fff; background: radial-gradient(1200px 400px at 85% -10%, rgba(242, 181, 68, .22), transparent 60%), linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--brand) 120%); overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(to left, #000, transparent 70%); -webkit-mask-image: linear-gradient(to left, #000, transparent 70%); pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4vw, 2.9rem); margin: 0; }
.crumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; font-size: .9rem; color: #b9c6e4; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .6; }
.crumbs a { color: #dbe5fb; }
.crumbs [aria-current] { color: #fff; }

/* ---------- sections (home / about / contact) ---------- */
.section { padding: 72px 0; }
.section-soft { background: var(--soft); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-text); margin-bottom: 8px; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 720px; }
.link-arrow { font-weight: 600; white-space: nowrap; }
.link-arrow::after { content: " →"; }
@media (max-width: 767px) { .section { padding: 52px 0; } }

/* hero */
.hero { position: relative; min-height: min(88vh, 760px); display: flex; align-items: center; color: #fff; padding: calc(var(--header-h) + 48px) 0 64px; overflow: hidden; background: var(--navy); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, rgba(10, 27, 51, .92) 0%, rgba(10, 27, 51, .72) 45%, rgba(10, 27, 51, .25) 100%); }
.hero .container { position: relative; z-index: 2; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.hero h1 { color: #fff; max-width: 760px; margin-bottom: 18px; }
.hero h1 .accent { color: var(--accent); }
/* hero title animation: words rise in one by one, then the name keeps a slow
   golden shimmer and an underline sweeps in (CSS only, reduced-motion safe) */
.hero-title .w { display: inline-block; opacity: 0; transform: translateY(.6em) rotate(2deg); filter: blur(6px); animation: hero-word .8s cubic-bezier(.2, .7, .2, 1) forwards; animation-delay: calc(.15s + var(--i) * .09s); }
.hero-title .accent { position: relative; display: inline; }
.hero-title .accent .w { background: linear-gradient(100deg, #f2b544 0%, #ffe7a8 22%, #f2b544 44%, #f6c362 70%, #f2b544 100%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
    animation: hero-word .8s cubic-bezier(.2, .7, .2, 1) forwards, hero-shine 6s linear infinite; animation-delay: calc(.15s + var(--i) * .09s), 1.6s; }
.hero-title .underline { display: block; height: 4px; width: min(420px, 70%); margin-top: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), rgba(242, 181, 68, 0)); transform-origin: left; transform: scaleX(0); animation: hero-line 1s cubic-bezier(.2, .7, .2, 1) 1.2s forwards; }
.hero-eyebrow, .hero p, .hero-actions { opacity: 0; animation: hero-fade .8s ease forwards; }
.hero-eyebrow { animation-delay: .05s; } .hero p { animation-delay: 1s; } .hero-actions { animation-delay: 1.2s; }
.hero-bg { animation: hero-zoom 24s ease-in-out infinite alternate; transform-origin: 60% 50%; }
@keyframes hero-word { to { opacity: 1; transform: none; filter: none; } }
@keyframes hero-shine { from { background-position: 0% 0; } to { background-position: 250% 0; } }
@keyframes hero-line { to { transform: scaleX(1); } }
@keyframes hero-fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
    .hero-title .w, .hero-eyebrow, .hero p, .hero-actions { opacity: 1; transform: none; filter: none; animation: none; }
    .hero-title .accent .w { animation: none; }
    .hero-title .underline { transform: none; animation: none; }
    .hero-bg { animation: none; }
}
.hero p { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #d6def0; max-width: 620px; margin-bottom: 30px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* quick links */
.quick-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); margin-top: -56px; position: relative; z-index: 3; }
@media (min-width: 768px) { .quick-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .quick-grid { grid-template-columns: repeat(6, 1fr); } }
.quick-card { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none !important; transition: transform .2s, box-shadow .2s, border-color .2s; }
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--card-hover-border); color: var(--ink); }
.quick-card .ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); font-size: 20px; }
.quick-card strong { font-size: 1rem; color: var(--heading); }

/* split (image + text) */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 992px) { .split { grid-template-columns: 5fr 7fr; gap: 64px; } .split.reverse { grid-template-columns: 7fr 5fr; } .split.reverse > :first-child { order: 2; } }
.split-media { position: relative; }
.split-media img { width: 100%; border-radius: 20px; box-shadow: var(--shadow); aspect-ratio: 4 / 5; object-fit: cover; }
.split-media.contain img { aspect-ratio: auto; object-fit: contain; background: #fff; padding: 24px; }
.split-media::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: 22px; background: var(--brand-soft); z-index: -1; }
.quote { font-size: 1.05rem; color: var(--muted); }
.signature { font-weight: 700; color: var(--heading); }

/* feature cards */
.card-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.feature { position: relative; padding: 26px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 14px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 20px; margin-bottom: 16px; }
.feature h3 { font-size: 1.12rem; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: .97rem; margin: 0; }

/* course cards (home "Courses open now") */
/* one row: 4 cards visible on desktop, the rest by scrolling / arrows / swipe */
.course-row { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 20px) / 4); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 4px 2px 14px; scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; }
.course-row > .course-card { scroll-snap-align: start; }
.course-row:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 12px; }
@media (max-width: 1099px) { .course-row { grid-auto-columns: calc((100% - 2 * 20px) / 3); } }
@media (max-width: 767px) { .course-row { grid-auto-columns: 72%; } }
@media (max-width: 480px) { .course-row { grid-auto-columns: 86%; } }
.row-head-actions { display: flex; align-items: center; gap: 8px; }
.row-nav { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--heading); cursor: pointer; display: inline-grid; place-items: center; transition: background-color .15s, color .15s, border-color .15s; }
.row-nav:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.row-nav[disabled] { opacity: .35; cursor: default; background: var(--surface); color: var(--heading); border-color: var(--line); }
.row-head-actions .link-arrow { margin-left: 6px; }
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course-media { position: relative; display: block; aspect-ratio: 5 / 3; background: linear-gradient(135deg, var(--brand-soft), var(--soft)); overflow: hidden; }
.course-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.course-media img.is-fallback { object-fit: contain; padding: 22px; background: #fff; }
.course-card:hover .course-media img { transform: scale(1.04); }
.course-cat { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 999px; background: rgba(15, 39, 71, .85); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .03em; }
.course-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 18px 20px 20px; }
.course-body h3 { font-size: 1.12rem; margin: 0; }
.course-body h3 a { color: var(--heading); }
.course-body p { margin: 0; color: var(--muted); font-size: .94rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .86rem; color: var(--muted); }
.course-meta i { color: var(--brand-text); margin-right: 4px; }
.course-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.course-deadline { font-size: .82rem; color: var(--muted); }
.course-deadline b { color: var(--deadline); }
.course-btn { min-height: 40px; padding: .5rem 1rem; font-size: .9rem; }

/* big service panels */
.panels { display: grid; gap: 20px; }
@media (min-width: 768px) { .panels { grid-template-columns: 1fr 1fr; } }
.panel-card { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px; padding: 32px; border-radius: 20px; overflow: hidden; color: #fff; text-decoration: none !important; isolation: isolate; }
.panel-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s ease; }
.panel-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10, 27, 51, .1) 0%, rgba(10, 27, 51, .88) 75%); }
.panel-card:hover img { transform: scale(1.04); }
.panel-card h3 { color: #fff; font-size: 1.6rem; }
.panel-card p { color: #dbe3f3; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.panel-card .link-arrow { color: var(--accent); }

/* stats */
.stats { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff; }
.stats-grid { display: grid; gap: 24px; grid-template-columns: repeat(2, 1fr); text-align: center; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat span { color: #c7d2ea; font-weight: 500; }

/* news + events teaser */
.teaser-grid { display: grid; gap: 32px; }
@media (min-width: 992px) { .teaser-grid { grid-template-columns: 3fr 2fr; } }
.post-list { display: grid; gap: 18px; }
.post { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: start; padding: 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: box-shadow .2s; }
.post:hover { box-shadow: var(--shadow); }
.post img { width: 120px; height: 90px; object-fit: cover; border-radius: 10px; }
.post h3 { font-size: 1.02rem; margin: 2px 0 6px; }
.post h3 a { color: var(--heading); }
.post p { font-size: .92rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .meta, .event .meta { font-size: .82rem; color: var(--muted); }
@media (max-width: 480px) { .post { grid-template-columns: 88px 1fr; } .post img { width: 88px; height: 72px; } }
.event { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.event:last-child { border-bottom: 0; }
.date-badge { flex: 0 0 62px; text-align: center; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); padding: 8px 4px; line-height: 1.1; }
.date-badge b { display: block; font-size: 1.5rem; color: var(--heading); }
.date-badge small { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.event h3 { font-size: 1rem; margin: 0 0 4px; }
.event h3 a { color: var(--heading); }
.empty-note { color: var(--muted); padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; }

/* gallery */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery a, .gallery figure { position: relative; display: block; margin: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--soft); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery a:hover img, .gallery figure:hover img { transform: scale(1.06); }
.gallery-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; color: #fff; background: linear-gradient(to top, rgba(10, 27, 51, .85), transparent); transform: translateY(100%); transition: transform .3s ease; }
.gallery-cap b { display: block; font-size: .92rem; line-height: 1.3; }
.gallery-cap small { display: block; font-size: .78rem; color: #d6def0; margin-top: 2px; }
.gallery a:hover .gallery-cap, .gallery a:focus-visible .gallery-cap, .gallery figure:hover .gallery-cap { transform: none; }
.gallery a.is-fb::after { content: "\f09a"; font-family: FontAwesome; position: absolute; right: 10px; top: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #1877f2; font-size: 14px; opacity: 0; transition: opacity .2s; }
.gallery a.is-fb:hover::after, .gallery a.is-fb:focus-visible::after { opacity: 1; }
@media (hover: none) { .gallery-cap { transform: none; } }

/* partners marquee (pure CSS; pauses on hover/focus; static row for reduced motion) */
.partners-sec { overflow: hidden; }
.marquee { position: relative; overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 8%, #000 92%, transparent 100%); }
.marquee-track { display: flex; width: max-content; animation: marquee var(--marquee-duration, 40s) linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 20px; padding-right: 20px; }
.partner { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 190px; height: 96px; padding: 14px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); text-decoration: none !important; transition: transform .25s, box-shadow .25s, border-color .25s; }
.partner img { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .25s, opacity .25s; }
.partner:hover, .partner:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--card-hover-border); }
.partner:hover img, .partner:focus-visible img { filter: none; opacity: 1; }
.partner-name { font-weight: 700; color: var(--navy); text-align: center; line-height: 1.25; font-size: .95rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 767px) { .partner { width: 150px; height: 80px; } .partner img { max-height: 52px; } }
@media (prefers-reduced-motion: reduce) {
    .marquee { -webkit-mask-image: none; mask-image: none; }
    .marquee-track { animation: none; width: auto; }
    .marquee-group { flex-wrap: wrap; justify-content: center; padding: 0 20px; }
    .marquee-group[aria-hidden="true"] { display: none; }
}

/* CTA band */
.cta-band { border-radius: 24px; padding: 48px 32px; text-align: center; color: #fff; background: radial-gradient(600px 240px at 10% 0%, rgba(242, 181, 68, .25), transparent 60%), linear-gradient(135deg, var(--brand) 0%, var(--navy-2) 100%); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #dce5fb; max-width: 640px; margin: 0 auto 24px; }

/* people (about) */
.people { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.person img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--soft); }
.person .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.person h3 { font-size: 1.05rem; margin: 0; }
.person .role { color: var(--brand-text); font-weight: 600; font-size: .9rem; }
.person p { color: var(--muted); font-size: .92rem; margin: 0; }
.person .social { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--soft); color: var(--heading); text-decoration: none !important; transition: background-color .2s, color .2s; }
.icon-btn:hover { background: var(--brand); color: #fff; }

/* contact */
.info-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.info-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.info-card .ico { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text); font-size: 18px; margin-bottom: 14px; }
.info-card h2 { font-size: 1.1rem; margin-bottom: 8px; }
.info-card p { margin: 0 0 4px; color: var(--muted); }
.map-frame { margin-top: 32px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 7; min-height: 320px; background: var(--soft); }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: #b7c3dc; padding: 64px 0 0; font-size: .95rem; }
.site-footer a { color: #d8e1f3; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.2fr; } }
.footer-brand img { height: 44px; width: auto; margin-bottom: 16px; }
.footer-brand p { max-width: 340px; }
.site-footer h2 { color: #fff; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact i { width: 18px; margin-top: 4px; color: var(--accent); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.site-footer .socials a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none !important; transition: background-color .2s, transform .2s; }
.site-footer .socials a:hover { background: var(--brand-2); transform: translateY(-2px); }
.footer-bottom { margin-top: 48px; padding: 20px 0; border-top: 1px solid rgba(255, 255, 255, .08); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: .85rem; color: #8f9dbb; }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 900; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .25s, transform .25s, visibility .25s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ---------- theme toggle (navbar; behaviour in xgrr-ui.js) ---------- */
.nav-theme-btn .theme-ico { display: none; width: 1.1em; text-align: center; }
html[data-theme-mode="light"] .theme-ico-light,
html[data-theme-mode="dark"] .theme-ico-dark,
html[data-theme-mode="system"] .theme-ico-system,
html:not([data-theme-mode]) .theme-ico-system { display: inline-block; }
.nav-theme-btn { justify-content: flex-start; gap: 10px; }
@media (min-width: 1100px) { .nav-theme-btn .nav-theme-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
/* logos keep a light tile in the dark theme (most are dark-on-transparent) */
html[data-theme="dark"] .partner { background: #f4f6fb; border-color: transparent; }
html[data-theme="dark"] .hero-bg, html[data-theme="dark"] .panel-card img { filter: brightness(.92); }

/* ---------- reveal on scroll (progressive: content is visible without JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
    .js .reveal { opacity: 1; transform: none; }
}
