/* ================== */
/* Root + Base Styles */
/* ================== */
:root {
  --bg: #0b111b;
  --panel: #0e1726;
  --frost: rgba(3, 7, 18, 0.58);
  --ink: #e6edf6;
  --ink-dim: #b7c2d0;
  --brand: #8fd36e;
  --accent: #60a5fa;
  --warning: #facc15;
  --muted: rgba(255, 255, 255, 0.08);
  --ring: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

html[data-auth="pending"] body { visibility: hidden; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
}

/* ======================= */
/* Announcement Bar Styles */
/* ======================= */
.announcement-bar {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(90deg, #facc15, #f59e0b); /* gold/orange gradient */
  color: #111;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  z-index: 2000; /* above header */
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.announcement-bar a {
  color: #111;
  text-decoration: underline;
  font-weight: 700;
}

.announcement-bar a:hover {
  color: #000;
  text-decoration: none;
}

/* Optional close button */
.announcement-bar .close-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  cursor: pointer;
  color: #111;
  background: none;
  border: none;
}


img { max-width: 100%; display: block; }

a {
  color: #a7d8ff;
  text-decoration: none;
}
a:hover { color: #fff; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =============== */
/* Site Header     */
/* =============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, #0a0f18 0%, #0a0f18d0 90%, transparent 100%);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--ring);
}
.site-header .inner {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
}
.brand img {
  height: 98px;
  width: auto;
}
@media (max-width: 640px) {
  .brand img { height: 98px; }
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  text-align: center;
}
.action-label {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #ccc;
}
.icon-btn {
  font-size: 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
}
.cta-btn {
  background: #FFD700;
  color: #000;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.cta-btn:hover {
  background: #e6c200;
  box-shadow: 0 0 15px #FFD700;
}

/* =============== */
/* Navigation      */
/* =============== */
.nav {
  position: fixed;
  top: 0;
  right: -280px;          /* ✅ start off-screen to the right */
  width: 260px;
  height: 100%;
  background: #111827;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5); /* shadow on left edge */
  overflow-y: auto;        /* ✅ nav scrolls if list is taller */
  transition: right 0.3s ease;
  z-index: 2000;
  padding: 20px 0;
}

.nav.open {
  right: 0;                /* ✅ slides in from right */
}


.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav li { border-bottom: 1px solid var(--ring); }
.nav a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--ink);
}
.nav a:hover { background: var(--muted); }

/* Submenu */
.has-sub .sub {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
  background: #0b1b2c;
}
.has-sub.open .sub {
  max-height: 500px;
  opacity: 1;
  visibility: visible;
}
.sub a {
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  color: #cfe2ff;
}
.sub a:hover { background: var(--muted); color: #fff; }
.has-sub .arrow {
  margin-left: auto;
  font-size: .8em;
  transition: transform 0.3s ease;
}
.has-sub.open .arrow { transform: rotate(180deg); }

/* Hamburger */
.nav-toggle {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--ink);
  margin-left: auto;
  z-index: 1600;
}

/* Auth/guest */
.auth-only { display: none; }
.guest-only { display: inline-block; }

/* =============== */
/* Sections + Cards */
/* =============== */
.section { padding: 42px 0; }

.black-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  border: none; /* controlled by section rules */
}
.black-header img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.black-header h2, .black-header h3 {
  margin: 0;
  font-size: 1.4rem;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  letter-spacing: 1px;
}

.edu-card {
  padding: 16px;
  background: #2a2a2a;
  color: #fff;
  border: none; /* controlled by section rules */
}
.edu-card p::first-letter {
  font-family: 'Playfair Display', serif;
  font-size: 2.2em;
  font-weight: bold;
  color: #001f66;
  float: left;
  line-height: 1;
  margin-right: 6px;
}

/* Downloads + Updates Layout */
.member-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.member-grid > section {
  display: flex;
  flex-direction: column;
}
.member-grid .edu-card {
  flex: 1; /* match tallest height */
}
@media (max-width: 768px) {
  .member-grid { grid-template-columns: 1fr; }
}

/* Unified Colored Borders */
#downloads .black-header,
#downloads .edu-card {
  border-left: 1px solid #60a5fa;
  border-right: 1px solid #60a5fa;
}
#downloads .black-header {
  border-top: 1px solid #60a5fa;
  border-bottom: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
#downloads .edu-card {
  border-bottom: 1px solid #60a5fa;
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

#updates .black-header,
#updates .edu-card {
  border-left: 1px solid #facc15;
  border-right: 1px solid #facc15;
}
#updates .black-header {
  border-top: 1px solid #facc15;
  border-bottom: none;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
#updates .edu-card {
  border-bottom: 1px solid #facc15;
  border-top: none;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* =============== */
