/* ==========================================================================
   site.css - Government Technical Institute website
   What it does: all styling for the rebuilt site (layout, typography, colours,
   header/menu, home page sections, programme cards, tables, footer).
   Used by: every page, linked in the <head>.
   Brand colours come from the original site: GTI maroon #902441, peach #EDA584.
   ========================================================================== */

/* --- Design tokens: colours, type, spacing used everywhere --------------- */
:root {
  --maroon: #902441;
  --maroon-deep: #6b1830;
  --maroon-ink: #3a0d1a;
  --peach: #eda584;
  --peach-soft: #fbeee6;
  --gold: #c9a54a;
  --ink: #1d1a1c;
  --ink-2: #4b4448;
  --muted: #776e73;
  --line: #e9e1dd;
  --paper: #fbf8f6;
  --white: #fff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(58, 13, 26, .06), 0 8px 24px rgba(58, 13, 26, .07);
  --shadow-lg: 0 2px 4px rgba(58, 13, 26, .06), 0 20px 48px rgba(58, 13, 26, .14);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* --- Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--maroon); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--maroon-deep); }
:focus-visible { outline: 3px solid var(--peach); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--maroon-ink); margin: 0 0 .5em; font-weight: 600; 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; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--maroon); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-sm); }
.skip:focus { top: 1rem; }
.icon { display: inline-grid; place-items: center; }
.eyebrow {
  font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--maroon); margin: 0 0 .75rem; display: flex; align-items: center; gap: .6rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--peach); }
.eyebrow.light { color: var(--peach); }

/* --- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: 600 .95rem/1 var(--font-body); letter-spacing: .02em; text-decoration: none;
  padding: .85rem 1.35rem; border-radius: 999px; border: 2px solid transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--maroon); color: #fff; }
.btn-primary:hover { background: var(--maroon-deep); color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--maroon); background: var(--white); }
.btn-ghost:hover { border-color: var(--maroon); color: var(--maroon); }
.btn-light { background: #fff; color: var(--maroon); }
.btn-light:hover { background: var(--peach-soft); color: var(--maroon-deep); }
.btn-outline-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--maroon); }
.btn-lg { padding: 1rem 1.7rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* --- Top bar: phone, e-mail, Facebook, quick links ------------------------- */
.topbar { background: var(--maroon-ink); color: rgba(255, 255, 255, .85); font-size: .85rem; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 42px; }
.topbar ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.25rem; }
.topbar a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; }
.topbar a:hover { color: var(--peach); }
.topbar svg { width: 15px; height: 15px; }
.topbar-links a { font-weight: 600; }

