/* ===============================================================
   ScholarJobs Hub - site styles
   Mobile-first. Colours are taken from the banner:
   navy #021626, orange gradient #fa680c -> #fd971f.
   System fonts only - nothing to download, so it is fast on 3G.
   =============================================================== */

/* --- 1. Design tokens ------------------------------------------ */
:root {
  --navy:        #021626;
  --navy-700:    #0a2537;
  --navy-600:    #123349;
  --navy-500:    #1d4762;

  --brand:       #fb6b0d;   /* bright banner orange: accents, on-navy text */
  --brand-600:   #e2590a;   /* hover */
  --brand-700:   #c2410c;   /* buttons + links on white (meets AA contrast) */
  --brand-50:    #fff7ed;
  --brand-100:   #ffedd5;

  --ink:         #15232e;   /* body text */
  --ink-soft:    #475a6b;   /* secondary text */
  --muted:       #5f7082;   /* dates, meta - 4.8:1 on the page background (WCAG AA) */
  --line:        #e3e9ef;
  --line-soft:   #eef2f6;

  --bg:          #ffffff;
  --bg-soft:     #f6f8fa;
  --bg-tint:     #fbfcfd;

  --radius:      10px;
  --radius-lg:   14px;
  --shadow-sm:   0 1px 2px rgba(2, 22, 38, .06);
  --shadow:      0 2px 10px rgba(2, 22, 38, .08);
  --shadow-lg:   0 8px 28px rgba(2, 22, 38, .14);

  --wrap:        1180px;
  --gap:         16px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --header-h:    52px;      /* height of the sticky nav bar */
}

/* --- 2. Reset -------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* Must beat display:flex on buttons, or the hidden attribute does nothing. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body {
  margin: 0;
  /* Keeps the footer at the bottom of the window on short pages. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg-soft);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.25;
  color: var(--navy);
  font-weight: 700;
  letter-spacing: -.01em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

button { font: inherit; cursor: pointer; }
/* Form controls must NOT inherit their colour. Inside a dark section like
   the hero, "inherit" means white - which is invisible on the white input
   box. Set it explicitly here, and override only where a control really
   does sit on a dark background. */
input, select, textarea {
  font: inherit;
  color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #8a9bab; opacity: 1; }

/* Visible keyboard focus everywhere - needed for accessibility. */
:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Inline icons always carry .ico so they can never render at zero size. */
.ico { width: 18px; height: 18px; flex: none; display: inline-block; vertical-align: -3px; }

/* Screen-reader-only text */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

/* --- 3. Layout ------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 14px;
}

.page {
  display: grid;
  gap: 22px;
  padding-block: 18px 32px;
}

@media (min-width: 981px) {
  .page--sidebar {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 28px;
  }
}

.stack  { display: grid; gap: 22px; }
.card-surface {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* --- 4. Header ------------------------------------------------- */
.site-header { background: var(--navy); }

/* Banner, centred, never taller than it needs to be on a phone. */
.banner-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 14px;
}
.banner-bar img {
  width: auto;
  height: 46px;
  max-width: 100%;
  object-fit: contain;
}
@media (min-width: 700px)  { .banner-bar img { height: 66px; } }
@media (min-width: 1000px) { .banner-bar img { height: 84px; padding-block: 6px; } }

/* Text fallback if no banner image is set yet */
.banner-text {
  font-size: 1.5rem; font-weight: 800; color: #fff;
  letter-spacing: -.02em; text-decoration: none;
}
.banner-text span { color: var(--brand); }
@media (min-width: 700px) { .banner-text { font-size: 2.1rem; } }

/* --- 5. Navigation bar ----------------------------------------- */
.nav-bar {
  background: var(--navy-700);
  border-top: 1px solid rgba(255, 255, 255, .07);
  position: sticky;
  top: 0;
  z-index: 60;
}
.nav-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: var(--header-h);
}