/* Search Overlay  */
/* =============== */
.search-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
}
.search-overlay.active { display: flex; }
.search-box {
  display: flex;
  gap: 0.5rem;
}
.search-box input {
  padding: 0.5rem;
  font-size: 1.2rem;
  width: 300px;
}
.close-search {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

/* External link indicator */
a[target="_blank"]::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 4px;
  opacity: 0.7;
}
a[target="_blank"]:not(.btn)::after {
  content: "↗";
  font-size: 0.8em;
  margin-left: 4px;
  opacity: 0.7;
}
a[target="_blank"]::after {
  content: none;
}
html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;   /* prevents weird horizontal scroll */
  transform: none !important; /* kills accidental skew transforms */
}
.hero .image {
  display: none; /* kill the old inline <img> version */
}

/* Title icon fix */
.title img {
  width: 28px;   /* adjust to taste */
  height: 28px;  /* keep it square */
  margin-right: 10px;
  vertical-align: middle;
}

.title {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ================================
   HEADER & NAV TOGGLE FIX
   ================================ */

.site-header .inner {
  display: flex;
  justify-content: space-between; /* logo left, toggle right */
  align-items: center;
}

.site-header .brand {
  flex: 0 0 auto;
}

.nav-toggle {
  margin-left: auto;   /* pushes it far right */
  order: 2;            /* ensure toggle comes after logo */
  font-size: 2rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;         /* adjust depending on header background */
  z-index: 1001;       /* stays clickable above overlays */
  line-height: 1;
  padding: 0.5rem 1rem;
}

.nav-toggle:focus {
  outline: 2px solid #FFD700; /* accessibility focus style */
  outline-offset: 4px;
}

/* Optional: improve positioning if header has padding */
.site-header {
  position: relative;
  z-index: 1000;
  padding: 0.5rem 1rem;
}


/* ================================
   HEADER LOGO SIZE FIX
   ================================ */

.site-header .brand img {
  height: 98px;   /* was probably ~40px before */
  width: auto;
  max-height: 98px;
}

@media (max-width: 768px) {
  .site-header .brand img {
    height: 98px;   /* smaller for mobile */
    max-height: 98px;
  }
}

.nav-toggle {
  margin-left: auto;   /* pushes it far right */
  order: 2;            /* ensure toggle comes after logo */
  font-size: 2rem;
  outline: none;          /* removes the default browser outline */
  border: none;           /* ensures no borders */
  background: none;       /* makes sure it's clean */
  cursor: pointer;
  color: #fff;         /* adjust depending on header background */
  z-index: 1001;       /* stays clickable above overlays */
  line-height: 1;
  padding: 0.5rem 1rem;
}

.nav-toggle:focus {
      border: none;           /* ensures no borders */
  background: none;       /* makes sure it's clean */
  outline: none;
  box-shadow: none;       /* removes highlight */
}

/* Optional: improve positioning if header has padding */
.site-header {
  position: relative;
  z-index: 1000;
  padding: 0.5rem 1rem;
}
/* ===== Admin modal compatibility (append to /assets/css/styles.css) ===== */

/* 1) Cap header/nav stacking so modals can sit above them */
.site-header { z-index: 2000; position: relative; }
.site-header .nav { z-index: 3500; }     /* admin modals use ~9999 */
.hamburger, #menu-toggle { z-index: 4000; }

/* 2) If any global overlay uses body.nav-open, make it cosmetic only */
body.nav-open::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 3400;                 /* below nav and way below modals */
  pointer-events: none;          /* do NOT steal clicks */
}

/* 3) Absolutely do not disable the entire page’s clicks when menu is open */
body.nav-open, html.nav-open { pointer-events: auto !important; }

/* 4) If you had a global "accessibility" rule hiding everything with aria-hidden,
      stop it from nuking our modals. Keep it scoped. */
[aria-hidden="true"].modal { display: none; }
.modal[aria-hidden="false"] { display: flex !important; }

/* 5) Defensive: never let a full-screen mobile menu clone float above modals */
.ahva-mobile-menu, .ahva-mobile-overlay { display: none !important; }
/* ===== Admin modal compatibility (append at end of styles.css) ===== */
.site-header { z-index: 2000; position: relative; }
.site-header .nav { z-index: 3500; }
.hamburger, #menu-toggle { z-index: 4000; }

body.nav-open::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 3400;
  pointer-events: none;
}

/* Never block the whole page when nav is open */
body.nav-open, html.nav-open { pointer-events: auto !important; }

/* Scope aria-hidden so modals work */
[aria-hidden="true"].modal { display: none; }
.modal[aria-hidden="false"] { display: flex !important; }

/* Kill legacy full-screen clones everywhere */
.ahva-mobile-menu, .ahva-mobile-overlay { display: none !important; }

