/* DeafHive site styles.
   Extracted from the original single-file page, with additions at the bottom
   for the Airtable-driven directory and events sections. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Make the hidden attribute always win — by default the browser's UA
   stylesheet applies `display: none`, but any explicit `display: flex/grid`
   in our component CSS overrides it. The !important here is safe because
   `hidden` is semantic: when set, the element should be invisible, period. */
[hidden] { display: none !important; }

:root {
  --navy:     #2852b7;
  --navy-dk:  #1f46aa;
  --blue-mid: #3f66c4;
  --hex-line: rgba(123, 153, 224, 0.34);
  --yellow:   #f5c842;
  --yellow-dk:#d4a800;
  --white:    #ffffff;
  --text:     #1a2f6e;
  --body:     #333;
}

body {
  font-family: 'Raleway', sans-serif;
  background-color: var(--navy);
  color: var(--body);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Skip-to-content link for keyboard users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 300;
  padding: 10px 18px;
  background: var(--yellow);
  color: var(--text);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Hide content from screen-readers when the modal locks the rest of the page */
[inert] {
  pointer-events: none;
}

/* ── Slanted hex background layer ── */
#hex-layer {
  position: fixed;
  inset: -12vmax;
  z-index: -1;
  overflow: hidden;
  transform: rotate(-8deg) scale(1.08);
  transform-origin: center;
  pointer-events: none;
}

#hex-layer svg {
  width: 100%;
  height: 100%;
  display: block;
}

#hex-layer polygon {
  fill: none;
  stroke: var(--hex-line);
  stroke-width: 2.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

/* ── Hex background ── */
.hex-bg {
  background-color: var(--navy);
}

/* ── NAV ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 48px));
  margin: 14px auto 0;
  padding: 12px 18px;
  position: sticky;
  top: 14px;
  z-index: 200;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(28, 45, 96, 0.12);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(18, 34, 84, 0.10);
}

.logo {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.nav-links {
  display: flex;
  gap: 12px;
  list-style: none;
  position: relative;
  z-index: 1;
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1.5px solid rgba(28, 45, 96, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.nav-toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-links a {
  display: block;
  padding: 8px 20px;
  border: 1.5px solid rgba(28, 45, 96, 0.32);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.78);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-links a:hover {
  border-color: rgba(28, 45, 96, 0.48);
  background: var(--navy);
  color: var(--white);
}

/* ── CARD ── */
.card {
  background: var(--white);
  border: none;
  border-radius: 20px;
  padding: 48px;
  box-shadow: none;
  max-width: 1200px;
  margin: 0 auto 32px;
}

/* ── WRAPPER ── */
.page-wrap {
  position: relative;
  z-index: 1;
  padding: 40px 24px 0;
}

.page-wrap--flush-top {
  padding-top: 0;
}

.archive-section,
footer {
  position: relative;
  z-index: 1;
}

/* ── VIDEO PLACEHOLDER ── */
.vid-box {
  background: #2a2a2a;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.vid-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── YouTube facade (click-to-load, hides pre-play branding) ── */
.video-facade {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.2s ease;
}

.video-facade:hover img,
.video-facade:focus-visible img {
  transform: scale(1.03);
}

.video-facade-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.video-facade-play svg {
  width: 68px;
  height: 48px;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}

.video-facade:hover .video-facade-play,
.video-facade:focus-visible .video-facade-play {
  --yt-play-bg: #f00;
  --yt-play-bg-opacity: 1;
}

.video-facade:hover .video-facade-play svg,
.video-facade:focus-visible .video-facade-play svg {
  transform: scale(1.05);
}

.video-facade:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

/* ── Video modal (lightbox) ── */
.video-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  padding: 24px;
}

.video-modal.is-open {
  display: flex;
}

.video-modal-content {
  position: relative;
  width: 50vw;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  flex-shrink: 0;
}