.nav-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: none; border: 0; color: #fff;
  padding: 12px 4px; font-size: .95rem; font-weight: 600;
}
.nav-toggle__bars {
  display: grid; gap: 4px; width: 20px;
}
.nav-toggle__bars i {
  display: block; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.search-toggle {
  background: none; border: 0; color: #fff;
  padding: 12px 6px; display: inline-flex; align-items: center;
}
.search-toggle svg { width: 20px; height: 20px; }

/* Desktop menu is hidden on phones; the drawer takes over. */
.nav-menu { display: none; }

@media (min-width: 981px) {
  .nav-toggle { display: none; }

  .nav-menu {
    display: flex;
    align-items: stretch;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
  }
  .nav-menu > li { position: relative; display: flex; }

  .nav-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 13px;
    min-height: var(--header-h);
    color: #e8eef3;
    font-size: .92rem;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }
  .nav-menu > li > a:hover,
  .nav-menu > li.is-open > a,
  .nav-menu > li > a[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, .06);
    border-bottom-color: var(--brand);
    text-decoration: none;
  }
  .nav-menu .caret { width: 9px; height: 9px; opacity: .7; flex: none; }

  /* Dropdown / mega panel */
  .nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 3px solid var(--brand);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 16px 18px;
    min-width: 240px;
    max-width: min(94vw, 920px);
    z-index: 70;
  }
  .nav-menu > li.is-open > .nav-panel { display: flex; gap: 26px; }

  .nav-panel ul { list-style: none; margin: 0; padding: 0; }
  .nav-panel a {
    display: block;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--ink);
    font-size: .9rem;
    text-decoration: none;
  }
  .nav-panel a:hover { background: var(--brand-50); color: var(--brand-700); text-decoration: none; }

  .nav-panel__col { min-width: 168px; }
  .nav-panel__head {
    display: block;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted);
    padding: 4px 8px 8px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 6px;
  }
  .nav-panel__head a { padding: 0; font-size: inherit; color: inherit; font-weight: inherit; }

  /* Long lists (Nigerian states) flow into several narrow columns. */
  .nav-panel__col--wide { min-width: 450px; flex: 1; }
  .nav-panel__col--wide ul { columns: 3; column-gap: 12px; column-fill: balance; }
  .nav-panel__col--wide li { break-inside: avoid; }
  .nav-panel__col--wide a { font-size: .85rem; padding: 5px 7px; }
}

/* --- 6. Mobile drawer ------------------------------------------ */
.drawer {
  position: fixed; inset: 0; z-index: 100;
  visibility: hidden; opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}
.drawer.is-open { visibility: visible; opacity: 1; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(2, 22, 38, .55); }
.drawer__panel {
  position: absolute; inset-block: 0; left: 0;
  width: min(86vw, 340px);
  background: #fff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(-100%);
  transition: transform .22s ease;
  display: flex; flex-direction: column;
}
.drawer.is-open .drawer__panel { transform: none; }

.drawer__top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px;
  background: var(--navy); color: #fff;
  position: sticky; top: 0; z-index: 2;
}
.drawer__top strong { font-size: 1rem; }
.drawer__close {
  background: none; border: 0; color: #fff;
  font-size: 1.6rem; line-height: 1; padding: 4px 8px;
}

.drawer__search { padding: 12px 14px; border-bottom: 1px solid var(--line); }

.drawer nav ul { list-style: none; margin: 0; padding: 0; }
.drawer nav > ul > li { border-bottom: 1px solid var(--line-soft); }