/* --- Header and main menu -------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line);
}
.header-in { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--maroon-ink); flex-shrink: 0; }
.brand img { width: 74px; height: auto; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.15; display: flex; flex-direction: column; }
.brand-name small { font-family: var(--font-body); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: .25rem; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 1rem; }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: .15rem; }
.menu > li { position: relative; display: flex; align-items: center; }
.menu > li > a {
  display: block; padding: .6rem .8rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  color: var(--ink-2); text-decoration: none; transition: color .15s, background-color .15s; white-space: nowrap;
}
.menu > li > a:hover, .menu > li.is-active > a { color: var(--maroon); background: var(--peach-soft); }
.sub-toggle { background: none; border: 0; padding: .3rem; margin-left: -.55rem; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.sub {
  list-style: none; margin: 0; padding: .5rem; position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s;
}
.sub::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
.has-sub:hover > .sub, .has-sub:focus-within > .sub, .has-sub.open > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: .55rem .8rem; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-size: .93rem; font-weight: 500; }
.sub a:hover, .sub a[aria-current] { background: var(--peach-soft); color: var(--maroon); }
.menu-toggle { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--maroon-ink); margin: 0 auto; position: relative; transition: transform .25s var(--ease), background .2s; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; } .bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-6px) rotate(-45deg); }

/* --- Home hero with crossfading photos ------------------------------------ */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; flex-direction: column; justify-content: center; color: #fff; overflow: hidden; background: var(--maroon-ink); }
.slides, .slide, .hero-shade { position: absolute; inset: 0; }
.slide { background-size: cover; background-position: center; opacity: 0; transform: scale(1.06); transition: opacity 1.2s ease, transform 7s linear; }
.slide.is-on { opacity: 1; transform: scale(1); }
.hero-shade { background: linear-gradient(100deg, rgba(42, 8, 19, .92) 0%, rgba(107, 24, 48, .72) 45%, rgba(58, 13, 26, .2) 100%); }
.hero-in { position: relative; padding-top: 4rem; padding-bottom: 5rem; max-width: var(--wrap); width: 100%; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4.5rem); max-width: 12ch; margin-bottom: .3em; font-weight: 600; }
.hero-motto { font-family: var(--font-display); font-style: italic; font-size: clamp(1.15rem, 2.2vw, 1.5rem); color: rgba(255, 255, 255, .9); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero .hero-actions { margin-top: 0; }
.hero-dots { position: absolute; bottom: 1.75rem; left: 0; right: 0; display: flex; gap: .5rem; }
.dot { width: 34px; height: 4px; border-radius: 4px; border: 0; padding: 0; background: rgba(255, 255, 255, .4); cursor: pointer; transition: background .3s, width .3s; }
.dot.is-on { background: var(--peach); width: 56px; }

/* --- Mission / vision ------------------------------------------------------ */
.intro { padding-bottom: 0; }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: -7rem; position: relative; z-index: 2; }
.statement { background: #fff; border-radius: var(--radius); padding: clamp(1.75rem, 3vw, 2.5rem); box-shadow: var(--shadow-lg); border-top: 4px solid var(--maroon); }
.statement.vision { border-top-color: var(--peach); }
.statement blockquote { margin: 0; font-family: var(--font-display); font-size: clamp(1.1rem, 1.8vw, 1.3rem); line-height: 1.55; color: var(--maroon-ink); }
.statement blockquote p:last-child { margin: 0; }
.statement em { font-style: normal; }

/* --- Two-column split sections -------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.video-card { margin: 0; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.video-card figcaption { padding: .9rem 1.2rem; font-size: .9rem; color: var(--muted); }
.video { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius-sm); overflow: hidden; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-card .video { border-radius: 0; }

/* --- Department tiles (home) ---------------------------------------------- */
.departments { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-head h2 { margin: 0; }
.dep-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.dep-tile {
  display: flex; align-items: center; gap: 1rem; padding: 1.25rem 1.25rem; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--maroon-ink); font-weight: 600; background: var(--paper);
  transition: border-color .2s, box-shadow .2s var(--ease), transform .2s var(--ease), background .2s;
}
.dep-tile > svg:last-child { margin-left: auto; color: var(--muted); transition: transform .2s var(--ease), color .2s; flex-shrink: 0; }
.dep-tile:hover { border-color: var(--maroon); background: #fff; box-shadow: var(--shadow); transform: translateY(-2px); color: var(--maroon); }
.dep-tile:hover > svg:last-child { transform: translateX(3px); color: var(--maroon); }
.dep-tile .icon, .dept-card .icon, .contact-card > .icon, .pub-card .icon, .hero-meta .icon, .dep-list .icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--peach-soft); color: var(--maroon); flex-shrink: 0;
}

/* --- How to apply ---------------------------------------------------------- */
/* heading centred above two columns: the original chart on the left, the steps on the right */
.apply-head { text-align: center; margin-bottom: 2.5rem; }
.apply-head .eyebrow { justify-content: center; }
.apply-head .eyebrow::after { content: ""; width: 28px; height: 2px; background: var(--peach); }
.apply-grid { align-items: center; }
.infographic { margin: 0; }
.infographic img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 1.25rem 3.25rem; color: var(--ink-2); }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--maroon); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 1.08rem; top: 2.4rem; bottom: .2rem; width: 2px; background: var(--line); }
.steps strong { display: block; color: var(--maroon-ink); font-size: 1.05rem; }
.steps ul { margin: .25rem 0 0; padding-left: 1.1rem; font-size: .95rem; }