/* ===== AHVA: Floating Action Button (global) ===== */
/* Round social/action button with inline SVG */
.ahva-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #0b66ff;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  position: relative;
  line-height: 0;          /* prevent icon vertical jitter */
}
.ahva-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.ahva-fab:active { transform: translateY(0); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.ahva-fab svg { width: 24px; height: 24px; fill: currentColor; display:block; }

/* Some themes add an "external link" arrow via ::after — not here, please. */
.ahva-fab::after { content: none !important; }

/* Variant: Facebook */
.ahva-fab--facebook { background: #1877f2; }
.ahva-fab--facebook:hover { background: #3b86f5; }

/* Optional utility: stick to bottom-right */
.ahva-fab--fixed-br {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 3000;
}

/* Optional: smaller on tiny screens */
@media (max-width: 480px) {
  .ahva-fab { width: 56px; height: 56px; }
}

/* ===== Hero Quote (Home) ======================================== */
.hero-quote {
  padding: clamp(40px, 6vw, 80px) 0 clamp(24px, 4vw, 48px);
  background: radial-gradient(1200px 520px at 50% -120px, rgba(255,255,255,0.06), transparent 60%);
}

.hero-quote__frame {
  margin: 0 auto;
  max-width: 980px;
  text-align: center;
}

.hero-quote__text {
  /* Tone down the “shout” and kill the faux italics */
  margin: 0;
  font-weight: 700;
  font-style: normal;
  line-height: 1.25;
  letter-spacing: 0.2px;
  color: #f1f5f9;                /* slate-100 */
  font-size: clamp(28px, 4.4vw, 52px);
}

/* Subtle accent rule under the statement */
.hero-quote__frame::after {
  content: "";
  display: block;
  width: clamp(160px, 28vw, 520px);
  height: 4px;
  margin: clamp(16px, 2.5vw, 28px) auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #06b6d4); /* blue→teal */
  opacity: .9;
}

/* Optional byline if you decide to show it */
.hero-quote__byline {
  margin-top: 12px;
  font-size: clamp(12px, 1.6vw, 14px);
  color: #93a3b8; /* slate-400/500 */
}

/* -------------------------------------------
   Unified content width to match Insights grid
   (1100px max + 20px side padding)
   ------------------------------------------- */
:root{
  --site-max: 1100px;
  --site-pad: 20px;
}

/* Keep Insights at the same width */
.insights-wrap{
  max-width: var(--site-max);
  margin: 0 auto;
  padding-left: var(--site-pad);
  padding-right: var(--site-pad);
}

/* Make subsequent sections match the same width.
   This will affect sections like Quick Actions, join forms, etc.,
   when they use a .container inside a band. */
.container{
  max-width: var(--site-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--site-pad);
  padding-right: var(--site-pad);
}

/* If you use .section.container (common on this site), keep it consistent too */
.section.container{
  max-width: var(--site-max);
}

/* === Global site background matches Blog section === */
:root{
  --ahva-bg: #1a1e22;       /* Blog section background */
  --ahva-card: #0f1216;     /* Card surface used across site */
}

/* Make the page background the Blog bg */
html, body { background: var(--ahva-bg); }

/* Ensure layout wrappers don't reintroduce other backgrounds */
main, .site-main, .page, .page-wrap, .content, .container,
.theme-ahva, .theme-ahva main { background: transparent !important; }

/* Sections default to the same bg (keeps consistency between bands) */
.section, .section.container,
.insights-band,
.join-section-pro { background: var(--ahva-bg); }

/* Keep cards/pills readable and elevated */
.card, .pill, .quick-actions-pill,
.join-card, .insight-card { background: var(--ahva-card); }

/* If your header/footer should blend with the page */
.site-header, .site-footer { background-color: var(--ahva-bg); }

/* (Optional) If you added a gradient to the join section earlier, flatten it */
.join-card {
  background: var(--ahva-card);   /* replaces gradient so it sits clean on the new bg */
}


/* Header layout baseline */
.site-header .inner{
  position: relative;              /* lets us absolutely place the center badge */
  display: flex;
  align-items: center;
}

/* Left logo stays on the left */
.site-header .brand-left{
  flex: 0 0 auto;
}

/* Hamburger pushes to the far right */
.site-header .nav-toggle{
  margin-left: auto;
}

/* --- CENTER BADGE: absolute, true center of the page width --- */
.site-header .brand-center{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);     /* true center regardless of left/right items */
  display: block;
  height: 98px;
  width: 98px;
  z-index: 5;                      /* above header background */
  pointer-events: auto;
}

/* Ensure the image renders at the exact size with no inline gaps */
.site-header .brand-center img{
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
}

/* Optional: scale down on small screens if needed */
@media (max-width: 540px){
  .site-header .brand-center{
    height: 72px;
    width: 72px;
  }
}
/* Group logos on left, 5px gap */
.brand-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: auto; /* pushes hamburger to the far right */
}

/* Round badge: exactly 98px square */
.brand-round,
.brand-round img {
  display: block;
  width: auto;
  height: 98px;
  object-fit: contain;
}

/* 1-line logo: exactly 98px tall, width auto */
.brand-text,
.brand-text img {
  display: block;
  height: 49px;
  width: auto;
  object-fit: contain;
}

/* Keep header layout sane */
.site-header .inner {
  display: flex;
  align-items: center;
}

/* Optional: ensure no other rules shrink them on small screens */
@media (max-width: 540px) {
  .brand-round,
  .brand-round img,
  .brand-text,
  .brand-text img {
    height: 98px !important;
  }
}