.video-modal-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-modal-details {
  background: var(--white);
  border-radius: 12px;
  padding: 22px 26px;
  color: var(--body);
  max-height: 35vh;
  overflow-y: auto;
}

.video-modal-details[hidden] {
  display: none;
}

.video-modal-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.video-modal-bio p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #333;
  margin-bottom: 10px;
}

.video-modal-bio p:last-child {
  margin-bottom: 0;
}

.video-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1;
}

.video-modal-close:hover,
.video-modal-close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.video-modal-close:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .video-modal-content {
    width: 90vw;
  }
}

/* ── Role-model cards ── */
.role-models-people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 36px;
}

.role-card {
  background: var(--white);
  border: 1px solid rgba(28, 45, 96, 0.10);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex: 1 1 280px;
  max-width: 500px;
}

.role-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}

.role-card-body {
  padding: 18px 22px 22px;
}

.role-card-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}

.role-card-body p {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .role-card {
    flex-basis: 100%;
    max-width: none;
  }
}

/* ── HERO ── */
.hero-card {
  display: flex;
  align-items: center;
  gap: 40px;
}

.hero-text { flex: 1; }

.hero-text h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero-text .tagline {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
}

.hero-text p {
  font-size: 0.97rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 28px;
}

.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.btn-yellow {
  background: var(--yellow);
  color: #1a1a1a;
  border: none;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.97rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s;
}

.btn-yellow:hover { background: var(--yellow-dk); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--text);
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.97rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}

.btn-outline:hover { background: var(--text); color: var(--white); }

.hero-vid {
  width: 40%;
  aspect-ratio: 16 / 9;
}

/* ── SECTION HEADINGS ── */
h2.sec-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

h2.sec-title-center {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: 8px;
}

p.sec-sub {
  font-size: 0.97rem;
  color: #444;
  line-height: 1.6;
}

p.sec-sub-center {
  font-size: 0.97rem;
  color: #444;
  line-height: 1.6;
  text-align: center;
}

/* ── BULLET LIST ── */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.97rem;
  color: #333;
  line-height: 1.5;
}

.bullet-list li::before {
  content: "•";
  flex-shrink: 0;
  color: var(--text);
  font-weight: 700;
  line-height: 1;
  font-size: 1.2rem;
  margin-top: 1px;
}

.bullet-list li strong { color: var(--text); }

/* ── TWO-COL LAYOUT ── */
.two-col {
  display: flex;
  align-items: center;
  gap: 40px;
}

.two-col .col-text { flex: 1; }

.side-vid {
  width: 40%;
  aspect-ratio: 16 / 9;
}

/* ── WHAT YOU FIND ── */
.find-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
}

