/* ===================================================================
   OpportunityHub - navy / blue / white
   =================================================================== */
:root {
  --navy-900: #071633;
  --navy-800: #0a1f44;
  --navy-700: #102a5c;
  --blue-600: #1558b8;
  --blue-500: #1d6fe0;
  --blue-100: #dbe9fd;
  --blue-50:  #eef5ff;
  --white:    #ffffff;
  --ink:      #0d1b36;
  --muted:    #5a6b88;
  --line:     #d9e4f4;
  --urgent:   #c4262e;
  --urgent-bg:#fdecee;
  --soon:     #9a5b00;
  --soon-bg:  #fff3dc;
  --radius:   10px;
  --shadow:   0 1px 2px rgba(10,31,68,.06), 0 8px 24px rgba(10,31,68,.07);
  --font-head: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Public Sans', 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 400 1rem/1.6 var(--font-body); color: var(--ink); background: var(--white); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); }
a:hover { color: var(--navy-800); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; color: var(--navy-800); margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--blue-500); outline-offset: 2px; }
.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 640px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--white); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }

/* ---------- buttons ---------- */
.btn { display: inline-block; background: var(--blue-500); color: var(--white); border: 0; border-radius: 8px; padding: .7rem 1.25rem; font: 600 .95rem var(--font-body); text-decoration: none; cursor: pointer; transition: background .15s; text-align: center; }
.btn:hover { background: var(--blue-600); color: var(--white); }
.btn--lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn--small { padding: .45rem .9rem; }
.btn--block { display: block; width: 100%; }
.btn--ghost { background: transparent; color: var(--navy-800); box-shadow: inset 0 0 0 2px var(--navy-800); }
.btn--ghost:hover { background: var(--navy-800); color: var(--white); }