.drawer__row { display: flex; align-items: stretch; }
.drawer__row > a {
  flex: 1;
  padding: 13px 14px;
  color: var(--navy);
  font-weight: 600;
  font-size: .97rem;
  text-decoration: none;
}
.drawer__expand {
  background: none; border: 0; border-left: 1px solid var(--line-soft);
  width: 50px; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.drawer__expand svg { width: 13px; height: 13px; transition: transform .2s ease; }
.drawer__expand[aria-expanded="true"] svg { transform: rotate(180deg); }

.drawer__sub { display: none; background: var(--bg-tint); padding: 2px 0 8px; }
.drawer__sub.is-open { display: block; }
.drawer__sub a {
  display: block; padding: 9px 14px 9px 26px;
  color: var(--ink-soft); font-size: .92rem; text-decoration: none;
}
.drawer__sub a:hover { color: var(--brand-700); }
.drawer__sub .drawer__subhead {
  padding: 10px 14px 4px 22px;
  font-size: .72rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
}
.drawer__sub .drawer__sub--nested a { padding-left: 36px; }

.drawer__foot { margin-top: auto; padding: 16px 14px; border-top: 1px solid var(--line); }

/* --- 7. Search overlay ----------------------------------------- */
.search-pop {
  display: none;
  background: var(--navy-600);
  border-top: 1px solid rgba(255, 255, 255, .08);
}
.search-pop.is-open { display: block; }
.search-pop form { display: flex; gap: 8px; padding: 12px 0; }
.search-pop input[type="search"] {
  flex: 1; min-width: 0;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 16px;            /* 16px stops iOS zooming on focus */
}

/* --- 8. Buttons ------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--brand { background: var(--brand-700); color: #fff; }
.btn--brand:hover { background: var(--brand-600); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-600); color: #fff; }
.btn--ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--brand); color: var(--brand-700); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 26px; font-size: 1.05rem; }

/* --- 9. Deadline and status badges ----------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge--urgent  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge--soon    { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-100); }
.badge--open    { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.badge--closed  { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.badge--neutral { background: #f3f4f6; color: #4b5563; border-color: #e5e7eb; }
.badge--funded  { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.badge--remote  { background: #f5f3ff; color: #6d28d9; border-color: #ddd6fe; }

/* --- 10. Footer ------------------------------------------------ */
.site-footer {
  background: var(--navy);
  color: #c3d1dc;
  margin-top: 30px;
  padding-block: 34px 0;
  font-size: .9rem;
}
.site-footer h2 {
  color: #fff; font-size: .82rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 14px;
}
.site-footer a { color: #c3d1dc; text-decoration: none; }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 9px; }

.footer-grid { display: grid; gap: 28px; }
@media (min-width: 640px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 981px)  { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 34px; } }

.footer-brand img { height: 42px; width: auto; margin-bottom: 12px; }
.footer-brand p { color: #9fb2c0; line-height: 1.6; }
.footer-contact { margin-top: 12px; display: flex; align-items: center; gap: 7px; }
.footer-contact a { color: #fff; font-weight: 600; }

.social-row { display: flex; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.social-row a {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 9px;
  color: #fff;
  transition: background .15s ease;
}
.social-row a:hover { background: var(--brand); border-color: var(--brand); }
.social-row svg { width: 17px; height: 17px; }

.footer-post { display: flex; gap: 10px; align-items: flex-start; }
.footer-post + .footer-post { margin-top: 14px; }
.footer-post img { width: 54px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; }
.footer-post a { font-weight: 600; line-height: 1.4; display: block; }
.footer-post time { display: block; color: #8ba0b0; font-size: .78rem; margin-top: 3px; }

.footer-bottom {
  margin-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding-block: 16px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  align-items: center; justify-content: space-between;
  color: #8ba0b0; font-size: .84rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* --- 11. Notices and flash messages ---------------------------- */
.notice {
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 16px;
  font-size: .93rem;
}
.notice--success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.notice--error   { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.notice--info    { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }

/* --- 12. 404 page ---------------------------------------------- */
.not-found { text-align: center; padding: 48px 16px 60px; }
.not-found__code {
  font-size: 4.5rem; font-weight: 800; line-height: 1;
  color: var(--brand); margin-bottom: 8px;
}
.not-found h1 { font-size: 1.5rem; }
.not-found p { color: var(--ink-soft); max-width: 46ch; margin-inline: auto; }
.not-found__search { max-width: 460px; margin: 22px auto 28px; display: flex; gap: 8px; }
.not-found__search input {
  flex: 1; min-width: 0; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.not-found__links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* --- 13. Reduced motion ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ===============================================================
   Content components
   =============================================================== */

/* --- Hero / homepage search ------------------------------------ */
.hero {
  background: linear-gradient(170deg, var(--navy) 0%, var(--navy-600) 100%);
  color: #fff;
  padding: 30px 0 34px;
}
.hero__title {
  color: #fff;
  font-size: 1.5rem;
  max-width: 20ch;
  margin-bottom: 10px;
}
.hero__sub {
  color: #b9cad7;
  max-width: 56ch;
  font-size: .97rem;
  margin-bottom: 20px;
}
.hero__search { display: flex; gap: 8px; max-width: 600px; }
.hero__search input {
  flex: 1; min-width: 0;
  padding: 13px 16px;
  font-size: 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
@media (min-width: 700px) {
  .hero { padding: 48px 0 52px; }
  .hero__title { font-size: 2.3rem; max-width: 24ch; }
  .hero__sub { font-size: 1.05rem; }
}

/* --- Sections -------------------------------------------------- */
.section { margin-top: 30px; }
.section:first-child { margin-top: 24px; }

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--line);
  position: relative;
}
.section__head::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 54px; height: 2px;
  background: var(--brand);
}
.section__head h2 { margin: 0; font-size: 1.2rem; }
.section__note { margin: 0; color: var(--muted); font-size: .85rem; }
.section__more { font-size: .88rem; font-weight: 700; white-space: nowrap; }

/* --- Grids ----------------------------------------------------- */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 620px)  { .grid--3, .grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 981px)  { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 981px)  { .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }

/* --- Post card ------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card:hover { border-color: #cfdae4; box-shadow: var(--shadow); transform: translateY(-2px); }
.card.is-closed { opacity: .78; }

.card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;          /* reserves the space so nothing jumps */
  background: var(--bg-soft);
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--navy-600), var(--navy));
}

.card__body { padding: 11px 12px 13px; display: flex; flex-direction: column; flex: 1; gap: 7px; }
.card__top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card__cat {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--brand-700);
}
.card__title { margin: 0; font-size: .95rem; line-height: 1.35; font-weight: 700; }
.card__title a { color: var(--navy); }
.card__title a:hover { color: var(--brand-700); text-decoration: none; }
.card__excerpt { margin: 0; font-size: .86rem; color: var(--ink-soft); }
.card__meta {
  margin-top: auto; padding-top: 4px;
  font-size: .76rem; color: var(--muted);
  display: flex; gap: 8px; align-items: center;
}

@media (min-width: 981px) {
  .card__body { padding: 13px 14px 15px; }
  .card__title { font-size: 1rem; }
}

/* Horizontal card used in sidebars */
.card--row { flex-direction: row; align-items: stretch; }
.card--row .card__media { width: 92px; flex: none; aspect-ratio: 1 / 1; }
.card--row .card__body { padding: 9px 11px; }
.card--row .card__title { font-size: .88rem; }

/* --- Breadcrumbs ----------------------------------------------- */
.crumbs { margin-bottom: 14px; font-size: .82rem; color: var(--muted); }
.crumbs ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #b6c3cd; }
.crumbs a { color: var(--ink-soft); }
.crumbs span[aria-current] { color: var(--muted); }

/* --- Archive header -------------------------------------------- */
.archive-head {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  margin-bottom: 18px;
}
.archive-head h1 { margin-bottom: 6px; font-size: 1.4rem; }
.archive-head__intro { color: var(--ink-soft); margin-bottom: 8px; }
.archive-head__count { margin: 0; color: var(--muted); font-size: .85rem; font-weight: 600; }

/* --- Empty state ----------------------------------------------- */
.empty { padding: 34px 22px; text-align: center; }
.empty h3 { margin-bottom: 6px; }
.empty p { color: var(--ink-soft); max-width: 48ch; margin-inline: auto; }
.empty .btn { margin-top: 14px; }

/* --- Pagination ------------------------------------------------ */
.pager {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center; justify-content: center;
  margin-top: 26px;
}
.pager__num, .pager__step {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--navy);
  font-size: .9rem; font-weight: 600; text-decoration: none;
}
.pager__num:hover, .pager__step:hover {
  border-color: var(--brand); color: var(--brand-700); text-decoration: none;
}
.pager__num.is-current { background: var(--navy); border-color: var(--navy); color: #fff; }
.pager__gap { padding: 0 2px; color: var(--muted); }

/* --- Article body (prose) -------------------------------------- */
.prose { padding: 18px 16px 24px; }
/* Pages with no sidebar: cap the line length so text stays readable. */
.prose--narrow { max-width: 880px; margin-inline: auto; }
@media (min-width: 700px) { .prose { padding: 28px 32px 34px; } }

.prose h1 { font-size: 1.55rem; margin-bottom: 12px; }
@media (min-width: 700px) { .prose h1 { font-size: 2rem; } }
.prose h2 { font-size: 1.25rem; margin-top: 1.7em; }
.prose h3 { font-size: 1.08rem; margin-top: 1.5em; }
.prose p, .prose li { color: #22333f; }
.prose li { margin-bottom: .4em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { border-radius: var(--radius); margin-block: 1.2em; }
.prose blockquote {
  margin: 1.4em 0; padding: 12px 18px;
  border-left: 4px solid var(--brand);
  background: var(--brand-50); border-radius: 0 var(--radius) var(--radius) 0;
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose table { width: 100%; border-collapse: collapse; margin-block: 1.3em; font-size: .93rem; }
.prose th, .prose td { padding: 9px 11px; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 700; }
/* Wide tables scroll inside themselves instead of breaking the page. */
.prose .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-block: 1.3em; }
.prose .table-scroll table { margin: 0; }
.prose__updated { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: .85rem; }

.post-hero { width: 100%; border-radius: var(--radius); margin-bottom: 1.4em; }
.post-meta {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  color: var(--muted); font-size: .86rem; margin-bottom: 18px;
}

/* --- Chips ----------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.chip {
  display: inline-block; padding: 4px 11px;
  background: var(--brand-50); color: var(--brand-700);
  border: 1px solid var(--brand-100); border-radius: 999px;
  font-size: .76rem; font-weight: 700; text-decoration: none;
}
.chip:hover { background: var(--brand-100); text-decoration: none; }
.chips--tags { margin-top: 2em; margin-bottom: 0; }
.chip--tag { background: var(--bg-soft); color: var(--ink-soft); border-color: var(--line); font-weight: 600; }

/* Shown only when the site owner is previewing an unpublished post. */
.preview-bar {
  background: var(--brand-700); color: #fff;
  padding: 10px 14px; text-align: center; font-size: .9rem;
}

/* ===============================================================
   Homepage, category pages and the sidebar
   =============================================================== */

/* --- Homepage search with quick filters ------------------------ */
.finder { max-width: 760px; }
.finder__row { display: flex; gap: 8px; }
.finder__row input {
  flex: 1; min-width: 0;
  padding: 13px 16px; font-size: 16px;
  border: 1px solid transparent; border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}
.finder__filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.finder__filters select {
  flex: 1 1 140px; min-width: 0;
  padding: 10px 12px; font-size: 15px;
  border: 1px solid rgba(255,255,255,.22); border-radius: var(--radius);
  background: rgba(255,255,255,.1); color: #fff;
}
.finder__filters select option { color: var(--ink); background: #fff; }

/* --- Tabs under Latest ----------------------------------------- */
.tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px; padding-bottom: 2px;
}
.tabs__btn {
  padding: 8px 15px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink-soft);
  font-size: .87rem; font-weight: 700; cursor: pointer;
  white-space: nowrap;
}
.tabs__btn:hover { border-color: var(--brand); color: var(--brand-700); }
.tabs__btn.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }

.loadmore { text-align: center; margin-top: 22px; }
.loadmore .btn { min-width: 180px; }
.loadmore__done { color: var(--muted); font-size: .88rem; margin: 10px 0 0; }

/* --- Top employers --------------------------------------------- */
.chipgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.chipgrid__item {
  display: block; padding: 13px 15px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; transition: border-color .15s ease, transform .15s ease;
}
.chipgrid__item:hover { border-color: var(--brand); transform: translateY(-2px); text-decoration: none; }
.chipgrid__name { display: block; font-weight: 700; color: var(--navy); font-size: .93rem; }
.chipgrid__count { display: block; color: var(--muted); font-size: .78rem; margin-top: 2px; }

/* --- Study destinations ---------------------------------------- */
.destgrid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px)  { .destgrid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (min-width: 1000px) { .destgrid { grid-template-columns: repeat(6, minmax(0,1fr)); } }

.dest {
  display: block; padding: 20px 14px; text-align: center;
  background: linear-gradient(160deg, var(--navy-600), var(--navy));
  border-radius: var(--radius-lg); color: #fff; text-decoration: none;
  transition: transform .15s ease;
}
.dest:hover { transform: translateY(-3px); text-decoration: none; color: #fff; }
.dest__name { display: block; font-weight: 700; font-size: .95rem; }
.dest__count { display: block; color: #a9bdcb; font-size: .76rem; margin-top: 4px; }

/* --- Get alerts box -------------------------------------------- */
.alerts {
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-600) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 20px 18px;
}
.alerts__title { color: #fff; font-size: 1.05rem; margin-bottom: 6px; }
.alerts__text { color: #b9cad7; font-size: .9rem; margin-bottom: 14px; }
.alerts__buttons { display: flex; flex-direction: column; gap: 8px; }
.alerts__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: var(--radius);
  font-weight: 700; font-size: .9rem; text-decoration: none; color: #fff;
}
.alerts__btn:hover { text-decoration: none; color: #fff; filter: brightness(1.08); }
.alerts__btn--whatsapp { background: #1da851; }
.alerts__btn--telegram { background: #2b8fd4; }

.alerts--wide { padding: 28px 22px; text-align: center; }
.alerts--wide .alerts__title { font-size: 1.4rem; }
.alerts--wide .alerts__text { max-width: 52ch; margin-inline: auto; }
.alerts--wide .alerts__buttons { flex-direction: row; justify-content: center; flex-wrap: wrap; }
.alerts--wide .alerts__btn { min-width: 210px; }

/* --- Sidebar ---------------------------------------------------- */
.sidebar { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 981px) { .sidebar { position: sticky; top: calc(var(--header-h) + 16px); } }

.widget {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 16px;
}
.widget__title {
  font-size: .78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted);
  padding-bottom: 9px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}
.widget__search { display: flex; gap: 7px; }
.widget__search input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.widget__search .btn { padding-inline: 13px; }

.ranked { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.ranked li { display: flex; gap: 11px; align-items: flex-start; padding: 9px 0; }
.ranked li + li { border-top: 1px solid var(--line-soft); }
.ranked__num {
  flex: none; width: 23px; height: 23px;
  display: flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand-700);
  border-radius: 6px; font-size: .75rem; font-weight: 800;
}
.ranked a { color: var(--navy); font-size: .88rem; font-weight: 600; line-height: 1.4; text-decoration: none; }
.ranked a:hover { color: var(--brand-700); }

.catlist { list-style: none; margin: 0; padding: 0; }
.catlist li {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 0;
}
.catlist li + li { border-top: 1px solid var(--line-soft); }
.catlist a { color: var(--navy); font-size: .89rem; font-weight: 600; text-decoration: none; }
.catlist a:hover { color: var(--brand-700); }
.catlist__child { padding-left: 13px; }
.catlist__child a { font-weight: 500; color: var(--ink-soft); font-size: .85rem; }
.catlist__count { color: var(--muted); font-size: .76rem; flex: none; }

.sidebar .widget .card--row { border: 0; border-radius: 0; }
.sidebar .widget .card--row:hover { transform: none; box-shadow: none; }
.sidebar .widget .card--row + .card--row { border-top: 1px solid var(--line-soft); }

/* --- Category page filters -------------------------------------- */
.archive-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; margin-bottom: 18px;
}
.archive-filters select {
  flex: 1 1 135px; min-width: 0;
  padding: 10px 12px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.archive-filters .btn { padding: 10px 18px; }
.archive-filters__clear { font-size: .86rem; color: var(--muted); }

/* --- Ad slots ---------------------------------------------------- */
/* The height is reserved up front so the page never jumps when an ad
   finishes loading. */
.adslot {
  display: flex; align-items: center; justify-content: center;
  margin: 22px auto; max-width: 100%; overflow: hidden;
}
.adslot__label {
  display: block; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  border: 2px dashed #cfdae4; border-radius: var(--radius);
  color: #93a7b5; font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
  min-height: inherit;
}
.adslot--sidebar { margin: 0; }

.amuted { color: var(--muted); }

/* Placeholder when a post has no featured image. */
.card__placeholder .ico { width: 34px; height: 34px; opacity: .6; }
.card--row .card__placeholder .ico { width: 22px; height: 22px; }

/* --- Search page form -------------------------------------------- */
.searchform {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 14px; margin-bottom: 18px;
}
.searchform__main { display: flex; gap: 8px; }
.searchform__main input {
  flex: 1; min-width: 0; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
}
.searchform__filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft);
}
.searchform__filters select {
  flex: 1 1 140px; min-width: 0;
  padding: 9px 11px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
}

/* ===============================================================
   Single post page
   =============================================================== */

.post { padding: 18px 16px 24px; }
@media (min-width: 700px) { .post { padding: 28px 32px 34px; } }
.post__title { font-size: 1.5rem; margin-bottom: 12px; }
@media (min-width: 700px) { .post__title { font-size: 2.05rem; } }
.post-meta__updated { color: var(--brand-700); font-weight: 600; }
.post__body { padding: 0; }

/* --- Share buttons --------------------------------------------- */
.share {
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
  padding: 12px 0; margin-bottom: 4px;
  border-block: 1px solid var(--line-soft);
}
.share--bottom { margin-top: 22px; }
.share__label {
  font-size: .76rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-right: 2px;
}
.share__btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border: 0; border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: #fff;
  text-decoration: none; cursor: pointer; font-family: inherit;
}
.share__btn:hover { color: #fff; text-decoration: none; filter: brightness(1.08); }
.share__btn--whatsapp { background: #1da851; }
.share__btn--telegram { background: #2b8fd4; }
.share__btn--x        { background: #111; }
.share__btn--copy     { background: var(--navy-600); }
.share__btn.is-copied { background: #15803d; }
@media (max-width: 420px) { .share__btn span { display: none; } .share__btn { padding: 9px 12px; } }

/* --- Quick facts box -------------------------------------------- */
.facts {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius); padding: 16px 18px; margin: 20px 0;
}
.facts__head { font-size: 1rem; margin-bottom: 12px; }
.facts__list { margin: 0; display: grid; gap: 0; }
.facts__row {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.facts__row:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 560px) { .facts__row { grid-template-columns: 170px 1fr; gap: 14px; align-items: baseline; } }
.facts__row dt {
  font-size: .78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: var(--muted);
}
.facts__row dd { margin: 0; color: var(--ink); font-size: .95rem; }
.facts__row--deadline dd { font-weight: 700; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* --- Table of contents ------------------------------------------ */
.toc {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin: 20px 0;
}
.toc__head {
  font-size: .78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 9px;
}
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: 5px; }
.toc li.toc__l3 { margin-left: 14px; list-style: circle; font-size: .92em; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--brand-700); text-decoration: underline; }

/* --- Apply box --------------------------------------------------- */
.apply {
  margin: 26px 0 0; padding: 20px 18px;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius-lg); text-align: center;
}
.apply__closed {
  background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d;
  border-radius: var(--radius); padding: 12px 15px; margin-bottom: 14px;
  font-size: .93rem;
}
.apply__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 16px 38px; border-radius: var(--radius);
  background: var(--brand-700); color: #fff;
  font-size: 1.08rem; font-weight: 800; text-decoration: none;
  max-width: 100%;
}
.apply__btn:hover { background: var(--brand-600); color: #fff; text-decoration: none; }
.apply__btn--muted { background: var(--navy-600); }
.apply__deadline {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin: 12px 0 0; color: var(--ink-soft); font-size: .9rem; font-weight: 600;
}
.apply__safety {
  display: flex; gap: 10px; align-items: flex-start; text-align: left;
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  color: var(--ink-soft); font-size: .86rem; line-height: 1.55;
}
.apply__safety .ico { color: var(--brand-700); margin-top: 1px; }

/* --- Previous / next --------------------------------------------- */
.prevnext { display: grid; gap: 12px; margin-top: 26px; }
@media (min-width: 620px) { .prevnext { grid-template-columns: 1fr 1fr; } }
.prevnext__item {
  display: block; padding: 14px 16px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none;
}
.prevnext__item:hover { border-color: var(--brand); text-decoration: none; }
.prevnext__next { text-align: right; }
.prevnext__label {
  display: block; font-size: .76rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  margin-bottom: 4px;
}
.prevnext__title { display: block; color: var(--navy); font-weight: 600; font-size: .92rem; line-height: 1.4; }

/* --- Contact page ------------------------------------------------- */
.contact-direct { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.contact-direct__item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--navy); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.contact-direct__item:hover { border-color: var(--brand); color: var(--brand-700); text-decoration: none; }

.contact-form-wrap { padding: 20px 16px 24px; margin-top: 18px; }
@media (min-width: 700px) { .contact-form-wrap { padding: 28px 32px 32px; } }
.contact-form-wrap h2 { font-size: 1.2rem; margin-bottom: 14px; }

.contact-form label { display: block; font-weight: 600; margin: 14px 0 5px; font-size: .9rem; color: var(--navy); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 12px 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); font-family: inherit;
}
.contact-form input:focus, .contact-form textarea:focus {
  border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(251,107,13,.16);
}
.contact-form textarea { resize: vertical; }
.contact-form__row { display: grid; gap: 0 16px; }
@media (min-width: 560px) { .contact-form__row { grid-template-columns: 1fr 1fr; } }
.contact-form .btn { margin-top: 18px; }
.contact-form__note { margin: 12px 0 0; color: var(--muted); font-size: .83rem; }

/* The spam trap must be invisible to people but still reachable by a bot,
   so it is moved off-screen rather than display:none. */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

/* External links in article text carry a small outward arrow, so a reader
   can see the link leaves this site before tapping it. */
.prose a[target="_blank"]::after,
.post__body a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: .62em; height: .62em;
  margin-left: .28em;
  vertical-align: baseline;
  background: currentColor;
  opacity: .65;
  -webkit-mask: var(--external-icon) center / contain no-repeat;
          mask: var(--external-icon) center / contain no-repeat;
}
:root {
  --external-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6'/%3E%3Cpath d='M20 4 11 13'/%3E%3Cpath d='M19 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E");
}
/* Buttons made from links keep their clean look. */
.prose a.btn[target="_blank"]::after { content: none; }
