@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* ===========================================================================
   AARIS - Association of Academic Radiography and Imaging Sciences
   Design language: clinical precision meets academic warmth.
   Primary: deep diagnostic teal-blue. Accent: warm amber (the glow of a
   lightbox / film viewer). Generous whitespace, confident headings.
   =========================================================================== */

:root {
  /* Palette - matched to the AARAIS seal: navy-blue ring, forest-green
     centre, metallic-gold lettering. */
  --navy:       #0a1b3d;   /* deepest navy - headers, footer */
  --teal:       #16276b;   /* primary brand = royal navy-blue (the seal ring) */
  --teal-600:   #21357f;   /* hover / lighter brand */
  --teal-050:   #eef1fa;   /* cool blue tints, section backgrounds */
  --green:      #1f6b43;   /* seal centre green - secondary brand */
  --green-600:  #268251;   /* lighter green */
  --green-050:  #ecf5ef;   /* green tint */
  --amber:      #d4af37;   /* seal gold - accent */
  --amber-deep: #b3892a;   /* deeper gold */
  --ink:        #16242b;   /* body text */
  --ink-soft:   #4a5b63;   /* secondary text */
  --line:       #d9deea;   /* hairlines / borders (cool) */
  --paper:      #ffffff;
  --paper-2:    #f6f8fb;   /* alt backgrounds */
  --danger:     #b3261e;
  --success:    #1f7a4d;
  --info:       #16276b;

  /* Type - soft, modern, professional pairing */
  --display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Metrics - softer corners, gentler diffuse shadows */
  --maxw: 1180px;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 2px 8px rgba(10,27,61,.04), 0 16px 44px rgba(10,27,61,.09);
  --shadow-sm: 0 1px 3px rgba(10,27,61,.04), 0 8px 22px rgba(10,27,61,.05);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--teal-600); }