/* --- News and events ------------------------------------------------------- */
.news { background: #fff; border-top: 1px solid var(--line); }
.news-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.news-grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1180px) { .news-grid.three { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.news-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--peach-soft); }
.news-media > img { width: 100%; height: 100%; object-fit: cover; }
.news-ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--peach-soft), #fff); }
.news-ph img { width: 96px; opacity: .85; }
.news-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.news-body h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.news-body h3 a { color: var(--maroon-ink); text-decoration: none; }
.news-body h3 a:hover { color: var(--maroon); }
.news-body p { color: var(--ink-2); font-size: .95rem; }
.meta { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--muted); margin-bottom: .6rem; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--maroon); background: var(--peach-soft); padding: .2rem .55rem; border-radius: 999px; }
.card-link { margin-top: auto; font-weight: 700; font-size: .9rem; text-decoration: none; display: inline-flex; gap: .35rem; align-items: center; }
.events { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; position: sticky; top: 110px; }
.events h2 { font-size: 1.3rem; display: flex; align-items: center; gap: .6rem; }
.events > p { color: var(--muted); padding: 1rem; background: #fff; border-radius: var(--radius-sm); border: 1px dashed var(--line); }
.pub-card { display: flex; gap: .9rem; align-items: center; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.pub-card h3 { font-size: 1rem; margin: 0; font-family: var(--font-body); font-weight: 700; }
.pub-card a { font-weight: 600; }

/* --- Inner page title band ------------------------------------------------- */
.page-hero { position: relative; color: #fff; padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2.25rem, 5vw, 3.75rem); overflow: hidden; background: var(--maroon-ink); }
.page-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .28; filter: grayscale(.3); }
.page-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(58, 13, 26, .95), rgba(144, 36, 65, .75)); }
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; margin: .4rem 0 0; max-width: 24ch; }
.crumbs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .85rem; color: rgba(255, 255, 255, .75); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.crumbs a { color: rgba(255, 255, 255, .85); text-decoration: none; }
.crumbs a:hover { color: var(--peach); }
.hero-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin: 1rem 0 0; color: rgba(255, 255, 255, .85); font-size: .95rem; }
.hero-meta .icon { width: 38px; height: 38px; background: rgba(255, 255, 255, .12); color: var(--peach); margin-right: .25rem; }
.hero-meta .tag { background: rgba(255, 255, 255, .14); color: #fff; }

/* --- Long-form text (about, history, entry, posts) ------------------------ */
.prose { max-width: 780px; }
.prose-wide { max-width: var(--wrap); }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 2rem; font-size: 1.35rem; padding-bottom: .45rem; border-bottom: 1px solid var(--line); }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: .35rem; }
.prose li::marker { color: var(--maroon); }
.prose img { border-radius: var(--radius); box-shadow: var(--shadow); margin: 1rem 0 1.5rem; }
.prose strong { color: var(--maroon-ink); }
.prose .audio { margin: .25rem 0 1.25rem; }
.audio audio { width: 100%; max-width: 520px; height: 44px; }
.post .video { margin: 1rem 0; }

