/* =========================
   Brand palette & tokens
   ========================= */
:root{
  --gold-400:#F5D657;
  --gold-500:#E7BE35;   /* main accent */
  --gold-600:#D3A622;   /* hover accent */
  --ink:#111111;        /* near-black text */
  --muted:#666;
  --white:#ffffff;
  --border:#eaeaea;

  /* Banner sizing (if fallback <img> hero used) */
  --hero-h-desktop: 240px;
  --hero-h-mobile: 140px;
}

/* =========================
   Base
   ========================= */
*{ box-sizing:border-box }
html,body{ margin:0; padding:0 }
body{
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial;
  color: var(--ink);
  background: var(--white);
}
img{ max-width:100%; display:block }
.container{ width:100%; max-width:1120px; margin:0 auto; padding:0 16px }

/* Visually hidden (for a11y) */
.sr-only{ position:absolute !important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }

/* =========================
   Header & brand
   ========================= */
.site-header{
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 0;
}
.brand{ display:flex; align-items:center; gap:12px; text-decoration:none; }
.brand-logo{
  height: 56px; width: 56px;
  border-radius: 14px;
  background: rgba(255,255,255,.95);
  padding: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.brand-name{ font-weight: 900; letter-spacing: .3px; color: var(--ink); font-size: 1.375rem; }

/* =========================
   Desktop nav row
   ========================= */
.nav-row{ display:flex; align-items:center; gap: 18px; }
.nav-row a{
  display:inline-flex; align-items:center; gap:6px;
  text-decoration:none; color: var(--ink);
  font-weight: 600; font-size: 0.95rem;
  padding: 4px 6px; border-radius: 8px;
  transition: color .2s ease, border-color .2s ease;
  border-bottom: 2px solid transparent;
}
.nav-row a:hover{ color: var(--gold-600); }
.nav-row a.active{ border-color: var(--gold-500); }
.nav-row a .icon{ height:16px; width:16px; display:block; }

/* =========================
   Hamburger trigger (mobile)
   ========================= */
.nav-toggle{ position: absolute; width:1px; height:1px; clip:rect(0,0,0,0); overflow:hidden; }
.hamburger{
  display:none; /* hidden on desktop */
  cursor:pointer;
  border:0; background:transparent;
  height: 36px; width: 36px;
  border-radius:10px;
  flex-direction:column; justify-content:center; align-items:center; gap:5px;
}
.hamburger:focus-visible{ outline: 2px solid var(--gold-500); outline-offset: 2px; }
.hamburger span{ display:block; width:22px; height:2px; background:var(--ink); border-radius:2px; }

/* =========================
   Off-canvas nav (mobile)
   ========================= */
.nav-backdrop{
  position: fixed; inset:0; background: rgba(0,0,0,.38);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 1090;
}
.nav-panel{
  position: fixed; top:0; right:0; height:100dvh; width: 80vw; max-width: 360px;
  background: #fff; border-left:1px solid var(--border);
  box-shadow: -10px 0 30px rgba(0,0,0,.12);
  transform: translateX(100%); transition: transform .25s ease;
  z-index: 1100; display:flex; flex-direction:column; padding: 16px;
}
.nav-sep{ border:none; border-top:1px solid var(--border); margin:8px 0; }
.nav-panel a{
  display:flex; align-items:center; gap:10px;
  padding:12px 10px; color: var(--ink); text-decoration:none;
  border-radius:10px; border:1px solid transparent;
  font-weight:600;
}
.nav-panel a:hover{ border-color: var(--gold-500); }
.nav-panel .icon{ height:18px; width:18px; }

/* open state */
#nav-toggle:checked ~ .nav-backdrop{ opacity:1; pointer-events:auto; }
#nav-toggle:checked ~ .nav-panel{ transform: translateX(0); }
body:has(#nav-toggle:checked){ overflow:hidden; }

/* =========================
   Hero (aspect-ratio background)
   Matches Home & About (set --hero-img & --hero-ratio inline)
   ========================= */
.hero{
  position: relative;
  width: 100%;
  aspect-ratio: var(--hero-ratio, 3 / 1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  z-index: 1;
}
.hero--fullbleed{
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.hero-bg{
  position: absolute; inset: 0;
  background-image: var(--hero-img);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain; /* show full banner without cropping */
}
@media (max-width: 480px){
  .hero-bg{ background-size: cover; } /* better fill on very small screens */
}
.hero-badge{ position:absolute; inset:0; display:grid; place-items:center; pointer-events:none; }
.hero-badge img{
  height: 84px; width: auto; border-radius: 18px;
  background: rgba(255,255,255,.92);
  padding: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.20);
}

/* =========================
   Sections
   ========================= */
.section-title{ text-align:center; margin: 2rem 0; }
.content{ padding: 24px 0 48px; }

/* Live Streams */
.live-streams .embed-container{
  display:grid; grid-template-columns:1fr; gap:1rem;
}
.live-streams iframe{ width:100%; height:360px; }
@media (min-width: 768px){
  .live-streams .embed-container{ grid-template-columns:1fr 1fr; }
  .live-streams iframe{ height:400px; }
}

/* =========================
   Cards (home)
   ========================= */
.cards{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.card{
  display:flex; gap:12px; align-items:center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 14px;
  text-decoration:none; color: var(--ink);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover{
  transform: translateY(-1px);
  border-color: var(--gold-500);
  box-shadow: 0 12px 24px rgba(0,0,0,.12);
}
.card-icon{
  display:grid; place-items:center; height:40px; width:40px;
  border-radius:12px; background:#f6f7f9; border:2px solid var(--gold-500);
}
.card-icon svg{ height:18px; width:18px }
.card-body h3{ margin:0 0 4px; font-size:1rem }
.card-body p{ margin:0; color: var(--muted) }

/* =========================
   About page blocks
   ========================= */
.about-section{ margin: 18px 0 24px; }
.about-body{ margin: 0 16px; font-size: 1rem; line-height: 1.65; color: var(--ink); }
.about-body p{ margin: 0 0 12px; }

.org-links{ display:flex; flex-wrap:wrap; gap:10px; margin: 10px 16px 0; }
.pill-link{
  display:inline-flex; align-items:center; gap:8px; padding:8px 12px;
  border:1px solid var(--border); border-radius:14px; text-decoration:none;
  color:var(--ink); background:#fff;
}
.pill-link:hover{ border-color: var(--gold-500); }
.pill-link .icon{ height:16px; width:16px; }

/* Team grid & profile cards */
.team-section{ margin: 24px 0 48px; }
.team-grid{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap:16px; margin: 0 16px; }

.profile-card{
  display:flex; align-items:flex-start; gap:12px;
  background:#fff; border:1px solid var(--border);
  border-radius:20px; padding:14px; box-shadow:0 6px 18px rgba(0,0,0,.06);
}

/* Image column should NOT shrink; keep it square */
.profile-media{
  flex: 0 0 120px;              /* fixed width, no grow/shrink */
  min-width: 120px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius:16px; border:2px solid var(--gold-500); background:#f9fafb;
}
.profile-media img{
  width:100%; height:100%; object-fit:cover; /* crop rather than squish */
}

/* Text column should wrap instead of pushing image */
.profile-body{
  display:flex; flex-direction:column; gap:8px;
  min-width: 0;                  /* critical for flex wrapping */
}
.profile-name{ margin:0; font-size:1.125rem; }
.profile-bio{ margin:0; color:var(--muted); overflow-wrap:anywhere; word-break:break-word; }

/* Optional: clamp bios to keep cards tidy (uncomment to enable) */
/*
.profile-bio{
  display:-webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow:hidden;
}
*/

.profile-links{ display:flex; gap:10px; flex-wrap:wrap; }
.profile-links a{
  display:inline-flex; align-items:center; gap:6px; text-decoration:none;
  color:var(--ink); padding:6px 10px; border-radius:10px; border:1px solid var(--border);
}
.profile-links a:hover{ border-color: var(--gold-500); }
.profile-links .icon{ height:16px; width:16px; }

/* Mobile: stack profile vertically so nothing fights for width */
@media (max-width: 520px){
  .profile-card{ flex-direction: column; }
  .profile-media{ width:100%; max-width:360px; margin:0 auto; aspect-ratio:1 / 1; }
}

/* =========================
   Contact form
   ========================= */
.contact-form{
  display:flex; flex-direction:column; gap:16px;
  margin:20px 16px; padding:20px;
  border:1px solid var(--border); border-radius:16px; background:#fff;
  box-shadow:0 6px 18px rgba(0,0,0,.06);
}
.contact-form label{
  display:flex; flex-direction:column; font-weight:600; color:var(--ink); font-size:0.95rem;
}
.contact-form input, .contact-form textarea{
  margin-top:6px; padding:10px; font-size:1rem;
  border:1px solid var(--border); border-radius:8px; resize:vertical;
}
.contact-form input:focus, .contact-form textarea:focus{
  border-color:var(--gold-500); outline:none; box-shadow:0 0 0 3px rgba(231,190,53,.2);
}
.contact-form button{
  align-self:flex-start; background:var(--gold-500); color:#fff; font-weight:600;
  border:none; border-radius:8px; padding:10px 20px; cursor:pointer; transition: background .2s ease;
}
.contact-form button:hover{ background:var(--gold-600); }

/* =========================
   Footer
   ========================= */
.footer{ padding: 24px 0; text-align:center; color:#888; border-top:1px solid var(--border); }

/* =========================
   Responsive
   ========================= */
@media (max-width: 992px){
  .cards{ grid-template-columns: 1fr; }
  .team-grid{ grid-template-columns:1fr; }
}
@media (max-width: 768px){
  .nav-row{ display:none; }
  .hamburger{ display:flex; }
  .hero-badge img{ height: 76px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .nav-panel, .nav-backdrop, .card{ transition: none !important; }
}

/* === Accessibility & UX refinements === */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  position:fixed; left:1rem; top:1rem; width:auto; height:auto; padding:.5rem .75rem;
  background:var(--ink); color:var(--white); z-index:10000; border-radius:.5rem;
  outline:2px solid var(--gold-500);
}

.site-header.sticky{
  position: sticky; top:0; z-index:1000;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--border);
}

.nav-row a.active, .nav-panel a.active{ color: var(--gold-500); }
.nav-row a.active::after{
  content:""; display:block; height:2px; background:var(--gold-500);
  margin-top:2px; border-radius:2px;
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline:2px solid var(--gold-500); outline-offset:2px; border-radius:.25rem;
}

.form-status{ margin-top:.75rem; min-height:1.25rem; font-size:.95rem; color:var(--muted); }
.form-status.success{ color:#1b8a2f; }
.form-status.error{ color:#b22626; }
input.error, textarea.error{ border-color:#b22626; }