h1, h2, h3, h4 { font-family: var(--display); color: var(--navy); line-height: 1.2; font-weight: 700; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 4vw, 2.85rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
/* Desktop / laptop: use ~80% of the viewport (capped on very large screens). */
@media (min-width: 1024px) {
  .container { width: 80%; max-width: 1700px; padding: 0; }
}
.section { padding: 3.25rem 0; }
/* Offset in-page anchor jumps so headings clear the sticky nav. */
[id] { scroll-margin-top: 90px; }
.section--tint { background: var(--paper-2); }
.section--teal { background: var(--teal-050); }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .72rem;
  font-weight: 700;
  color: var(--amber-deep);
  margin-bottom: .75rem;
  display: inline-block;
}
.section__head { max-width: 760px; margin-bottom: 2rem; }
.section__head p { color: var(--ink-soft); font-size: 1.05rem; }
.text-center { text-align: center; }
.center-head { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; cursor: pointer; transition: .18s ease;
  text-align: center; line-height: 1.1;
}
.btn--primary { background: var(--amber); color: var(--navy); border-color: var(--amber); }
.btn--primary:hover { background: var(--amber-deep); border-color: var(--amber-deep); color: #fff; }
.btn--solid { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn--solid:hover { background: var(--teal-600); color:#fff; }
.btn--ghost { background: transparent; color: var(--teal); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--teal); background: var(--teal-050); }
.btn--light { background: #fff; color: var(--teal); border-color: var(--line); }
.btn--light:hover { background: var(--teal-050); }
.btn--block { display: flex; width: 100%; }
.btn--sm { padding: .5rem .9rem; font-size: .85rem; }
.btn--danger { background: var(--danger); color:#fff; border-color: var(--danger); }
.btn--danger:hover { filter: brightness(1.1); color:#fff; }

/* ===========================================================================
   HEADER - three tiers per brief: utility bar / brand+search / nav
   =========================================================================== */
.topbar {
  background: var(--navy); color: #cfe0e7;
  font-size: .82rem;
}
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .45rem 0; min-height: 38px; }
.topbar a { color: #dbe8ee; }
.topbar a:hover { color: #fff; }
.topbar__meta { display: flex; gap: 1.25rem; align-items: center; }
.topbar__meta span { display:inline-flex; align-items:center; gap:.4rem; }
.topbar__auth { display: flex; gap: .5rem; align-items: center; }
.topbar__auth .divider { opacity: .4; }

.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.15rem 0; }
.brand { display: flex; align-items: center; gap: .9rem; }
.brand__mark { flex: none; }
.brand__text strong { display: block; font-family: var(--display); font-weight: 700; font-size: 1.18rem; color: var(--navy); line-height: 1.1; letter-spacing: -.01em; }
.brand__text span { display: block; font-size: .74rem; color: var(--ink-soft); letter-spacing: .03em; margin-top: 2px; }

.search { display: flex; align-items: center; gap: 0; max-width: 360px; flex: 1; }
.search form { display: flex; width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--paper-2); transition: border-color .15s ease, box-shadow .15s ease; }
.search form:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,39,107,.10); }
.search input { flex: 1; border: 0; padding: .6rem .85rem; font: inherit; font-size: .9rem; outline: none; min-width: 0; }
.search input:focus { background: var(--teal-050); }
.search button { border: 0; background: var(--teal); color: #fff; padding: 0 1rem; cursor: pointer; }
.search button:hover { background: var(--teal-600); }

/* Primary nav */
.nav { background: var(--teal); position: sticky; top: 0; z-index: 50; }
.nav__inner { display: flex; align-items: center; justify-content: space-between; }
.nav__menu { list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0; }
.nav__menu > li { position: relative; }
.nav__menu > li > a {
  display: block; color: #eaf3f6; font-weight: 600; font-size: .9rem;
  padding: 1rem .95rem; letter-spacing: .01em;
}
.nav__menu > li > a:hover, .nav__menu > li.is-open > a { background: var(--navy); color: #fff; }
.nav__menu .has-sub > a::after { content: "▾"; font-size: .7rem; margin-left: .35rem; opacity: .8; }

.submenu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px;
  background: #fff; box-shadow: var(--shadow); border-radius: var(--radius-sm);
  list-style: none; margin: 0; padding: .5rem 0; display: none;
}
.nav__menu > li.is-open .submenu { display: block; }
.nav__menu .has-sub > a[aria-expanded="true"]::after { transform: rotate(180deg); display: inline-block; }
.submenu li a { display: block; padding: .6rem 1.1rem; color: var(--ink); font-size: .88rem; font-weight: 500; }
.submenu li a:hover { background: var(--teal-050); color: var(--teal); padding-left: 1.3rem; }

.nav__toggle { display: none; background: transparent; border: 0; color: #fff; font-size: 1.5rem; padding: .75rem 1rem; cursor: pointer; }

/* ===========================================================================
   HERO
   =========================================================================== */
.hero { position: relative; background: linear-gradient(120deg, var(--navy) 0%, var(--teal) 50%, var(--green) 100%); color: #fff; overflow: hidden; }
.hero::after {
  /* faint radial "lightbox glow" */
  content: ""; position: absolute; right: -10%; top: -30%; width: 60%; height: 160%;
  background: radial-gradient(circle, rgba(212,175,55,.20), transparent 60%); pointer-events: none;
}
.hero__inner {
  position: relative; padding: 5rem 0 4.5rem;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 3rem; align-items: center;
}
.hero__content { min-width: 0; }
.hero .eyebrow { margin-bottom: .5rem; }
.hero h1 { color: #fff; font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin-bottom: .7rem; }
.hero__lead { font-size: .98rem; line-height: 1.55; color: #d7e6ec; margin-bottom: .8rem; max-width: 640px; }
.hero__sub { font-size: .88rem; line-height: 1.5; color: #bcd2db; margin-bottom: 1.25rem; max-width: 640px; }
.hero__cta { display: flex; gap: .7rem; flex-wrap: wrap; }
.hero__cta .btn { padding: .65rem 1.1rem; font-size: .88rem; }

/* Hero banner image (right side) */
.hero__media { position: relative; }
.hero__media img {
  display: block; width: 100%; height: auto; border-radius: 16px;
  background: #fff; padding: 8px;
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .12);
}
.hero__pills { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.18); }
.hero__pill strong { font-family: var(--display); font-size: 1.5rem; display: block; color: var(--amber); }
.hero__pill span { font-size: .82rem; color: #c8dce3; }

/* Tagline strip */
.kicker-strip { background: var(--amber); color: var(--navy); text-align: center; font-weight: 600; font-size: .9rem; letter-spacing: .08em; padding: .65rem 1rem; text-transform: uppercase; }

/* Home page: justified long-form body copy (banner through content), with
   clean hyphenation. Cards, centred headings and the footer stay as-is. */
.home .hero__lead,
.home .hero__sub,
.home .with-aside > div > p,
.home .section > .container > p { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }

/* ===========================================================================
   CARDS / GRID
   =========================================================================== */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff; border-radius: var(--radius);
  padding: 1.85rem; box-shadow: var(--shadow-sm); height: 100%;
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.card__icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--teal-050);
  display: grid; place-items: center; margin-bottom: 1.1rem; color: var(--teal);
}
.card h3 { font-size: 1.18rem; margin-bottom: .5rem; }
.card p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.card ul { color: var(--ink-soft); font-size: .92rem; margin: .5rem 0 0; padding-left: 1.1rem; }
.card ul li { margin-bottom: .3rem; }

/* Feature cards - colour comes from the icon tint, not a hard top border. */
.feature:nth-child(2) .card__icon { background: #faf1dd; color: var(--amber-deep); }
.feature:nth-child(3) .card__icon { background: var(--green-050); color: var(--green); }
.feature:nth-child(4) .card__icon { background: #e9edf6; color: var(--navy); }

/* ===========================================================================
   NEWS / EVENTS / LISTS
   =========================================================================== */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 1.25rem; }
.post-item:last-child { border-bottom: 0; }
.post-date {
  flex: none; width: 64px; text-align: center; background: var(--teal-050);
  border-radius: var(--radius-sm); padding: .5rem 0; color: var(--teal); align-self: flex-start;
}
.post-date strong { display: block; font-family: var(--display); font-size: 1.4rem; line-height: 1; color: var(--navy); }
.post-date span { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.post-body h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.post-body p { color: var(--ink-soft); font-size: .94rem; margin: 0; }
.post-meta { font-size: .8rem; color: var(--ink-soft); margin-top: .35rem; }

.event-card { display:flex; flex-direction:column; }
.event-card .event-date-tag { color: var(--amber-deep); font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.event-card .event-loc { font-size: .85rem; color: var(--ink-soft); margin-top: auto; padding-top: .75rem; display:flex; align-items:center; gap:.4rem; }

/* Resource / file rows (Notification-style) */
.res-list { list-style: none; margin: 0; padding: 0; }
.res-row {
  display: flex; align-items: flex-start; gap: 1.25rem; padding: 1.75rem 1.9rem;
  border-radius: var(--radius-sm); margin-bottom: .85rem; background: #fff; box-shadow: var(--shadow-sm);
  transition: background .15s ease, box-shadow .15s ease;
}
.res-row:hover { background: var(--teal-050); box-shadow: var(--shadow); }
.res-row__icon { flex: none; width: 40px; height: 40px; border-radius: 8px; background: var(--teal-050); color: var(--teal); display:grid; place-items:center; margin-top: 2px; }
.res-row__main { flex: 1; min-width: 0; }
.res-row__main > strong { display:block; color: var(--navy); font-weight: 700; font-size: 1.08rem; line-height: 1.35; margin-bottom: .15rem; }
.res-row__main span { font-size: .82rem; color: var(--ink-soft); }
.res-row__desc { margin: .4rem 0 .55rem; line-height: 1.75; color: var(--ink); text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
.res-row__action { flex: none; align-self: flex-start; margin-top: 2px; }

/* ===========================================================================
   FORMS
   =========================================================================== */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__label { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .35rem; font-weight: 600; font-size: .9rem; color: var(--navy); }
/* Keep the caption (label text + required *) on one line; push fields to their own line. */
.form__label > .form__input,
.form__label > .form__select,
.form__label > .form__textarea,
.form__label > .form__hint,
.form__label > .g-recaptcha,
.form__label > .ck { flex: 1 0 100%; }
.req { line-height: 1; }

/* CKEditor: full width, sensible editing height, brand focus colour */
.form__label > .ck.ck-editor { width: 100%; }
.ck-editor__editable_inline { min-height: 180px; }
.ck.ck-editor__main > .ck-editor__editable.ck-focused { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(22,39,107,.13); }

/* Rendered rich text (CKEditor output) on public pages */
.rich-text > :first-child { margin-top: 0; }
.rich-text > :last-child { margin-bottom: 0; }
.rich-text p { margin: 0 0 .8rem; }
.rich-text ul, .rich-text ol { margin: 0 0 .8rem; padding-left: 1.3rem; }
.rich-text li { margin-bottom: .3rem; }
.rich-text h2, .rich-text h3, .rich-text h4 { margin: 1.1rem 0 .5rem; }
.rich-text a { color: var(--teal); text-decoration: underline; display: inline; overflow-wrap: break-word; }
/* Tidy stray editor markup: drop empty paragraphs and reduce double line-breaks. */
.rich-text p:empty { display: none; }
.rich-text br + br { display: none; }
.rich-text blockquote { margin: 0 0 .8rem; padding: .4rem 0 .4rem 1rem; border-left: 3px solid var(--amber); color: var(--ink-soft); }
.rich-text table { border-collapse: collapse; margin: 0 0 .8rem; }
.rich-text table td, .rich-text table th { border: 1px solid var(--line); padding: .4rem .6rem; }
.form__input, .form__select, .form__textarea {
  font: inherit; font-size: .95rem; padding: .75rem .9rem; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--paper-2); color: var(--ink); width: 100%; font-weight: 400;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form__input:focus, .form__select:focus, .form__textarea:focus {
  outline: none; border-color: var(--teal); background: #fff; box-shadow: 0 0 0 3px rgba(22,39,107,.13);
}
.form__textarea { min-height: 130px; resize: vertical; }
.form__hint { font-size: .8rem; color: var(--ink-soft); font-weight: 400; }
.form__check { flex-direction: row; align-items: center; gap: .6rem; font-weight: 500; }
.form__check input { width: 18px; height: 18px; accent-color: var(--teal); }
.req { color: var(--danger); }

/* Newsletter signup (footer): inline on desktop, stacks on mobile */
.newsletter-form { flex-direction: row; max-width: 480px; margin: 1.25rem auto 0; gap: .6rem; }
.newsletter-form .form__input { flex: 1; }

/* ===========================================================================
   FLASH
   =========================================================================== */
.flash { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: .92rem; border: 1px solid; }
.flash--success { background: #eaf6ef; border-color: #b6dcc6; color: var(--success); }
.flash--error   { background: #fbeceb; border-color: #f0c4c1; color: var(--danger); }
.flash--info    { background: var(--teal-050); border-color: #bcd6df; color: var(--info); }

/* ===========================================================================
   PAGE HEADER (interior pages)
   =========================================================================== */
.page-header { background: linear-gradient(120deg, var(--navy) 0%, var(--teal) 55%, var(--green) 100%); color: #fff; padding: 2.5rem 0; }
.page-header h1 { color: #fff; margin: 0; }
.breadcrumb { font-size: .82rem; color: #bcd2db; margin-bottom: .6rem; }
.breadcrumb a { color: #dbe8ee; }
.breadcrumb a:hover { color:#fff; }

.prose { max-width: 800px; }
.prose p { text-align: justify; text-justify: inter-word; hyphens: auto; -webkit-hyphens: auto; }
.prose h2 { margin-top: 1.75rem; }
.prose h3 { margin-top: 1.25rem; color: var(--teal); }
.prose ul { padding-left: 1.25rem; color: var(--ink-soft); }
.prose ul li { margin-bottom: .4rem; }

/* Two-column content + sidebar */
.with-aside { display: grid; grid-template-columns: 1fr 300px; gap: 2.25rem; align-items: start; }
.aside-card { background: var(--teal-050); border-radius: var(--radius); padding: 1.6rem; }
.aside-card h3 { font-size: 1.05rem; }
.aside-card + .aside-card { margin-top: 1.25rem; }

/* ---------- Governing body / committee ---------- */
.committee-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem; margin: 1.5rem 0 1rem;
}
.committee-card {
  margin: 0; padding: 1.75rem 1.25rem; text-align: center;
  background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease;
}
.committee-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.committee-card__photo {
  width: 104px; height: 104px; border-radius: 50%; object-fit: cover;
  margin: 0 auto .9rem; display: block; border: 3px solid var(--teal-050);
}
.committee-card figcaption strong { display: block; font-family: var(--display); color: var(--navy); font-size: 1.02rem; }
.committee-card__role { display: block; color: var(--amber-deep); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; margin-top: .2rem; }
.committee-card__aff { display: block; color: var(--ink-soft); font-size: .85rem; margin-top: .35rem; line-height: 1.45; }

/* Initial-letter avatar fallback (used when no photo is uploaded) */
.avatar-placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--teal); color: #fff; font-family: var(--display); font-weight: 600;
  font-size: 2.2rem; line-height: 1;
}

/* ===========================================================================
   PRICING / MEMBERSHIP CATEGORIES
   =========================================================================== */
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.price-card { background:#fff; border-radius: var(--radius); padding: 2rem 1.6rem; text-align: center; display:flex; flex-direction:column; box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease; }
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card.is-featured { box-shadow: 0 0 0 2px var(--amber), var(--shadow); }
.price-card__badge { display:inline-block; background: var(--amber); color: var(--navy); font-size:.68rem; font-weight:700; letter-spacing:.08em; text-transform:uppercase; padding:.25rem .6rem; border-radius:99px; margin-bottom:.75rem; }
.price-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.price-card__amt { font-family: var(--display); font-size: 2.1rem; color: var(--teal); font-weight: 700; margin: .25rem 0; }
.price-card__amt small { font-size: .85rem; color: var(--ink-soft); font-weight: 400; font-family: var(--sans); }
.price-card p { font-size: .88rem; color: var(--ink-soft); flex: 1; }

/* ===========================================================================
   TABLES (admin / directory)
   =========================================================================== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); background:#fff; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th, .table td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.table th { background: var(--teal-050); color: var(--navy); font-weight: 600; white-space: nowrap; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table tbody tr:hover { background: var(--paper-2); }
.table td.actions { display:flex; flex-wrap: wrap; gap:.4rem; align-items: center; }

.badge { display:inline-block; padding:.2rem .6rem; border-radius:99px; font-size:.74rem; font-weight:600; }
.badge--pending { background:#fdf0d8; color:#9a6b15; }
.badge--active  { background:#e3f4ea; color: var(--success); }
.badge--suspended,.badge--rejected { background:#fbeceb; color: var(--danger); }
.badge--admin { background: var(--navy); color:#fff; }
.badge--member { background: var(--teal-050); color: var(--teal); }

/* ===========================================================================
   ADMIN CHROME (slim bar + footer, replaces the public header on /admin)
   =========================================================================== */
.admin-body { background: var(--paper-2); }
.admin-bar { background: var(--navy); color:#fff; position: sticky; top:0; z-index:60; box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.admin-bar__inner { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.55rem 1.5rem; }
.admin-bar__brand { display:flex; align-items:center; gap:.6rem; color:#fff; font-family: var(--display); font-weight:700; font-size:1.05rem; }
.admin-bar__brand small { font-weight:500; opacity:.7; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; }
.admin-bar__mark { flex:none; display:flex; }
.admin-bar__mark span, .admin-bar__mark img { width:34px !important; height:34px !important; }
.admin-bar__actions { display:flex; align-items:center; gap:1.1rem; font-size:.85rem; color:#cfe0e7; }
.admin-bar__actions a { color:#cfe0e7; }
.admin-bar__actions a:hover { color:#fff; }

.admin-foot { background: var(--navy); color:#9fb4bf; }
.admin-foot__inner { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; padding:1rem 1.5rem; font-size:.82rem; }
.admin-foot__inner a { color:#cfe0e7; }

/* ===========================================================================
   DASHBOARD
   =========================================================================== */
.dash { display:grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.dash__side { background: var(--navy); color:#cfe0e7; padding: 1.5rem 0; }
.dash__side h2 { color:#fff; font-size: 1rem; padding: 0 1.75rem; margin-bottom: 1rem; }
.dash__nav { list-style:none; margin:0; padding:0 .75rem; }
.dash__nav a { display:block; padding:.7rem 1rem; margin-bottom:.15rem; color:#cfe0e7; font-size:.9rem; font-weight:500; border-radius:10px; transition: background .15s ease, color .15s ease; }
.dash__nav a:hover { background: rgba(255,255,255,.07); color:#fff; }
.dash__nav a.is-active { background: rgba(212,175,55,.16); color:#fff; }
.dash__main { padding: 2rem; background: var(--paper-2); min-width: 0; overflow-x: clip; }
/* Admin cards size to their content (no full-height stretch like the home grid). */
.dash__main .card { height: auto; }

.stat-grid { display:grid; grid-template-columns: repeat(4,1fr); gap:1.25rem; margin-bottom:2rem; }
.stat { background:#fff; border-radius: var(--radius); padding:1.5rem; box-shadow: var(--shadow-sm); }
.stat strong { display:block; font-family: var(--display); font-size: 2rem; color: var(--teal); line-height:1; }
.stat span { font-size:.82rem; color: var(--ink-soft); text-transform:uppercase; letter-spacing:.05em; }

.panel { background:#fff; border-radius: var(--radius); padding: 1.75rem; margin-bottom: 1.5rem; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.panel__head { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; gap:1rem; flex-wrap:wrap; }
.panel__head h2 { margin:0; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
.footer { background: var(--navy); color: #b6cad3; padding: 3.5rem 0 0; }
.footer__grid { display:grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer h4 { color:#fff; font-family: var(--sans); font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.footer a { color:#b6cad3; font-size:.9rem; }
.footer a:hover { color:#fff; }
.footer ul { list-style:none; margin:0; padding:0; }
.footer ul li { margin-bottom:.5rem; }
.footer__brand strong { font-family: var(--display); font-size:1.15rem; color:#fff; display:block; margin-bottom:.5rem; }
.footer__brand p { font-size:.88rem; line-height:1.7; max-width: 320px; }
.footer__news input { width:100%; padding:.65rem .8rem; border:0; border-radius: var(--radius-sm); font:inherit; font-size:.88rem; margin-bottom:.6rem; }
.footer__bottom { border-top:1px solid rgba(255,255,255,.12); padding:1.25rem 0; font-size:.82rem; display:flex; justify-content:space-between; flex-wrap:wrap; gap:.5rem; }
.footer__values { letter-spacing:.12em; text-transform:uppercase; font-size:.75rem; color:var(--amber); }

/* ===========================================================================
   AUTH PAGES
   =========================================================================== */
.auth-body { background: linear-gradient(135deg, var(--navy), var(--teal)); min-height: 100vh; display:grid; place-items:center; padding: 2rem 1rem; }
.auth-card { background:#fff; width:100%; max-width: 460px; border-radius: var(--radius); padding: 2.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-card--wide { max-width: 720px; }
.auth-card__brand { font-family: var(--display); color: var(--navy); font-size: 1.5rem; margin-bottom: .25rem; }
.auth-card__sub { color: var(--ink-soft); font-size:.92rem; margin-bottom: 1.5rem; }
.auth-card__foot { text-align:center; margin-top:1.25rem; font-size:.9rem; color: var(--ink-soft); }

/* Inline logout form (topbar) - looks like a link */
.logout-form { display:inline; margin:0; }
.logout-form button { background:none; border:0; padding:0; font:inherit; color:inherit; cursor:pointer; text-decoration:none; }
.logout-form button:hover { text-decoration:underline; }

/* ===========================================================================
   MISC
   =========================================================================== */
.mt-0{margin-top:0}.mt-1{margin-top:.5rem}.mt-2{margin-top:1rem}.mt-3{margin-top:1.5rem}.mb-0{margin-bottom:0}
.divider-line { height:1px; background: var(--line); border:0; margin: 2rem 0; }
.muted { color: var(--ink-soft); }
.skip-link { position:absolute; left:-999px; top:0; background: var(--amber); color: var(--navy); padding:.6rem 1rem; z-index:100; }
.skip-link:focus { left:0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
@media (max-width: 960px) {
  .with-aside { grid-template-columns: 1fr; }
  .dash { grid-template-columns: 1fr; }
  .dash__side { padding: 1rem 0; }
  .dash__nav { display:flex; flex-wrap:wrap; padding: 0 .75rem; }
  .stat-grid, .pricing, .grid--4 { grid-template-columns: repeat(2,1fr); }
  /* Hero stacks: text on top, banner below */
  .hero__inner { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero__media { max-width: 620px; margin: 0 auto; width: 100%; }
}
@media (max-width: 800px) {
  /* ---- Mobile header: logo + menu button on one row, search beneath ---- */
  .masthead__inner { flex-wrap: wrap; align-items: center; gap: .65rem 1rem; padding: .9rem 0; }
  .brand { flex: 1 1 auto; min-width: 0; gap: .65rem; }
  .brand__mark img, .brand__mark span { width: 52px !important; height: 52px !important; }
  .brand__text { min-width: 0; }
  .brand__text strong { font-size: 1.05rem; }
  .brand__text span { font-size: .68rem; line-height: 1.3; }
  .nav__toggle {
    display: inline-flex; align-items: center; justify-content: center; order: 2;
    color: var(--navy); background: var(--paper-2); border: 1px solid var(--line);
    border-radius: 12px; width: 46px; height: 44px; font-size: 1.5rem; padding: 0;
  }
  .nav__toggle:hover { background: var(--teal-050); }
  .search { order: 3; flex: 1 1 100%; max-width: none; }

  /* Nav bar is invisible until opened; the menu drops as a panel */
  .nav { position: static; background: transparent; box-shadow: none; }
  .nav__inner { flex-direction: column; align-items: stretch; padding: 0; }
  .nav__menu {
    display: none; flex-direction: column; margin: 0 0 .75rem; padding: .25rem 0;
    max-height: 70vh; overflow-y: auto; background: var(--teal);
    border-radius: var(--radius-sm); box-shadow: var(--shadow); overflow: hidden;
  }
  .nav__menu.is-open { display: flex; overflow-y: auto; }
  .nav__menu > li { position: static; }
  .nav__menu > li > a { padding: .9rem 1.15rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; justify-content: space-between; align-items: center; }
  .nav__menu > li:first-child > a { border-top: 0; }
  .nav__menu .has-sub > a::after { margin-left: auto; }
  .submenu { position: static; box-shadow: none; border-radius: 0; background: rgba(0,0,0,.20); padding: 0; min-width: 0; }
  .submenu li a { color: #dbe8ee; padding: .7rem 1.15rem .7rem 2.1rem; }
  .submenu li a:hover { background: rgba(0,0,0,.28); color: #fff; padding-left: 2.35rem; }

  .topbar { font-size: .78rem; }
  .topbar__inner { flex-direction: row; flex-wrap: wrap; gap: .25rem 1rem; align-items: center; justify-content: space-between; padding: .4rem 0; }
  .hide-sm { display: none !important; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .committee-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
}
@media (max-width: 560px) {
  .grid--2, .grid--3, .grid--4, .form__row, .stat-grid, .pricing { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero__inner { padding: 3rem 0; gap: 1.75rem; }
  .section { padding: 2.5rem 0; }
  .page-header { padding: 2rem 0; }
  .with-aside { gap: 2rem; }
  .dash__main { padding: 1.25rem; }
  .post-item { flex-direction: column; gap:.75rem; }
  .post-date { width:auto; display:inline-flex; gap:.5rem; padding:.4rem .7rem; align-items:baseline; }
  .committee-grid { grid-template-columns: 1fr 1fr; }
  .committee-card { padding: 1.1rem .75rem; }
  .committee-card__photo { width: 84px; height: 84px; }

  /* Newsletter form stacks: full-width field + button */
  .newsletter-form { flex-direction: column; gap: .7rem; }
  .newsletter-form .btn { width: 100%; }

  /* Footer bottom row centers cleanly */
  .footer__bottom { flex-direction: column; text-align: center; gap: .4rem; }
}

/* ---- Small phones ---- */
@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }

  /* Compact brand: drop the long subtitle, keep the AARAIS wordmark */
  .brand__text span { display: none; }

  /* Full-width, comfortable tap targets for hero actions */
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }

  /* Stack the utility bar so email + auth links never collide */
  .topbar__inner { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .topbar__meta, .topbar__auth { gap: .5rem .75rem; flex-wrap: wrap; }

  .committee-grid { grid-template-columns: 1fr 1fr; gap: .85rem; }
}

/* ---- Site-wide promotional popup (admin-managed modal) ---- */
.popup-overlay {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 16, 38, .62);
  animation: popup-fade .25s ease;
}
.popup-overlay[hidden] { display: none; }
@keyframes popup-fade { from { opacity: 0; } to { opacity: 1; } }
.popup-modal {
  position: relative;
  width: 100%; max-width: 460px;
  max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(8, 16, 38, .45);
  animation: popup-rise .3s ease;
}
@keyframes popup-rise { from { transform: translateY(18px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.popup-close {
  position: absolute; top: .5rem; right: .6rem; z-index: 2;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .9); color: var(--navy);
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  box-shadow: 0 2px 8px rgba(8, 16, 38, .2);
}
.popup-close:hover { background: #fff; color: var(--teal-600); }
.popup-imglink { display: block; }
.popup-image {
  display: block; width: 100%; height: auto;
  max-height: 320px; object-fit: cover;
  border-radius: 14px 14px 0 0;
}
.popup-body { padding: 1.4rem 1.6rem 1.6rem; text-align: center; }
.popup-heading { margin: 0 0 .5rem; font-size: 1.3rem; }
.popup-text { color: var(--ink, #333); font-size: .96rem; line-height: 1.6; }
.popup-text :last-child { margin-bottom: 0; }
.popup-cta { margin-top: 1.1rem; }