/* --- Department pages: sidebar + programme cards -------------------------- */
.layout-side { display: grid; grid-template-columns: 300px 1fr; gap: 2.5rem; padding-top: 3rem; padding-bottom: 5rem; align-items: start; }
.sidebar { position: sticky; top: 108px; display: grid; gap: 1rem; }
.side-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.side-card h2 { font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .75rem; }
.jump { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.jump li { margin-bottom: .4rem; }
.jump li::marker { color: var(--peach); font-weight: 700; }
.jump a { color: var(--ink-2); text-decoration: none; }
.jump a:hover { color: var(--maroon); text-decoration: underline; }
.dep-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.dep-list a { display: flex; align-items: center; gap: .65rem; padding: .4rem; border-radius: var(--radius-sm); color: var(--ink-2); text-decoration: none; font-size: .9rem; font-weight: 500; }
.dep-list .icon { width: 32px; height: 32px; border-radius: 9px; }
.dep-list .icon svg { width: 18px; height: 18px; }
.dep-list a:hover, .dep-list a[aria-current] { background: var(--peach-soft); color: var(--maroon); font-weight: 600; }
.programmes { display: grid; gap: 1.5rem; }
.programme { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); }
.programme header { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; margin-bottom: .9rem; }
.programme h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin: 0; }
.programme-desc { color: var(--ink-2); }
.programme-desc p:last-child { margin-bottom: 0; }
.badge { font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .65rem; border-radius: 999px; background: var(--peach-soft); color: var(--maroon); }
.badge-diploma { background: var(--maroon); color: #fff; }
.badge-certificate { background: #f4e6c8; color: #6d5317; }
.badge-cvq { background: #e3eee9; color: #24543f; }
.years { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.4rem; }
.year { background: var(--paper); border-radius: var(--radius-sm); padding: 1rem 1.15rem; border: 1px solid var(--line); }
.year h3 { font-family: var(--font-body); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--maroon); margin: 0 0 .6rem; }
.year ul { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.year li { padding: .32rem 0; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.year li:last-child { border-bottom: 0; }

/* --- Programs page: one card per department -------------------------------- */
.dept-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.dept-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.dept-card-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.dept-card h2 { font-size: 1.2rem; margin: 0; letter-spacing: .02em; }
.dept-card ul { padding-left: 1.1rem; font-size: .95rem; color: var(--ink-2); margin: 0 0 1.25rem; }
.dept-card li { margin-bottom: .4rem; }
.dept-card li::marker { color: var(--maroon); }
.dept-card .audio { margin-bottom: 1rem; }

/* --- Staff tables ---------------------------------------------------------- */
.chip-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 2rem; position: sticky; top: 85px; z-index: 5; background: var(--paper); padding: .75rem 0; }
.chip-nav a { padding: .5rem 1rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9rem; background: #fff; color: var(--ink-2); }
.chip-nav a:hover { border-color: var(--maroon); color: var(--maroon); }
.staff-group { margin-bottom: 3rem; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--maroon); color: #fff; font-weight: 600; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
tbody tr:nth-child(even) { background: var(--paper); }
tbody tr:hover { background: var(--peach-soft); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child, th:first-child { width: 3.5rem; color: var(--muted); }

/* --- Contact and location -------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.contact-card h2 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.contact-card p { margin: 0; color: var(--ink-2); }
.contact-card.big { display: grid; gap: 1rem; align-content: start; }
.location { display: grid; grid-template-columns: 340px 1fr; gap: 1.5rem; align-items: stretch; }
.location .map { margin: 0; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); min-height: 380px; background: var(--peach-soft); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* --- Post navigation ------------------------------------------------------- */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 780px; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.post-nav a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: #fff; color: var(--maroon-ink); font-weight: 600; line-height: 1.4; }
.post-nav a:hover { border-color: var(--maroon); }
.post-nav small { display: block; color: var(--muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .3rem; }
.post-nav .next { text-align: right; }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: var(--maroon-ink); color: rgba(255, 255, 255, .78); font-size: .93rem; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr; gap: 2.5rem; padding-top: 4rem; padding-bottom: 3rem; }
.site-footer h2 { font-family: var(--font-body); color: #fff; font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 1.1rem; }
.footer-brand img { width: 120px; background: #fff; border-radius: 12px; padding: .5rem; margin-bottom: 1rem; }
.footer-name { font-family: var(--font-display); color: #fff; font-size: 1.25rem; margin-bottom: .3rem; }
.motto { font-family: var(--font-display); font-style: italic; color: var(--peach); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: .45rem; }
.site-footer a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.site-footer a:hover { color: var(--peach); }
.footer-contact li { display: flex; gap: .75rem; margin-bottom: .9rem; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: .25rem; color: var(--peach); }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.4rem; padding-bottom: 1.6rem; font-size: .85rem; }
.footer-base p { margin: 0; }
.fb-link { display: inline-flex; align-items: center; gap: .4rem; }
.to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 46px; height: 46px; border-radius: 50%; background: var(--maroon); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-lg); z-index: 40; }
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--maroon-deep); color: #fff; }

/* --- Reveal on scroll (only when the script is running) -------------------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* --- Tablet and phone ------------------------------------------------------ */
@media (max-width: 1080px) {
  .menu-toggle { display: grid; place-items: center; }
  /* backdrop-filter would trap the fixed menu panel inside the header */
  .site-header { backdrop-filter: none; background: #fff; }
  .site-nav {
    position: fixed; inset: 0 0 0 auto; width: min(380px, 100%); background: #fff; flex-direction: column; align-items: stretch;
    padding: 5.5rem 1.25rem 2rem; gap: 1.25rem; overflow-y: auto; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform .3s var(--ease); z-index: -1;
  }
  .site-nav.open { transform: none; }
  .header-in { position: relative; }
  .menu-toggle { position: relative; z-index: 2; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .menu > li > a { flex: 1; padding: .9rem .5rem; border-radius: 0; background: none !important; }
  .sub-toggle { margin: 0; width: 44px; height: 44px; }
  .has-sub.open .sub-toggle svg { transform: rotate(180deg); }
  .sub { position: static; width: 100%; min-width: 0; box-shadow: none; border: 0; padding: 0 0 .75rem .5rem; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub:hover > .sub, .has-sub:focus-within > .sub { display: none; }
  .has-sub.open > .sub { display: block; }
  .nav-extra .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .layout-side { grid-template-columns: 1fr; }
  .sidebar { position: static; order: 2; }
  .news-layout { grid-template-columns: 1fr; }
  .events { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .topbar-contact li:nth-child(2) span { display: none; }
  .topbar-links li:nth-child(2) { display: none; }
  .brand img { width: 56px; }
  .brand-name { font-size: 1.02rem; }
  .brand-name small { display: none; }
  .header-in { min-height: 70px; }
  .intro-grid, .split, .location { grid-template-columns: 1fr; }
  .intro-grid { margin-top: -4rem; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .chip-nav { top: 69px; }
  .dept-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .slide { transform: none !important; }
}
@media print {
  .topbar, .site-header, .site-footer, .hero-dots, .to-top, .sidebar, .chip-nav { display: none !important; }
  .page-hero { background: none; color: #000; } .page-hero h1 { color: #000; }
}

/* --- Justified paragraphs (user request): body text in content areas.
   Headings, lists, tables, cards' short lines and the footer stay left-aligned.
   hyphens:auto keeps word gaps even on narrow screens. --------------------- */
.prose p, .programme-desc p, .statement blockquote p, .news-body p, .contact-card.big p {
  text-align: justify; hyphens: auto; -webkit-hyphens: auto;
}