/* ---------- header ---------- */
.site-header { background: var(--white); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); box-shadow: 0 2px 10px rgba(10,31,68,.06); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy-800); }
.brand:hover { color: var(--navy-800); }
.brand--light, .brand--light:hover { color: var(--white); }
.brand__logo { height: 52px; width: auto; max-width: 240px; object-fit: contain; }
.site-footer .brand__logo { height: 46px; }
.brand__mark { width: 30px; height: 30px; border-radius: 8px; background: var(--blue-500); position: relative; flex: none; }
.brand__mark::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 6px; border-radius: 3px; background: var(--white); }
.brand__name { font: 800 1.3rem var(--font-head); letter-spacing: -.01em; }
.site-nav { display: flex; align-items: center; gap: .25rem; }
.site-nav a { color: var(--navy-700); text-decoration: none; padding: .55rem .85rem; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--navy-800); background: var(--blue-50); }
.site-nav a.is-active { color: var(--white); background: var(--blue-500); }
.nav-toggle { display: none; background: var(--white); border: 1px solid var(--line); border-radius: 8px; width: 44px; height: 44px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 20px; height: 2px; background: var(--navy-800); border-radius: 2px; content: ""; position: relative; transition: transform .2s, opacity .2s; }
.nav-toggle__bars::before { position: absolute; top: -6px; }
.nav-toggle__bars::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { background: var(--navy-800); color: var(--white); padding: 3.5rem 0 4rem; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: var(--navy-700); opacity: .6; }
.hero__grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 3rem; align-items: center; position: relative; z-index: 1; }
.hero h1 { color: var(--white); font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 800; letter-spacing: -.02em; max-width: 14em; }
.hero__lead { color: #c6d5f2; font-size: 1.08rem; max-width: 34em; margin-bottom: 1.75rem; }
.search { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; background: var(--white); padding: .5rem; border-radius: 12px; max-width: 640px; }
.search input, .search select { border: 0; font: inherit; color: var(--ink); background: transparent; padding: .75rem .85rem; min-width: 0; border-radius: 8px; }
.search select { border-left: 1px solid var(--line); border-radius: 0; }
.search button { background: var(--blue-500); color: var(--white); border: 0; font: 600 1rem var(--font-body); padding: 0 1.5rem; border-radius: 8px; cursor: pointer; }
.search button:hover { background: var(--blue-600); }

.closing { background: var(--white); color: var(--ink); border-radius: 14px; padding: 1.25rem 1.25rem .75rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.closing h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.closing__list { list-style: none; margin: 0; padding: 0; }
.closing__list li + li { border-top: 1px solid var(--line); }
.closing__list a { display: flex; gap: .85rem; align-items: center; padding: .7rem 0; text-decoration: none; color: inherit; }
.closing__list a:hover .closing__title { color: var(--blue-600); text-decoration: underline; }
.closing__when { flex: none; width: 52px; text-align: center; border-radius: 8px; padding: .3rem 0; background: var(--blue-50); color: var(--navy-800); line-height: 1; }
.closing__when b { display: block; font: 800 1.35rem var(--font-head); }
.closing__when small { font-size: .7rem; font-weight: 600; }
.closing__when--urgent { background: var(--urgent-bg); color: var(--urgent); }
.closing__when--soon { background: var(--soon-bg); color: var(--soon); }
.closing__title { display: block; font-weight: 600; font-size: .93rem; line-height: 1.3; }
.closing__meta { display: block; font-size: .8rem; color: var(--muted); }
.closing__empty { color: var(--muted); font-size: .92rem; }

/* ---------- listing ---------- */
.listing { padding: 2.25rem 0 3.5rem; }
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; border-bottom: 2px solid var(--line); margin-bottom: 1.25rem; scrollbar-width: thin; }
.tab { flex: none; text-decoration: none; color: var(--muted); font-weight: 600; padding: .6rem 1rem; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tab span { font-size: .75rem; background: var(--blue-50); color: var(--blue-600); padding: .1rem .45rem; border-radius: 99px; margin-left: .25rem; }
.tab:hover { color: var(--navy-800); background: var(--blue-50); }
.tab.is-active { color: var(--white); background: var(--navy-800); }
.tab.is-active span { background: var(--blue-500); color: var(--white); }

.filters { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.filters__group { display: flex; align-items: center; gap: .5rem; }
.filters label { font-size: .85rem; color: var(--muted); font-weight: 500; }
.filters select { font: inherit; font-size: .92rem; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); }
.listing__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.listing__head h2 { font-size: 1.6rem; margin: 0; }
.listing__head p { color: var(--muted); margin: 0; font-size: .92rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.25rem; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem; display: flex; flex-direction: column; gap: .7rem; border-top: 4px solid var(--blue-500); transition: box-shadow .2s, transform .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card--urgent { border-top-color: var(--urgent); }
.card--soon { border-top-color: #e0a100; }
.card--closed { border-top-color: #9aa8c0; }
.card--none { border-top-color: var(--line); }
.card__media { display: block; margin: -1.15rem -1.15rem .15rem; aspect-ratio: 16 / 7; overflow: hidden; background: var(--blue-50); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__head { display: flex; align-items: center; gap: .75rem; }
.card__org { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.card__orgname { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__orgname:hover, .orglink:hover { text-decoration: underline; }
.card__orgname { color: var(--navy-800); text-decoration: none; }
.orglink { color: inherit; text-decoration: none; }
.detail-hero__org .orglink { color: var(--white); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: .6rem; background: var(--blue-50); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .4rem .3rem .4rem; margin: 0 0 1rem; font-weight: 600; color: var(--navy-800); }
.chip a { font-size: .82rem; margin: 0 .5rem; }
.prose div { margin-bottom: .6em; }
.card__loc { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__title { font-size: 1.12rem; margin: 0; }
.card__title a { color: var(--navy-800); text-decoration: none; }
.card__title a:hover { color: var(--blue-600); text-decoration: underline; }
.card__sum { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .75rem; border-top: 1px dashed var(--line); }
.card__deadline { display: flex; flex-direction: column; line-height: 1.25; font-size: .92rem; }
.card__dlabel { font-size: .75rem; color: var(--muted); }

/* logos */
.logo { flex: none; width: 44px; height: 44px; border-radius: 10px; background: var(--blue-50); border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; position: relative; }
.logo::before { content: attr(data-initials); font: 800 .95rem var(--font-head); color: var(--blue-600); }
.logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--white); padding: 3px; }
.logo--sm { width: 30px; height: 30px; border-radius: 7px; }
.logo--sm::before { font-size: .7rem; }
.facts__org { display: flex; align-items: center; gap: .6rem; }
.logo--lg { width: 84px; height: 84px; border-radius: 16px; background: var(--white); }
.logo--lg::before { font-size: 1.6rem; }

/* tags + deadline badges */
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .22rem .6rem; border-radius: 99px; background: var(--blue-50); color: var(--blue-600); white-space: nowrap; }
.tag--scholarship { background: var(--navy-800); color: var(--white); }
.tag--internship  { background: var(--blue-100); color: var(--navy-700); }
.tag--training    { background: var(--white); color: var(--navy-700); box-shadow: inset 0 0 0 1px var(--navy-700); }
.tag--onDark { background: var(--blue-500); color: var(--white); box-shadow: none; margin-bottom: .6rem; }
.dl { display: inline-block; font-size: .8rem; font-weight: 600; padding: .3rem .7rem; border-radius: 99px; white-space: nowrap; }
.dl--open   { background: var(--blue-50); color: var(--blue-600); }
.dl--soon   { background: var(--soon-bg); color: var(--soon); }
.dl--urgent { background: var(--urgent-bg); color: var(--urgent); }
.dl--closed { background: #e8ecf3; color: #5b667c; }
.dl--none   { background: #eef1f6; color: var(--muted); }

.empty { text-align: center; padding: 3rem 1rem; background: var(--blue-50); border-radius: var(--radius); }
.empty p { max-width: 36em; margin-inline: auto; color: var(--muted); }

.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: 2.25rem; }
.pager a, .pager span { min-width: 42px; height: 42px; display: inline-grid; place-items: center; padding: 0 .8rem; border-radius: 8px; border: 1px solid var(--line); text-decoration: none; color: var(--navy-800); font-weight: 600; }
.pager a:hover { background: var(--blue-50); }
.pager .is-current { background: var(--navy-800); border-color: var(--navy-800); color: var(--white); }
.pager__gap { border: 0 !important; }

/* ---------- detail page ---------- */
.detail-hero { background: var(--navy-800); color: var(--white); padding: 1.5rem 0 2.5rem; }
.crumbs { display: flex; gap: .5rem; font-size: .88rem; margin-bottom: 1.5rem; color: #9fb3dc; }
.crumbs a { color: #cfdcf5; }
.detail-hero__row { display: flex; gap: 1.5rem; align-items: center; }
.detail-hero h1 { color: var(--white); font-size: clamp(1.6rem, 3.4vw, 2.5rem); margin-bottom: .4rem; max-width: 26em; }
.detail-hero__org { color: #c6d5f2; margin: 0; }

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2.5rem; padding: 2.25rem 0 3rem; align-items: start; }
.detail__cover { width: 100%; max-height: 380px; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.5rem; border: 1px solid var(--line); }
.deadline-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.4rem; border-radius: var(--radius); background: var(--blue-50); border-left: 6px solid var(--blue-500); margin-bottom: 2rem; }
.deadline-banner--soon { background: var(--soon-bg); border-color: #e0a100; }
.deadline-banner--urgent { background: var(--urgent-bg); border-color: var(--urgent); }
.deadline-banner--closed, .deadline-banner--none { background: #eef1f6; border-color: #9aa8c0; }
.deadline-banner__label { display: block; font-size: .8rem; color: var(--muted); }
.deadline-banner__date { font: 700 1.2rem var(--font-head); color: var(--navy-800); }
.deadline-banner__count { font: 800 1.35rem var(--font-head); color: var(--blue-600); }
.deadline-banner--soon .deadline-banner__count { color: var(--soon); }
.deadline-banner--urgent .deadline-banner__count { color: var(--urgent); }
.deadline-banner--closed .deadline-banner__count, .deadline-banner--none .deadline-banner__count { color: var(--muted); font-size: 1.1rem; }
.detail__h { font-size: 1.35rem; margin-top: 2rem; }

.prose { max-width: 72ch; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.6em; }
.prose h2 { font-size: 1.3rem; } .prose h3 { font-size: 1.15rem; } .prose h4, .prose h5 { font-size: 1.02rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .7rem; text-align: left; }
.prose blockquote { margin: 1em 0; padding: .5rem 1rem; border-left: 4px solid var(--blue-100); color: var(--muted); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.gallery img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }

.detail__side { position: sticky; top: 90px; display: grid; gap: 1.25rem; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: var(--white); box-shadow: var(--shadow); }
.panel__h { font-size: 1.05rem; }
.facts { margin: 0 0 1.25rem; }
.facts > div { display: flex; flex-direction: column; padding: .6rem 0; border-bottom: 1px solid var(--line); gap: .2rem; }
.facts dt { font-size: .78rem; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.share { display: flex; flex-wrap: wrap; gap: .5rem; }
.share a, .share button { font: 600 .85rem var(--font-body); padding: .45rem .8rem; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--navy-800); text-decoration: none; cursor: pointer; }
.share a:hover, .share button:hover { background: var(--blue-50); }
.hero__trust { color: #9fd0ff; font-weight: 600; font-size: .95rem; margin: -.9rem 0 1.5rem; }
.listing__intro { color: var(--muted); max-width: 62ch; margin: 0 0 1.25rem; }
.verified { margin: 1.1rem 0 0; font-size: .9rem; font-weight: 600; color: var(--blue-600); }
.apply-note { margin: 1rem 0 0; font-size: .92rem; color: var(--muted); }
.apply-note--direct strong { color: var(--navy-800); }
.apply-host { margin: .7rem 0 0; font-size: .85rem; color: var(--blue-600); font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.related { padding-bottom: 4rem; }
.related h2 { font-size: 1.5rem; }

/* ---------- contact ---------- */
.page-hero { background: var(--navy-800); color: var(--white); padding: 3rem 0; }
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 4vw, 2.8rem); }
.page-hero p { color: #c6d5f2; max-width: 36em; margin: 0; }
.contact { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 2.5rem; padding: 2.5rem 0 4rem; align-items: start; }
.contact__info { display: grid; gap: 1rem; }
.info-card { background: var(--blue-50); border-radius: var(--radius); padding: 1.1rem 1.25rem; border-left: 5px solid var(--blue-500); }
.info-card h2 { font-size: 1rem; margin-bottom: .25rem; }
.info-card p { margin: 0; color: var(--muted); }
.form { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; color: var(--navy-800); }
.field input, .field textarea { width: 100%; font: inherit; padding: .75rem .9rem; border: 1px solid #b8c8e3; border-radius: 8px; color: var(--ink); background: var(--white); }
.field input:focus, .field textarea:focus { border-color: var(--blue-500); outline: 3px solid var(--blue-100); }
.hp { position: absolute; left: -9999px; }
.alert { padding: 1rem 1.2rem; border-radius: 8px; margin-bottom: 1.25rem; }
.alert ul { margin: .4rem 0 0; padding-left: 1.2rem; }
.alert--ok { background: var(--blue-50); border-left: 5px solid var(--blue-500); color: var(--navy-800); }
.alert--err { background: var(--urgent-bg); border-left: 5px solid var(--urgent); color: #7d1a20; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-900); color: #b7c6e6; margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2.5rem; padding: 3.25rem 0 2.5rem; }
.footer-about p { margin-top: 1rem; max-width: 28em; font-size: .93rem; }
.footer-h { font-size: .95rem; color: var(--white); margin-bottom: .8rem; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .93rem; }
.site-footer a { color: #b7c6e6; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-base { border-top: 1px solid #1c2f5a; padding: 1.1rem 0; font-size: .85rem; }
.footer-base__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-base p { margin: 0; }
main { min-height: 60vh; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .detail { grid-template-columns: 1fr; }
  .detail__side { position: static; }
  .contact { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--white); padding: .5rem 1.25rem 1rem; border-top: 1px solid var(--line); box-shadow: 0 16px 24px rgba(10,31,68,.15); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .85rem 1rem; }
  .site-header { position: sticky; }
}
@media (max-width: 640px) {
  .hero { padding: 2.25rem 0 2.75rem; }
  .search { grid-template-columns: 1fr; }
  .search select { border-left: 0; border-top: 1px solid var(--line); }
  .search button { padding: .85rem; }
  .grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .form { padding: 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .detail-hero__row { flex-direction: column; align-items: flex-start; }
  .listing__head { flex-direction: column; gap: .25rem; }
  .cta-row .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
