/* ============================================================
   ON4OSA — custom theme layered on top of Bootstrap 5
   Minimalist / modern / professional — Antwerp UBA radio section
   ============================================================ */

:root {
  --osa-ink: #10151f;
  --osa-body: #3a4354;
  --osa-muted: #6b7688;
  --osa-line: #e7eaf0;
  --osa-bg: #ffffff;
  --osa-bg-alt: #f6f8fb;
  --osa-accent: #4c63d2;
  --osa-accent-dark: #3a4fb0;
  --osa-night: #0b1020;
  --osa-night-2: #141a33;
  --osa-radius: 16px;
  --osa-shadow: 0 1px 2px rgba(16, 21, 31, .04), 0 8px 24px rgba(16, 21, 31, .06);
  --osa-shadow-lg: 0 12px 40px rgba(16, 21, 31, .12);
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--osa-body);
  background: var(--osa-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main { display: block; }

h1, h2, h3, h4, h5, h6 { color: var(--osa-ink); font-weight: 700; letter-spacing: -.02em; }

a { color: var(--osa-accent); text-decoration: none; }
a:hover { color: var(--osa-accent-dark); }

/* Anchor offset so sticky navbar doesn't cover section tops */
section[id], [id].anchor { scroll-margin-top: 88px; }

/* ---------- Buttons ---------- */
.btn-osa {
  background: var(--osa-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: .7rem 1.6rem;
  font-weight: 600;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn-osa:hover { background: var(--osa-accent-dark); color: #fff; transform: translateY(-1px); box-shadow: var(--osa-shadow); }

.btn-osa-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  padding: .7rem 1.6rem;
  font-weight: 600;
  transition: background .15s ease, border-color .15s ease;
}
.btn-osa-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .6); }

/* ---------- Navbar ---------- */
.navbar-osa {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--osa-line);
  padding-top: .85rem;
  padding-bottom: .85rem;
}
.navbar-osa .navbar-brand {
  font-weight: 800;
  color: var(--osa-ink);
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.brand-mark { color: var(--osa-accent); vertical-align: -.28em; }
.navbar-osa .nav-link {
  color: var(--osa-body);
  font-weight: 500;
  padding: .35rem .9rem;
  border-radius: 8px;
  transition: color .15s ease, background .15s ease;
}
.navbar-osa .nav-link:hover { color: var(--osa-ink); background: var(--osa-bg-alt); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 50% -10%, #22305e 0%, var(--osa-night-2) 45%, var(--osa-night) 100%);
  color: #fff;
  padding: 6.5rem 0 7rem;
  isolation: isolate;
}
.hero::before {
  /* concentric signal rings emanating from the top, fading downward */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-radial-gradient(circle at 50% 6%,
      transparent 0 58px,
      rgba(140, 165, 255, .10) 58px 60px);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
          mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
  opacity: .9;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  width: 520px; height: 520px;
  left: 50%; top: -180px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(96, 122, 255, .45) 0%, transparent 62%);
  filter: blur(10px);
  pointer-events: none;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .78rem;
  font-weight: 600;
  color: #a9b6ff;
  margin-bottom: 1rem;
}
.hero-title {
  color: #fff;
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 1.25rem;
}
.hero-lead {
  color: rgba(255, 255, 255, .82);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 42rem;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section-alt { background: var(--osa-bg-alt); border-top: 1px solid var(--osa-line); border-bottom: 1px solid var(--osa-line); }
.section-head { max-width: 42rem; margin: 0 auto 3rem; }
.section-kicker {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .75rem;
  font-weight: 700;
  color: var(--osa-accent);
  margin-bottom: .75rem;
}
.section-title { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: .75rem; }
.section-sub { color: var(--osa-muted); font-size: 1.05rem; margin: 0; }

/* ---------- Meeting cards ---------- */
.meeting-card {
  background: var(--osa-bg);
  border: 1px solid var(--osa-line);
  border-radius: var(--osa-radius);
  padding: 2rem;
  box-shadow: var(--osa-shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-align: center;
}
.meeting-card:hover { transform: translateY(-4px); box-shadow: var(--osa-shadow-lg); border-color: #d4daf0; }
.meeting-when {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--osa-accent);
  background: rgba(76, 99, 210, .08);
  border-radius: 999px;
  padding: .35rem .9rem;
  margin-bottom: 1.1rem;
}
.meeting-venue { font-size: 1.3rem; margin-bottom: .6rem; }
.meeting-address {
  font-style: normal;
  color: var(--osa-body);
  line-height: 1.7;
  margin-bottom: 1.1rem;
}
.meeting-time {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--osa-ink);
  font-weight: 600;
  padding-top: 1.1rem;
  border-top: 1px solid var(--osa-line);
  width: 100%;
  justify-content: center;
}
.meeting-time svg { color: var(--osa-accent); }
.meeting-link { display: inline-block; margin-top: 1rem; font-weight: 600; font-size: .92rem; }

/* ---------- Page / prose ---------- */
.page-head { margin-bottom: 2rem; }
.page-title { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose { color: var(--osa-body); font-size: 1.06rem; line-height: 1.8; }
.prose h2 { margin-top: 2.2rem; margin-bottom: .8rem; }
.prose h3 { margin-top: 1.8rem; margin-bottom: .6rem; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.2rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose pre {
  background: var(--osa-night);
  color: #e6e9f2;
  padding: 1.1rem 1.25rem;
  border-radius: 12px;
  overflow-x: auto;
  font-size: .9rem;
}
.prose code { font-size: .9em; }
.prose :not(pre) > code { background: var(--osa-bg-alt); padding: .15em .4em; border-radius: 6px; color: var(--osa-accent-dark); }
.prose blockquote {
  border-left: 3px solid var(--osa-accent);
  padding-left: 1.1rem;
  color: var(--osa-muted);
  font-style: italic;
}

/* ---------- Carousel (velddagen) ---------- */
.gallery-head { margin-top: 4rem; }

.osa-carousel {
  border-radius: var(--osa-radius);
  overflow: hidden;
  box-shadow: var(--osa-shadow-lg);
  margin-bottom: 3.5rem;
  background: var(--osa-night);
}
.osa-carousel .carousel-item {
  height: clamp(360px, 68vh, 620px);
  background: var(--osa-night);
}
.osa-carousel .carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;      /* show full portrait photo, letterboxed on dark */
  object-position: center;
}
/* subtle gradient so controls/caption stay legible over any photo */
.osa-carousel .carousel-control-prev,
.osa-carousel .carousel-control-next { width: 12%; }
.osa-carousel .carousel-caption-fixed {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.2rem 1.25rem .9rem;
  background: linear-gradient(to top, rgba(11, 16, 32, .8), transparent);
  color: rgba(255, 255, 255, .92);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
}
.osa-carousel .carousel-indicators { margin-bottom: .6rem; z-index: 3; }
.osa-carousel .carousel-indicators [data-bs-target] {
  width: 8px; height: 8px; border-radius: 50%;
  border: 0; opacity: .5;
}
.osa-carousel .carousel-indicators .active { opacity: 1; }

/* ---------- Results table (velddagen) ---------- */
.results-table {
  border: 1px solid var(--osa-line);
  border-radius: var(--osa-radius);
  box-shadow: var(--osa-shadow);
  /* overflow-x: auto lets wide tables scroll horizontally on mobile
     instead of being clipped, while still clipping the rounded corners.
     (Bootstrap's .table-responsive sets this too; keep them in sync.) */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.results-table .table { margin-bottom: 0; }
.results-table thead th {
  background: var(--osa-bg-alt);
  color: var(--osa-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .74rem;
  font-weight: 700;
  border-bottom: 1px solid var(--osa-line);
  padding: .9rem 1rem;
}
.results-table tbody td {
  padding: 1rem;
  border-top: 1px solid var(--osa-line);
  color: var(--osa-body);
  vertical-align: middle;
}
.results-table tbody tr:hover { background: var(--osa-bg-alt); }
.callsign {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 600;
  color: var(--osa-ink);
  letter-spacing: .02em;
}
.badge-result {
  display: inline-block;
  font-weight: 700;
  font-size: .85rem;
  color: var(--osa-ink);
  background: var(--osa-bg-alt);
  border: 1px solid var(--osa-line);
  border-radius: 999px;
  padding: .2rem .7rem;
  margin-right: .5rem;
}
.badge-win {
  color: #7a5b00;
  background: #fff5d6;
  border-color: #f0dfa0;
}
.result-score { font-weight: 600; color: var(--osa-ink); }
.result-qso { color: var(--osa-muted); font-size: .9rem; margin-left: .5rem; }
.result-src { display: inline-block; margin-left: .6rem; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.results-note { color: var(--osa-muted); font-size: .88rem; margin-top: 1.25rem; text-align: center; }

/* On phones, reflow the wide tables into stacked cards (label from
   the column header via data-label) instead of a cut-off/scrolling table. */
@media (max-width: 767.98px) {
  .results-table {
    border: 0;
    box-shadow: none;
    overflow: visible;
    background: transparent;
  }
  .results-table .table,
  .results-table tbody,
  .results-table tr,
  .results-table td { display: block; width: 100%; }
  .results-table thead { display: none; }

  .results-table tbody tr {
    background: var(--osa-bg);
    border: 1px solid var(--osa-line);
    border-radius: var(--osa-radius);
    box-shadow: var(--osa-shadow);
    padding: .4rem .25rem .7rem;
    margin-bottom: 1.1rem;
  }
  .results-table tbody tr:hover { background: var(--osa-bg); }

  .results-table tbody td {
    border: 0;
    padding: .25rem 1.1rem;
    text-align: left;
    white-space: normal;
  }
  .results-table tbody td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .66rem;
    letter-spacing: .06em;
    color: var(--osa-muted);
    margin-top: .6rem;
  }
  /* First cell (Datum) becomes the card title — no label needed. */
  .results-table tbody td:first-child {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--osa-ink);
    padding-top: .6rem;
    padding-bottom: .1rem;
  }
  .results-table tbody td:first-child::before { display: none; }
}
.lezingen-head { margin-top: 4.5rem; margin-bottom: 2rem; }
.vd-subhead {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--osa-ink);
  margin: 2.5rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--osa-line);
}
.vd-subhead:first-of-type { margin-top: 0; }
.lezing-topic { font-weight: 600; }

/* ---------- OSA Nieuws (newsletter cards) ---------- */
.newsletter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  justify-content: center;
}
.newsletter-card {
  display: flex;
  flex-direction: column;
  width: 200px;
  color: inherit;
  transition: transform .2s ease;
}
/* Featured (most recent) edition — slightly larger, on top. */
.newsletter-featured { display: flex; justify-content: center; margin-bottom: 2.5rem; }
.newsletter-card--featured { width: 260px; }
.newsletter-kicker {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .68rem;
  font-weight: 700;
  color: var(--osa-accent);
  margin-bottom: .1rem;
}

