:root {
  --navy: #14315b;
  --navy-dark: #0e2340;
  --navy-light: #1f4a86;
  --gold: #f5b731;
  --gold-dark: #d99a1c;
  --red: #c0392b;
  --ink: #1f2733;
  --body: #3a4656;
  --muted: #6b7688;
  --line: #e4e8ef;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-softer: #eef2f8;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(20, 49, 91, 0.08);
  --shadow-lg: 0 20px 50px rgba(20, 49, 91, 0.14);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy-light); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

.container { width: min(1120px, 92%); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  font-weight: 700; color: var(--gold-dark); margin-bottom: .5rem;
}
.text-link { color: var(--navy-light); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  padding: .8rem 1.5rem; border-radius: 999px; text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: .5rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--gold); color: var(--navy-dark); box-shadow: 0 6px 16px rgba(245,183,49,.35); }
.btn-primary:hover { background: var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--navy); border: 2px solid var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy-dark); }
.btn-danger { background: #fdecea; color: var(--red); border: 1px solid #f5c6c0; }
.btn-danger:hover { background: var(--red); color: #fff; }
.link-button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; }

/* ---------- Header ---------- */
.site-header {
  background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand-badge {
  background: var(--gold); color: var(--navy-dark); font-weight: 800;
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.05rem; letter-spacing: -.02em; flex: none;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.25);
}
.brand-badge.small { width: 34px; height: 34px; font-size: .9rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; }
.brand-text small { color: #b9c8e0; font-size: .78rem; }

.site-nav { display: flex; align-items: center; gap: .3rem; }
.site-nav a, .site-nav .link-button {
  color: #dce5f2; padding: .5rem .8rem; border-radius: 8px; font-weight: 500;
  font-size: .95rem; transition: background .12s, color .12s;
}
.site-nav a:hover, .site-nav .link-button:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.site-nav a.active { color: #fff; background: rgba(245,183,49,.2); }
.nav-login { border: 1.5px solid rgba(245,183,49,.6); color: var(--gold) !important; }
.nav-logout { margin: 0; display: inline; }

.nav-toggle, .nav-toggle-label { display: none; }

/* ---------- Flash ---------- */
.flash { padding: .8rem 0; font-weight: 500; }
.flash .container { width: min(1120px, 92%); }
.flash-success { background: #e7f6ec; color: #1e7a41; border-bottom: 1px solid #c5e8d1; }
.flash-error { background: #fdecea; color: #b02a1c; border-bottom: 1px solid #f5c6c0; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(245,183,49,.18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: #fff; padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.hero-inner { display: grid; grid-template-columns: 1.3fr .9fr; gap: 3rem; align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { color: #d5e0f0; font-size: 1.15rem; max-width: 34ch; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius); padding: 1.6rem; backdrop-filter: blur(6px);
}
.fact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.fact-list li { display: flex; align-items: center; gap: .9rem; color: #eaf1fb; font-weight: 500; }
.fact-list span { font-size: 1.5rem; }
.lead { font-size: 1.15rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.section-head h2 { margin: 0; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.4rem; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2rem; margin-bottom: .6rem; }
.card h3 { margin-bottom: .3rem; }
.card p { margin: 0; color: var(--body); }

/* ---------- Page hero ---------- */
.page-hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 3.8rem) 0; }
.page-hero .lead { max-width: 60ch; color: var(--body); }

/* ---------- Two column ---------- */
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 3rem; align-items: start; }
.two-col h2 { margin-top: 1.6rem; }
.two-col h2:first-child { margin-top: 0; }
.ranks, .steps { padding-left: 1.2rem; }
.ranks li, .steps li { margin-bottom: .4rem; }
.sidebar { display: grid; gap: 1.2rem; position: sticky; top: 90px; }
.sidebar-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.sidebar-card h3 { margin-bottom: .5rem; }
.sidebar-card.highlight { background: linear-gradient(160deg, var(--navy), var(--navy-light)); color: #fff; border: 0; }
.sidebar-card.highlight h3 { color: #fff; }
.sidebar-card.highlight a:not(.btn) { color: var(--gold); }
.quote { font-style: italic; color: var(--body); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.gallery-item {
  margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-softer);
  box-shadow: var(--shadow); cursor: pointer; position: relative; aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.5rem .8rem .6rem;
  color: #fff; font-size: .85rem; font-weight: 500;
  background: linear-gradient(transparent, rgba(14,35,64,.85));
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,20,38,.92); z-index: 100;
  display: grid; place-items: center; padding: 2rem;
}
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-figure img { max-width: 90vw; max-height: 80vh; border-radius: 8px; object-fit: contain; }
.lightbox-figure figcaption { color: #eaf1fb; margin-top: 1rem; font-size: 1rem; }
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.6rem; background: none; border: 0;
  color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer;
}

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: .5rem; }
.empty-state h1, .empty-state h2 { margin-bottom: .3rem; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--gold); color: var(--navy-dark); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 2.5rem 0; flex-wrap: wrap; }
.cta-band h2 { color: var(--navy-dark); margin-bottom: .2rem; }
.cta-band p { margin: 0; color: var(--navy); }

/* ---------- Forms ---------- */
.contact-form, .auth-form, .upload-form { display: grid; gap: 1rem; }
label { font-weight: 600; color: var(--ink); font-size: .95rem; display: grid; gap: .35rem; }
input, select, textarea {
  font: inherit; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-light); box-shadow: 0 0 0 3px rgba(31,74,134,.12); }
.contact-form { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }

/* ---------- Auth ---------- */
.auth-wrap { display: grid; place-items: center; padding: clamp(2rem, 6vw, 4.5rem) 1rem; background: var(--bg-soft); min-height: 60vh; }
.auth-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2.2rem; width: min(420px, 100%); text-align: center; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.auth-badge { display: grid; place-items: center; margin-bottom: 1rem; }
.auth-badge .brand-badge { width: 54px; height: 54px; font-size: 1.3rem; }
.auth-form { text-align: left; margin-top: 1.4rem; }
.auth-hint { margin-top: 1.2rem; }
.auth-hint code { background: var(--bg-softer); padding: .1rem .4rem; border-radius: 5px; font-size: .85em; }

/* ---------- Admin ---------- */
.admin-hero-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: start; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.admin-stats { text-align: center; }
.stat-number { font-size: 3rem; font-weight: 800; color: var(--navy); margin: .3rem 0 0; line-height: 1; }
.file-drop { position: relative; border: 2px dashed var(--line); border-radius: var(--radius); padding: 1.6rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; display: block; }
.file-drop:hover { border-color: var(--navy-light); background: var(--bg-soft); }
.file-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-drop-text { display: grid; gap: .2rem; }
.file-drop-icon { font-size: 1.8rem; }
.file-drop-label { font-weight: 700; color: var(--ink); }

.admin-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.admin-photo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.admin-photo-body { padding: .9rem; }
.admin-photo-caption { font-weight: 600; color: var(--ink); margin: 0 0 .2rem; font-size: .95rem; }
.admin-photo-body form { margin-top: .7rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #c3d1e6; margin-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 2rem; padding: 3rem 0 2rem; }
.footer-col h4 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .8rem; }
.footer-col a { color: #c3d1e6; display: block; margin-bottom: .4rem; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { margin: .3rem 0; }
.footer-col .brand-badge { margin-bottom: .6rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.2rem 0; }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-bottom p { margin: 0; font-size: .85rem; color: #93a6c4; }

/* ---------- Brand logo ---------- */
.brand-logo { width: 46px; height: 46px; flex: none; display: block; }
.footer-logo { width: 52px; height: 52px; margin-bottom: .6rem; }
.footer-inner { grid-template-columns: 1.5fr 1fr 1.3fr 1.3fr; }

/* Outline button that stays visible on dark backgrounds */
.btn-outline-light {
  background: rgba(255,255,255,.08); color: #fff; border: 2px solid #fff;
}
.btn-outline-light:hover { background: #fff; color: var(--navy-dark); }

/* ---------- Carousel ---------- */
.carousel-section { padding-top: 2.2rem; padding-bottom: 2.2rem; }
.carousel {
  position: relative; max-width: 820px; margin: 0 auto; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-lg); background: var(--navy-dark);
}
.carousel-track { position: relative; aspect-ratio: 16 / 9; }
.carousel-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  visibility: hidden; display: flex; align-items: center; justify-content: center;
}
.carousel-slide.is-active { opacity: 1; visibility: visible; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-caption {
  position: absolute; left: 0; right: 0; bottom: 0; color: #fff; font-weight: 500;
  padding: 2rem 1.2rem .9rem; font-size: .98rem;
  background: linear-gradient(transparent, rgba(14,35,64,.85));
}
.carousel-slide.placeholder { background: linear-gradient(150deg, var(--navy), var(--navy-light)); color: #fff; }
.carousel-slide.ph-2 { background: linear-gradient(150deg, #7a4b12, var(--gold-dark)); }
.carousel-slide.ph-3 { background: linear-gradient(150deg, #16603a, #1f8a54); }
.carousel-ph-inner { text-align: center; padding: 1.5rem; }
.carousel-ph-emoji { font-size: 3.4rem; display: block; margin-bottom: .5rem; }
.carousel-ph-inner p { font-size: 1.3rem; font-weight: 700; margin: 0 0 .3rem; }
.carousel-ph-inner .muted { color: #cfe0f6; }
.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  background: rgba(14,35,64,.55); color: #fff; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; font-size: 1.1rem; line-height: 1;
  display: grid; place-items: center; transition: background .15s;
}
.carousel-btn:hover { background: var(--navy); }
.carousel-prev { left: .8rem; }
.carousel-next { right: .8rem; }
.carousel-dots { position: absolute; left: 0; right: 0; bottom: .7rem; z-index: 3; display: flex; gap: .4rem; justify-content: center; }
.carousel-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.5); padding: 0; transition: background .15s, transform .15s;
}
.carousel-dots button.is-active { background: #fff; transform: scale(1.25); }

/* ---------- Mini events (home) ---------- */
.mini-events { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.mini-event {
  display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s;
}
.mini-event:hover { transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.mini-event strong { display: block; color: var(--ink); }

/* ---------- Events page ---------- */
.events-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; align-items: start; }
.events-side { display: grid; gap: 1.5rem; position: sticky; top: 90px; }
.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.event-item {
  display: flex; gap: 1.2rem; padding: 1.3rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.event-date {
  flex: none; width: 66px; text-align: center; border-radius: var(--radius-sm);
  background: var(--navy); color: #fff; padding: .5rem 0; align-self: flex-start;
}
.event-date.small { width: 54px; padding: .35rem 0; }
.event-month { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); font-weight: 700; }
.event-day { display: block; font-size: 1.5rem; font-weight: 800; line-height: 1.1; }
.event-date.small .event-day { font-size: 1.2rem; }
.event-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.event-head h3 { margin: 0; }
.event-meta { display: flex; flex-wrap: wrap; gap: .3rem .5rem; margin: .4rem 0 .5rem; font-size: .88rem; }
.event-desc { margin: 0; }

.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .25rem .6rem; border-radius: 999px; white-space: nowrap; }
.tag-meeting { background: #e6eefb; color: #1f4a86; }
.tag-campout { background: #e3f4e9; color: #1e7a41; }
.tag-ceremony { background: #fdecc8; color: #9a6a09; }
.tag-fundraiser { background: #fdecea; color: #b02a1c; }
.tag-community { background: #eae6fb; color: #5b3fa8; }
.tag-council { background: #dff3f5; color: #0d6d78; }

/* Calendar */
.calendar-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem; }
.calendar-title { text-align: center; margin-bottom: .8rem; }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding-bottom: .4rem; font-weight: 700; }
.calendar td { height: 40px; text-align: center; vertical-align: middle; position: relative; border-radius: 8px; }
.cal-day { font-size: .9rem; color: var(--body); }
.cal-empty { }
.cal-has-event { background: var(--bg-soft); font-weight: 700; }
.cal-has-event .cal-day { color: var(--navy); }
.cal-today { outline: 2px solid var(--gold); outline-offset: -2px; }
.cal-today .cal-day { font-weight: 800; color: var(--navy-dark); }
.cal-dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-dark); margin: 1px auto 0; }
.cal-dot.inline { display: inline-block; margin: 0 .3rem 0 0; vertical-align: middle; }
.calendar-legend { text-align: center; margin: .8rem 0 0; }

/* ---------- Council band ---------- */
.council-band { background: var(--bg-soft); border-top: 1px solid var(--line); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.council-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.council-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.8rem; }
.council-icon { font-size: 2.2rem; margin-bottom: .4rem; }
.council-contact { line-height: 1.7; margin: .6rem 0 1rem; }
.council-links { display: flex; gap: .6rem; flex-wrap: wrap; }

/* ---------- Admin: tabs, calendar mgmt, settings ---------- */
.admin-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin: 1.2rem auto 0; }
.admin-tabs a {
  padding: .55rem 1rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  color: var(--navy); background: var(--bg-soft); border: 1px solid var(--line);
}
.admin-tabs a:hover { background: var(--bg-softer); text-decoration: none; }
.admin-tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.stat-row { display: flex; gap: 2rem; justify-content: center; }
.stat-row .stat-number { margin: 0; }
.admin-stats-links { display: grid; gap: .3rem; margin-top: 1rem; }

.event-form { display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.admin-event-list { display: grid; gap: .7rem; }
.admin-event { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.admin-event > summary {
  list-style: none; cursor: pointer; padding: 1rem 1.2rem; display: flex; align-items: center;
  gap: .8rem; flex-wrap: wrap; font-weight: 600;
}
.admin-event > summary::-webkit-details-marker { display: none; }
.admin-event > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.admin-event[open] > summary::before { transform: rotate(90deg); }
.admin-event > summary:hover { background: var(--bg-soft); }
.admin-event-date { color: var(--navy); font-weight: 700; min-width: 96px; }
.admin-event-title { flex: 1; color: var(--ink); }
.event-edit { padding: 0 1.2rem 1rem; border-top: 1px solid var(--line); margin-top: -1px; }
.event-edit-actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.event-delete { padding: 0 1.2rem 1.2rem; }

.connected-note { margin-top: 1rem; color: #1e7a41; font-weight: 600; }
.steps.small { font-size: .92rem; }
.steps.small li { margin-bottom: .5rem; }

/* ---------- Announcements (public home page) ---------- */
.announcements { display: grid; gap: 1.4rem; }
.announcement {
  background: var(--bg); border: 1px solid var(--line); border-left: 5px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem;
  transition: transform .15s, box-shadow .15s;
}
.announcement:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.announcement.has-image { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 1.6rem; align-items: center; padding: 1.2rem; }
.announcement-media { border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-softer); aspect-ratio: 4/3; }
.announcement-media img { width: 100%; height: 100%; object-fit: cover; }
.announcement-body h3 { margin-bottom: .5rem; }
.announcement-body p { color: var(--body); margin: 0 0 .8rem; }
.announcement-body p:last-of-type { margin-bottom: 0; }
.announcement-link { display: inline-block; margin-top: .6rem; font-weight: 700; }
@media (max-width: 640px) {
  .announcement.has-image { grid-template-columns: 1fr; }
  .announcement-media { aspect-ratio: 16/9; }
}

/* ---------- Announcements (admin management) ---------- */
.checkbox-row { display: flex; flex-direction: row; align-items: center; gap: .55rem; font-weight: 600; color: var(--ink); }
.checkbox-row input[type=checkbox] { width: auto; margin: 0; }
.file-drop-sm { padding: 1rem; }
.admin-announcement.is-draft { opacity: .8; border-left: 4px solid var(--muted); }
.tag-draft { background: var(--bg-softer); color: var(--muted); }
.admin-ann-thumb {
  width: 40px; height: 40px; border-radius: var(--radius-sm); overflow: hidden; flex: 0 0 auto;
  display: grid; place-items: center; background: var(--bg-softer); font-size: 1.2rem;
}
.admin-ann-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-ann-order { display: flex; gap: .6rem; padding: 1rem 1.2rem 0; }
.admin-ann-current-image { display: grid; gap: .5rem; padding: .4rem 0; }
.admin-ann-current-image img { max-width: 220px; border-radius: var(--radius-sm); border: 1px solid var(--line); }

/* Google Calendar embed */
.gcal-embed { position: relative; width: 100%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff; }
.gcal-embed iframe { display: block; width: 100%; height: 640px; border: 0; }
@media (max-width: 640px) { .gcal-embed iframe { height: 520px; } .form-row { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .events-layout, .council-grid { grid-template-columns: 1fr; }
  .events-side { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-inner, .two-col, .admin-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-inner { grid-template-columns: 1fr 1fr; }

  .nav-toggle-label {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; padding: .4rem;
  }
  .nav-toggle-label span { width: 26px; height: 3px; background: #fff; border-radius: 3px; transition: .2s; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--navy-dark);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem 6%;
    max-height: 0; overflow: hidden; transition: max-height .25s ease; box-shadow: 0 10px 20px rgba(0,0,0,.2);
  }
  .site-nav a, .site-nav .nav-logout { width: 100%; padding: .8rem .6rem; border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-toggle:checked ~ .site-nav { max-height: 420px; }
}
@media (max-width: 520px) {
  .footer-inner { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}

/* ---------- About nav dropdown ---------- */
.nav-item { position: relative; display: flex; align-items: center; }
.site-nav .has-dropdown > a { display: inline-flex; align-items: center; gap: .3rem; }
.caret { font-size: .65em; transition: transform .15s ease; }
.has-dropdown:hover .caret, .has-dropdown:focus-within .caret { transform: rotate(180deg); }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--navy-dark); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: .4rem; z-index: 60;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown a {
  display: flex; align-items: center; gap: .5rem; white-space: nowrap;
  padding: .55rem .7rem; border-radius: var(--radius-sm); color: #fff; font-weight: 600;
}
.dropdown a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.dropdown a.active { background: rgba(245,183,49,.2); }
.dd-emoji { font-size: 1.1em; }
.dd-grade { color: var(--gold); font-size: .8em; font-weight: 500; margin-left: auto; padding-left: .8rem; }

/* ---------- Den pages ---------- */
.ranks { list-style: none; padding-left: 0; }
.ranks a { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); font-weight: 600; }
.ranks a:hover { color: var(--navy-light); text-decoration: none; }
.ranks a:hover .rank-arrow { transform: translateX(4px); }
.rank-emoji { font-size: 1.2em; }
.rank-arrow { color: var(--gold-dark); transition: transform .15s ease; }

.den-switcher { display: flex; flex-wrap: wrap; gap: .8rem; }
.den-chip {
  display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--bg); box-shadow: var(--shadow); color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.den-chip:hover { border-color: var(--gold); transform: translateY(-2px); text-decoration: none; }
.den-chip.current { border-color: var(--gold); background: var(--bg-soft); }
.den-chip-emoji { font-size: 1.6rem; line-height: 1; }
.den-chip-text { display: flex; flex-direction: column; }
.den-chip-text strong { color: var(--ink); }
.den-chip-text small { color: var(--muted); font-size: .78rem; }

/* Dropdown on the mobile (stacked) nav: show it inline instead of on hover. */
@media (max-width: 860px) {
  .nav-item { flex-direction: column; align-items: stretch; width: 100%; }
  .site-nav .has-dropdown > a { justify-content: space-between; }
  .caret { display: none; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; background: rgba(0,0,0,.18); border-radius: 0;
    padding: 0; min-width: 0;
  }
  .dropdown a { padding: .7rem .6rem .7rem 1.8rem; border-bottom: 1px solid rgba(255,255,255,.06); }
  .nav-toggle:checked ~ .site-nav { max-height: 900px; }
}