.find-grid--stacked {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.find-item {
  background: #f5f7fc;
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.93rem;
  color: #333;
  line-height: 1.5;
}

.find-item::before { content: "•"; flex-shrink: 0; color: var(--text); font-weight: 700; line-height: 1; font-size: 1.2rem; margin-top: 1px; }
.find-item strong  { color: var(--text); display: block; margin-bottom: 2px; }

/* ── BSL EVENTS SECTION ── */
.archive-section {
  position: relative;
  z-index: 1;
  padding: 0 24px;
}

/* ── ROLE MODELS ── */
.role-models-vid {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.mb-24 { margin-bottom: 24px; }
.mb-18 { margin-bottom: 18px; }
.mb-16 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-6 { margin-bottom: 6px; }

.font-bold {
  font-weight: 700;
}

/* ── FOOTER ── */
footer {
  padding: 28px 40px;
  text-align: center;
}

.footer-meta {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.82rem;
}

@media (min-width: 1024px) {
  .card {
    max-width: 1140px;
  }

  nav {
    width: min(1140px, calc(100% - 80px));
  }

  .page-wrap {
    padding-left: 40px;
    padding-right: 40px;
  }

  .archive-section {
    padding-left: 40px;
    padding-right: 40px;
  }

  footer {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.footer-tagline {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav {
    width: calc(100% - 40px);
    padding: 14px 18px;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
  }

  nav.is-open .nav-links {
    display: flex;
  }

  .nav-links li,
  .nav-links a {
    width: 100%;
  }

  .nav-links a {
    text-align: center;
  }

  nav.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  nav.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
  }

  nav.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .card { padding: 28px 20px; }
  .hero-card, .two-col, .archive-card { flex-direction: column; }
  .hero-vid, .side-vid, .archive-vid { width: 100% !important; }
  .hero-text h1 { font-size: 2rem; }
  .find-grid { grid-template-columns: 1fr; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  body { scroll-behavior: auto; }

  #hex-layer {
    transform: none;
  }

  .skip-link,
  .video-facade img,
  .video-facade-play svg,
  .nav-toggle-bar,
  .video-modal-close {
    transition: none;
  }

  .video-facade:hover img,
  .video-facade:focus-visible img,
  .video-facade:hover .video-facade-play svg,
  .video-facade:focus-visible .video-facade-play svg {
    transform: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   AIRTABLE-DRIVEN SECTIONS
   The Organisations directory (clickable cards → detail modal) and the
   Events archive. Cards show a logo and the organisation name; clicking
   opens a modal with the full record (logo, About markdown, website +
   email buttons, categories chips). Match the existing brand palette.
   ════════════════════════════════════════════════════════════════════════ */

.airtable-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Search input ── */
.airtable-search {
  width: 100%;
  padding: 12px 18px;
  border: 1.5px solid rgba(28, 45, 96, 0.18);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.airtable-search::placeholder { color: #888; }
.airtable-search:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(40, 82, 183, 0.15);
}

/* ── Chip filter rows ── */
.airtable-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.airtable-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.airtable-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-right: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.airtable-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1.5px solid rgba(28, 45, 96, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.airtable-chip:hover { border-color: rgba(28, 45, 96, 0.48); }
.airtable-chip:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
.airtable-chip[aria-pressed="true"] {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ── Result count ── */
.airtable-count {
  font-size: 0.88rem;
  color: #555;
  margin-top: -2px;
}

/* ── Card grid ── */
.airtable-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.airtable-status {
  font-size: 0.95rem;
  color: #555;
  padding: 16px 4px;
  grid-column: 1 / -1;
  text-align: center;
}
.airtable-status--error { color: #a01515; }

/* ── Card (clickable button styled as a card) ── */
.airtable-card {
  /* unset button defaults */
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;

  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(28, 45, 96, 0.10);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.airtable-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(18, 34, 84, 0.12);
  border-color: rgba(28, 45, 96, 0.22);
}
.airtable-card:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.airtable-card-logo {
  width: 100%;
  aspect-ratio: 1;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.airtable-card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Empty-logo fallback: a white container hosting the .monogram circle. */
.airtable-card-logo--empty {
  background: var(--white);
}

/* Initials badge — sits inside .airtable-card-logo (card) or
   .org-modal-logo-box (modal). Sizes itself relative to its parent so
   the same markup works in both. */
.airtable-card-logo .monogram,
.org-modal-logo-box .monogram {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid var(--text);
  background: var(--white);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease;
}
.airtable-card-logo .monogram {
  width: 78%;
  max-width: 140px;
  font-size: 1.45rem;
}
.airtable-card:hover .monogram { transform: scale(1.05); }
.airtable-card:focus-visible .monogram { transform: scale(1.05); }

.org-modal-logo-box .monogram {
  width: 70%;
  max-width: 220px;
  border-width: 4px;
  font-size: 2.4rem;
}

@media (prefers-reduced-motion: reduce) {
  .airtable-card-logo .monogram,
  .org-modal-logo-box .monogram { transition: none; }
  .airtable-card:hover .monogram,
  .airtable-card:focus-visible .monogram { transform: none; }
}

.airtable-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(28, 45, 96, 0.06);
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .airtable-card { transition: none; }
  .airtable-card:hover { transform: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   ORGANISATION DETAIL MODAL
   Opens when a card is clicked. Two-column layout: logo + buttons on the
   left, About + Categories on the right. Collapses to one column on mobile.
   ════════════════════════════════════════════════════════════════════════ */

.org-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
}
.org-modal.is-open { display: flex; }

.org-modal-content {
  position: relative;
  width: min(900px, 100%);
  background: var(--white);
  border-radius: 20px;
  padding: 36px 36px 32px;
  margin: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

/* Shared "close" button used by both the Organisation modal and the two
   Event modals (day-events list + event-detail). Identical visual style —
   one rule keeps them in lockstep. The Video modal's close button is
   separate (white-on-black for the dim backdrop). */
.org-modal-close,
.event-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: 1.5px solid rgba(28, 45, 96, 0.18);
  border-radius: 999px;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.org-modal-close:hover,
.org-modal-close:focus-visible,
.event-modal-close:hover,
.event-modal-close:focus-visible {
  background: var(--text);
  border-color: var(--text);
  color: var(--white);
  outline: none;
}
.org-modal-close:focus-visible,
.event-modal-close:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.org-modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 40px 22px 0;
}

.org-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 22px;
}

.org-modal-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.org-modal-logo-box {
  background: var(--white);
  border: 1px solid rgba(28, 45, 96, 0.10);
  border-radius: 14px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: hidden;
}
.org-modal-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
/* Empty-logo fallback for the modal: same .monogram circle, just sized
   larger (rules live alongside the card .monogram in the AIRTABLE-DRIVEN
   SECTIONS block above). */
.org-modal-logo-box--empty {
  background: var(--white);
}

.org-modal-contact-box {
  background: var(--white);
  border: 1px solid rgba(28, 45, 96, 0.10);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}
.org-modal-contact-box .btn-yellow,
.org-modal-contact-box .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  font-size: 0.95rem;
}
.org-modal-email {
  font-size: 0.9rem;
  color: #555;
  text-align: center;
  word-break: break-word;
  margin: 0;
}
.org-modal-email a {
  color: inherit;
  text-decoration: none;
}
.org-modal-email a:hover { text-decoration: underline; }

.org-modal-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.org-modal-section h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.org-modal-about {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #444;
}
.org-modal-about p { margin-bottom: 12px; }
.org-modal-about p:last-child { margin-bottom: 0; }
.org-modal-about a {
  color: var(--navy);
  text-decoration: underline;
  word-break: break-word;
}
.org-modal-about a:hover { color: var(--navy-dk); }
.org-modal-about strong { color: var(--text); }
.org-modal-about ul,
.org-modal-about ol {
  padding-left: 22px;
  margin-bottom: 12px;
}
.org-modal-about li { margin-bottom: 4px; }

.org-modal-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.org-modal-category {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border: 1.5px solid rgba(28, 45, 96, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .org-modal-content { padding: 28px 22px 26px; }
  .org-modal-grid { grid-template-columns: 1fr; }
  .org-modal-title { font-size: 1.3rem; margin-right: 48px; }
}

/* ════════════════════════════════════════════════════════════════════════
   EVENTS BLOCK
   Recreates the Softr-style BSL Events archive. Dark navy gradient filter
   bar across the top of the card, three views (agenda / week / month),
   calendar grid with today + outside-month highlights, event pills, and
   two modals (day-events list, event-detail).
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --event-navy:       #0d2680;
  --event-navy-top:   #1a3fa0;
  --event-navy-deep:  #12318f;
  --event-pill:       #eef3ff;
  --event-pill-hover: #dfe9ff;
  --event-cell:       #f8faff;
  --event-cell-out:   #fbfcff;
  --event-cell-today: #fff9df;
  --event-border:     #edf1f8;
  --event-time-text:  #4f5f8f;
  --event-faded-text: #6174ad;
  --event-mute-text:  #8a94b3;
}

/* The Events card gets no internal padding; children pad themselves so the
   navy filter bar can stretch edge-to-edge inside the rounded white card. */
.events-card { padding: 0; overflow: hidden; }
.events-card > .sec-title { padding: 36px 36px 0; }
.events-card > #events-status { padding: 0 36px 32px; text-align: center; }

/* Reusable icon size for the Lucide symbols */
.events-card .icon { display: inline-block; width: 16px; height: 16px; }

/* ── Filter bar (dark navy gradient) ── */
.event-filter-bar {
  background: linear-gradient(180deg, var(--event-navy-top) 0%, var(--event-navy) 100%);
  padding: 18px 24px;
}

.event-view-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.event-view-toggle { display: flex; flex-wrap: wrap; gap: 8px; }

.event-chip {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.event-chip:hover { background: #ffffff; color: var(--event-navy); }
.event-chip:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.event-chip.is-active {
  background: var(--yellow);
  color: #1a1a1a;
  border-color: transparent;
}
.event-chip.is-active:hover { background: var(--yellow-dk); color: #1a1a1a; }

.event-clear {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.event-clear:hover { background: #ffffff; color: var(--event-navy); }
.event-clear .icon { width: 14px; height: 14px; }

.event-search-row { display: grid; gap: 12px; }
@media (min-width: 1024px) {
  .event-search-row {
    grid-template-columns: minmax(280px, 360px) 1fr;
    align-items: center;
  }
}

.event-search { position: relative; }
.event-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.7);
  pointer-events: none;
}
.event-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
}
.event-search-input::placeholder { color: rgba(255, 255, 255, 0.65); }
.event-search-input:focus {
  outline: none;
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.event-dropdowns { display: grid; gap: 12px; }
@media (min-width: 1024px) { .event-dropdowns { grid-template-columns: 1fr 1fr; } }

.event-dropdown { position: relative; }
.event-dropdown-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.event-dropdown-btn:hover { background: #ffffff; color: var(--event-navy); }
.event-dropdown-btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.event-dropdown-icon { font-weight: 700; margin-left: 8px; }

.event-dropdown-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  background: var(--event-navy-deep);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

/* ── Body ── */
.event-body { background: var(--white); padding: 22px 24px 28px; }

/* Active filter bar (sticky pill bar at top of body) */
.event-active-filters {
  position: sticky;
  top: 14px;
  z-index: 5;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--event-border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 24px;
  backdrop-filter: blur(6px);
}
.event-active-filters-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}
.event-active-filters-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text);
  margin: 0;
}
.event-active-filters-count { font-size: 0.86rem; color: #444; }
.event-active-filters-pills { display: flex; flex-wrap: wrap; gap: 8px; }

.event-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: var(--white);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
}
.event-active-pill--org {
  background: var(--yellow);
  color: #1a1a1a;
  border-color: transparent;
}
.event-active-pill button {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
}
.event-active-pill .icon { width: 12px; height: 12px; }

.event-count { font-size: 0.86rem; color: #444; margin-bottom: 20px; }

/* ── Date nav ── */
.event-date-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
@media (min-width: 640px) {
  .event-date-nav { flex-direction: row; align-items: center; justify-content: space-between; }
}

.event-date-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #d7dff4;
  background: #f7f9ff;
  border-radius: 999px;
  padding: 4px 8px;
  align-self: flex-start;
}
.event-nav-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.event-nav-btn:hover { background: #e6edff; }
.event-nav-btn .icon { width: 16px; height: 16px; }

.event-range-label {
  min-width: 170px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
}

.event-today-btn {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 18px;
  border: 2px solid var(--text);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s, color 0.15s;
}
.event-today-btn:hover { background: var(--text); color: var(--white); }

/* ── Agenda view ── */
.event-view-agenda { display: flex; flex-direction: column; gap: 18px; }

.event-agenda-empty {
  border: 1px solid var(--event-border);
  background: var(--event-cell);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  color: #444;
}
.event-agenda-group {
  border: 1px solid var(--event-border);
  background: var(--event-cell);
  border-radius: 18px;
  padding: 18px;
}
.event-agenda-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.event-agenda-group-head .icon { width: 16px; height: 16px; color: var(--text); }
.event-agenda-group-head h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.event-agenda-cards { display: flex; flex-direction: column; gap: 12px; }

.event-agenda-card {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  display: grid;
  gap: 14px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--event-border);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(13, 38, 128, 0.06);
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
@media (min-width: 640px) {
  .event-agenda-card { grid-template-columns: 1fr auto; }
}
.event-agenda-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 38, 128, 0.10);
}
.event-agenda-card:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.event-agenda-card-main { display: grid; gap: 14px; }
@media (min-width: 640px) {
  .event-agenda-card-main { grid-template-columns: 1fr 1fr; }
}
.event-agenda-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.event-agenda-card-time { font-size: 0.88rem; color: var(--event-time-text); margin: 4px 0 0; }
.event-agenda-card-org  { font-size: 0.88rem; color: #444; margin: 8px 0 0; }
.event-agenda-card-address { font-size: 0.88rem; color: #666; margin: 0; }
.event-agenda-card-badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--yellow);
  color: #1a1a1a;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ── Week + month grids ── */
.event-grid { display: grid; gap: 8px; }
@media (min-width: 768px) { .event-grid { gap: 12px; } }

.event-grid-week { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .event-grid-week { grid-template-columns: repeat(7, 1fr); } }
.event-grid-month { grid-template-columns: repeat(7, 1fr); }

.event-grid-month-head { display: none; }
@media (min-width: 768px) {
  .event-grid-month-head {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 12px;
  }
  .event-grid-month-head div {
    padding: 8px;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--event-faded-text);
  }
}

.event-day {
  border: 1px solid var(--event-border);
  background: var(--event-cell);
  border-radius: 12px;
  padding: 8px;
}
@media (min-width: 768px) {
  .event-day { min-height: 150px; border-radius: 16px; padding: 12px; }
}
.event-day--today { border-color: var(--yellow); background: var(--event-cell-today); }
.event-day--out   { background: var(--event-cell-out); opacity: 0.7; }

.event-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
@media (min-width: 768px) { .event-day-head { margin-bottom: 12px; } }

.event-day-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--event-faded-text);
}
@media (min-width: 768px) { .event-day-label { font-size: 0.72rem; } }

.event-day-num { font-size: 0.86rem; font-weight: 800; color: var(--text); }
@media (min-width: 768px) { .event-day-num { font-size: 1rem; } }

.event-day-count {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--white);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
}

.event-day-items { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 768px) { .event-day-items { gap: 8px; } }

.event-day-empty {
  background: var(--white);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.68rem;
  color: var(--event-mute-text);
}
@media (min-width: 768px) {
  .event-day-empty { border-radius: 10px; padding: 10px 12px; font-size: 0.72rem; }
}

.event-pill {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  padding: 4px 8px;
  border: 0;
  background: var(--event-pill);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  transition: background 0.15s;
}
.event-pill:hover { background: var(--event-pill-hover); }
.event-pill:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
@media (min-width: 768px) { .event-pill { border-radius: 10px; padding: 8px 12px; } }

.event-pill-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) { .event-pill-title { font-size: 0.82rem; } }

.event-pill-time {
  display: none;
  font-size: 0.76rem;
  color: var(--event-time-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 768px) { .event-pill-time { display: block; } }

.event-pill-more {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 4px;
  text-align: left;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--event-faded-text);
  cursor: pointer;
}
.event-pill-more:hover { color: var(--text); }

/* ════════════════════════════════════════════════════════════════════════
   EVENT MODALS (day-events list, event-detail)
   ════════════════════════════════════════════════════════════════════════ */

.event-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  padding: 24px;
  overflow-y: auto;
}
.event-modal.is-open { display: flex; }

.event-modal-content {
  position: relative;
  width: min(760px, 100%);
  background: var(--white);
  border-radius: 20px;
  padding: 32px 28px 28px;
  margin: auto;
  box-shadow: 0 20px 60px rgba(13, 38, 128, 0.18);
}
.event-modal-content--wide { width: min(1100px, 100%); }
@media (min-width: 1024px) {
  .event-modal-content--wide { width: min(1200px, 90vw); padding: 36px 36px 32px; }
}

/* (Event-modal close button styles live with .org-modal-close further up —
   one shared rule for both modal close buttons.) */

.event-modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 40px 20px 0;
  line-height: 1.2;
}
@media (min-width: 640px) { .event-modal-title { font-size: 1.5rem; } }
.event-modal--detail .event-modal-title { font-size: 1.4rem; }
@media (min-width: 640px) { .event-modal--detail .event-modal-title { font-size: 1.6rem; } }
@media (min-width: 1024px) { .event-modal--detail .event-modal-title { font-size: 1.8rem; } }

/* Day-events modal */
.event-modal-day-list { display: flex; flex-direction: column; gap: 12px; }

.event-day-card {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--event-border);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(13, 38, 128, 0.06);
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
@media (min-width: 640px) {
  .event-day-card { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}
.event-day-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13, 38, 128, 0.10);
}
.event-day-card-main { min-width: 0; flex: 1; }
.event-day-card-title { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0; }
.event-day-card-time { font-size: 0.88rem; color: var(--event-time-text); margin: 4px 0 0; }
.event-day-card-org { font-size: 0.88rem; color: #444; margin: 8px 0 0; }
.event-day-card-address { font-size: 0.88rem; color: #666; margin: 4px 0 0; }

/* Event-detail modal */
.event-detail-grid { display: grid; gap: 24px; color: #333; }
@media (min-width: 1024px) {
  .event-detail-grid {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 48px;
  }
}

.event-detail-left { display: flex; flex-direction: column; gap: 16px; }

.event-detail-poster {
  background: #f5f7fc;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.event-detail-poster img {
  display: block;
  max-width: 100%;
  max-height: 320px;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

.event-detail-datetime {
  background: #f5f7fc;
  border-radius: 16px;
  padding: 18px;
}
.event-detail-card {
  background: var(--white);
  border-radius: 12px;
  padding: 18px;
}
.event-detail-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.event-detail-card-head .icon { width: 18px; height: 18px; color: var(--text); }
.event-detail-card-head h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.event-detail-date { font-size: 0.88rem; color: #444; margin: 0; }
.event-detail-time { font-size: 0.88rem; font-weight: 700; color: var(--text); margin: 4px 0 0; }

.event-detail-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 1px solid #e3eaf7;
  background: #f9fbff;
  border-radius: 16px;
  padding: 18px;
}
.event-detail-meta h4 {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}
.event-detail-org-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.event-detail-org-badge {
  display: inline-flex;
  padding: 4px 12px;
  background: var(--yellow);
  color: #1a1a1a;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}
.event-detail-meta-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: #444;
}
.event-detail-address-icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--text);
}
.event-detail-meta-address span {
  white-space: pre-wrap;
  word-break: break-word;
}

.event-detail-right { min-width: 0; }
.event-detail-details-section h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}
.event-detail-details {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #444;
  white-space: pre-wrap;
  word-break: break-word;
}
.event-detail-details a {
  font-weight: 600;
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.event-detail-details a:hover { color: var(--event-navy); }
.event-detail-empty {
  border: 1px solid var(--event-border);
  background: var(--event-cell);
  border-radius: 16px;
  padding: 22px;
  font-size: 0.88rem;
  color: #666;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  .event-filter-bar { padding: 14px 16px; }
  .event-body { padding: 18px 16px 22px; }
  .events-card > .sec-title { padding: 28px 20px 0; }
  .events-card > #events-status { padding: 0 20px 22px; }
}