/* On phones, show exactly two cards per row. */
@media (max-width: 575.98px) {
  .newsletter-grid { gap: 1rem; }
  .newsletter-card { width: calc(50% - .5rem); }
  .newsletter-card--featured { width: 62%; }
  /* smaller caption so it fits the narrower thumbnail without wrapping */
  .newsletter-grid .newsletter-title { font-size: .8rem; line-height: 1.25; }
}
.newsletter-card:hover { transform: translateY(-6px); color: inherit; }
.newsletter-cover {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--osa-line);
  box-shadow: var(--osa-shadow);
  background: var(--osa-bg);
  aspect-ratio: 640 / 905;      /* A4 first page */
  transition: box-shadow .2s ease, border-color .2s ease;
}
.newsletter-card:hover .newsletter-cover { box-shadow: var(--osa-shadow-lg); border-color: #d4daf0; }
.newsletter-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.newsletter-badge {
  position: absolute;
  top: .6rem; right: .6rem;
  background: var(--osa-accent);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: .2rem .5rem;
  border-radius: 6px;
  box-shadow: var(--osa-shadow);
}
.newsletter-meta {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  padding: .85rem .25rem 0;
  text-align: center;
}
.newsletter-title { font-weight: 700; color: var(--osa-ink); font-size: .95rem; }

/* ---------- ON9BD — West-Hinder ---------- */
.on9bd-img {
  width: 100%;
  height: auto;
  border-radius: var(--osa-radius);
  box-shadow: var(--osa-shadow-lg);
  display: block;
}
.on9bd-text {
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--osa-body);
  margin-bottom: 1.75rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--osa-night);
  color: rgba(255, 255, 255, .72);
  padding: 3.5rem 0 2rem;
}
.site-footer h6, .footer-brand { color: #fff; }
.footer-brand { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; margin-bottom: .6rem; }
.footer-brand .brand-mark { vertical-align: 0; flex: none; }
.footer-tagline { color: rgba(255, 255, 255, .6); font-size: .95rem; max-width: 22rem; }
.footer-heading { text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255, 255, 255, .72); font-size: .95rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .85rem;
  color: rgba(255, 255, 255, .5);
}

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
