/* ============================================================
   Site-wide styles — sits on top of the theme's styles.css.
   Palette: Cub Scout navy + warm cream instead of pure black/white,
   Cub Scout gold as the main accent (icons, buttons, underlines) and
   blue for links and accents on light sections. Varela Round for
   headings. (The --warm-black variable names are left over from the
   troop site's charcoal palette; they now hold the navy.)
   ============================================================ */

:root {
  --warm-black: #0e1b2f;
  --warm-black-rgb: 14, 27, 47;
  --warm-cream: #f6f1e6;
  --warm-cream-rgb: 246, 241, 230;
  --accent-warm: #f2b41c;
  --accent: #f2b41c;
  --accent-hover: #ffc83d;
  --pack-blue: #1f5aa6;

  /* re-point Bootstrap's own black/light so every utility that uses them
     (bg-black, bg-light, text-black, etc.) picks up the warm palette too */
  --bs-black: var(--warm-black);
  --bs-black-rgb: var(--warm-black-rgb);
  --bs-light: var(--warm-cream);
  --bs-light-rgb: var(--warm-cream-rgb);
}

/* small gold underline under section headings, for a touch of
   Cub Scout color */
.whatwedo-section h2::after,
.why-section h2::after,
.text-section h2::after,
.about-section h1::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  background: var(--accent-warm);
  margin: 0.75rem auto 0;
}
/* split-section headings are left-aligned, so their underline should be
   flush-left instead of centered under the (now much wider) heading box */
.split-section h2::after {
  margin-left: 0;
  margin-right: auto;
}

/* vendored theme bits that use literal black rather than a variable.
   NOTE: the theme makes #mainNav transparent at desktop widths until
   scrolled (.navbar-shrink is added by scripts.js) — restore that
   here rather than forcing a background at all times. */
#mainNav {
  background-color: var(--warm-black);
}
@media (min-width: 992px) {
  #mainNav {
    background-color: transparent;
  }
}
#mainNav.navbar-shrink {
  background-color: var(--warm-black);
}
.about-section {
  background: linear-gradient(to bottom, var(--warm-black) 0%, rgba(var(--warm-black-rgb), 0.9) 75%, rgba(var(--warm-black-rgb), 0.8) 100%);
}
/* when the intro has a banner photo, give it real room to be seen —
   noticeably smaller than the homepage hero (~100vh), but not cramped */
.about-banner {
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.about-banner .container {
  width: 100%;
}

/* --- Hero (reuses .masthead look, shorter) --- */
.hero-section {
  min-height: 70vh;
  padding: 9rem 0 6rem;
}
.hero-section .btn {
  margin-top: 1.5rem;
}
/* .masthead h1 is sized/styled for a short 2-3 word punchy headline
   (huge, all-caps, fading gradient text) — a longer sentence-style
   headline needs its own, much more readable treatment */
.masthead h1.hero-title-sentence {
  font-size: 2rem;
  line-height: 1.35;
  letter-spacing: normal;
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  -webkit-background-clip: initial;
}
@media (min-width: 768px) {
  .masthead h1.hero-title-sentence {
    font-size: 2.75rem;
  }
}
@media (min-width: 992px) {
  .masthead h1.hero-title-sentence {
    font-size: 3.25rem;
  }
}

/* --- What We Do --- */
.whatwedo-section {
  padding: 6rem 0;
  background: linear-gradient(to bottom, var(--warm-black) 0%, rgba(var(--warm-black-rgb), 0.9) 75%, rgba(var(--warm-black-rgb), 0.8) 100%);
}
.whatwedo-section h2 {
  margin-bottom: 3rem;
}
.whatwedo-item {
  margin-bottom: 2.5rem;
}
.whatwedo-icon {
  font-size: 2.25rem;
  color: var(--accent);
  margin-bottom: 1rem;
  display: inline-block;
}
.whatwedo-item .whatwedo-title {
  color: #fff;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}
.whatwedo-items {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
}
.whatwedo-desc {
  margin-top: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}
/* dark-text variants for whatwedo-item tiles used on a light section */
.whatwedo-title-dark {
  color: #212529 !important;
}
.whatwedo-desc-dark {
  color: #6c757d !important;
}

/* --- Gear item list (photo + stacked list) --- */
.gear-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.gear-icon {
  flex: 0 0 auto;
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 0.2rem;
}
.gear-title {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.gear-text {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
}

/* --- FAQ --- */
.faq-list {
  max-width: 48rem;
  margin: 2.5rem auto 0;
}
.faq-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.faq-item:first-child {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.faq-question {
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
}
.faq-answer {
  color: rgba(255, 255, 255, 0.6);
}

/* --- Recent Adventures gallery --- */
.gallery-section {
  padding: 6rem 0;
}
.gallery-item {
  margin-bottom: 2rem;
}
.gallery-item img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  border-radius: 0.25rem;
}
.gallery-item .gallery-caption {
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}
.gallery-section .see-more {
  margin-top: 1rem;
}

/* --- Gallery lightbox --- */
.gallery-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.gallery-trigger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#galleryLightbox .modal-content {
  border: 1px solid rgba(255, 255, 255, 0.15);
}
#galleryLightbox .lightbox-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
}
#galleryLightbox img {
  max-height: 80vh;
  width: 100%;
  object-fit: contain;
}
#galleryLightbox .lightbox-caption {
  padding: 1rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

/* --- Checklist sections (why-item) --- */
.why-section {
  padding: 6rem 0;
  background: linear-gradient(to bottom, var(--warm-black) 0%, rgba(var(--warm-black-rgb), 0.9) 75%, rgba(var(--warm-black-rgb), 0.8) 100%);
}
.why-section h2 {
  margin-bottom: 3rem;
}
.why-item {
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
}
.why-icon {
  color: var(--accent);
  margin-right: 0.6rem;
}
/* on a light section, why-item text needs to be dark instead of white */
.bg-light .why-item {
  color: rgba(0, 0, 0, 0.65);
}

/* --- Generic content sections (About page, etc.) --- */
.text-section {
  padding: 6rem 0;
  background: linear-gradient(to bottom, var(--warm-black) 0%, rgba(var(--warm-black-rgb), 0.9) 75%, rgba(var(--warm-black-rgb), 0.8) 100%);
}
/* bg-light only overrides background-color; this gradient is a background-image
   and would otherwise paint over it regardless of source order */
.text-section.bg-light {
  background-image: none;
}
.text-section h2 {
  margin-bottom: 1.5rem;
}
.text-section p {
  margin-bottom: 0;
}

/* --- Split sections (photo alongside text, About page) --- */
.split-section p {
  margin-bottom: 1rem;
}
.split-photo {
  width: 100%;
  height: 20rem;
  object-fit: cover;
  border-radius: 0.25rem;
  display: block;
}
.split-caption {
  margin-top: 0.6rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}
/* the light-on-dark gallery-caption color needs to flip on a light section */
.bg-light .split-caption {
  color: #6c757d;
}

/* --- A Year With Pack 577 / Calendar (timeline list) --- */
.year-timeline {
  max-width: 48rem;
  margin: 3rem auto 0;
}
.year-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.year-row:first-child {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.year-month {
  flex: 0 0 9rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05rem;
}
.year-text {
  flex: 1 1 20rem;
  color: #444;
}
/* dark-section variant (Calendar page's typical-year timeline) */
.year-timeline-dark .year-row {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.year-timeline-dark .year-row:first-child {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.year-timeline-dark .year-text {
  color: rgba(255, 255, 255, 0.6);
}
.year-note-dark {
  color: rgba(255, 255, 255, 0.5) !important;
}
.year-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #6c757d;
  font-style: italic;
}

/* --- New to Scouts / Crossing Over --- */
.newscouts-section {
  padding: 6rem 0;
}
.newscouts-card {
  background: #fffdf8;
  border-radius: 0.25rem;
  padding: 2.5rem 2rem;
  height: 100%;
  text-align: center;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}
.newscouts-card h3 {
  margin-bottom: 1rem;
}
.newscouts-card p {
  color: #6c757d;
  margin-bottom: 1.5rem;
}

/* --- Quotes --- */
.quotes-section {
  padding: 6rem 0;
  background: var(--warm-black);
}
.quote-item {
  margin-bottom: 3rem;
}
.quote-item p.quote-text {
  font-family: "Varela Round", sans-serif;
  font-size: 1.4rem;
  color: #fff;
  max-width: 40rem;
  margin: 0 auto 1rem;
}
.quote-item p.quote-text::before {
  content: "\201C";
}
.quote-item p.quote-text::after {
  content: "\201D";
}
.quote-item .quote-attribution {
  color: var(--accent);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
}

/* --- Final CTA --- */
.final-cta-section {
  padding: 7rem 0;
  text-align: center;
  background: linear-gradient(to bottom, rgba(var(--warm-black-rgb), 0.9) 0%, var(--warm-black) 100%);
}
.final-cta-section .cta-detail {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 0.25rem;
}
.cta-icon {
  color: var(--accent);
  margin-right: 0.4rem;
}
.final-cta-section .btn {
  margin-top: 2rem;
}

/* --- Visit Us page --- */
.visit-fact {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.4rem;
}
.visit-address {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: -0.2rem;
  margin-bottom: 0.4rem;
}
.map-embed {
  position: relative;
  width: 100%;
  padding-top: 60%;
  border-radius: 0.25rem;
  overflow: hidden;
}
.map-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.visit-form {
  margin-top: 2rem;
}
.visit-form .form-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #212529;
}
.visit-form .btn {
  margin-top: 0.5rem;
}

/* --- Nav CTA button (site.Params.navButton, "Join Pack 577") --- */
/* the li stretches to match its taller siblings (they have big
   vertical padding); center this shorter item within that height
   instead of letting it sit flush at the top */
#mainNav .nav-item-cta {
  align-self: center;
}
#mainNav .nav-link.nav-cta {
  color: var(--warm-black) !important;
  background-color: var(--accent);
  border-radius: 0.375rem;
  padding: 0.6rem 1.4rem !important;
  margin-left: 0.5rem;
  transition: background-color 0.2s ease-in-out;
}
#mainNav .nav-link.nav-cta:hover {
  background-color: var(--accent-hover);
  color: var(--warm-black) !important;
}
#mainNav.navbar-shrink .nav-link.nav-cta {
  border-bottom: none !important;
  padding: 0.6rem 1.4rem !important;
}

/* --- Footer social/contact links --- */
.footer-social a {
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0.6rem;
  display: inline-block;
  padding: 0.25rem 0;
}
.footer-social a:hover {
  color: #fff;
}
.footer-social i {
  color: var(--accent);
  margin-right: 0.3rem;
  text-decoration: none;
}

/* Secondary "or reach out directly" line under a form's intro text -
   same size as the paragraph above it (no font-size drop) so it stays
   easy to read; the darker-not-lighter gray, matching .why-item's
   secondary-text convention elsewhere, is what carries the "this is
   secondary" signal instead. */
.contact-alt {
  color: rgba(0, 0, 0, 0.65);
}

/* ============================================================
   Pack 577 additions
   ============================================================ */

/* Gold primary buttons with navy text (gold is too light for white
   text). The theme's own .btn-primary is blue; this takes over. */
.btn-primary,
.btn-primary:focus {
  color: var(--warm-black);
  background-color: var(--accent);
  border-color: var(--accent);
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary.active {
  color: var(--warm-black) !important;
  background-color: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(242, 180, 28, 0.45);
}
.btn-primary:disabled {
  color: var(--warm-black);
  background-color: var(--accent);
  border-color: var(--accent);
  opacity: 0.5;
}

/* Gold reads poorly on the cream sections, so accents there use blue */
.bg-light .whatwedo-icon,
.bg-light .cta-icon,
.bg-light .why-icon,
.bg-light .year-month {
  color: var(--pack-blue);
}
.bg-light .text-section h2::after,
.text-section.bg-light h2::after,
.gallery-section.bg-light h2::after {
  background: var(--pack-blue);
}

/* Links inside dark sections: gold instead of the theme's blue */
.text-white-50 a,
.faq-answer a,
.footer a {
  color: var(--accent);
}
.text-white-50 a:hover,
.faq-answer a:hover,
.footer a:hover {
  color: var(--accent-hover);
}

/* --- Nav wordmark (used while there's no logo image) --- */
.brand-wordmark {
  font-family: "Varela Round", sans-serif;
  font-size: 1.5rem;
  letter-spacing: 0.05rem;
  text-transform: none;
  color: #fff;
}
.brand-number {
  color: var(--accent);
}

/* --- Homepage hero: short blurb + two buttons --- */
.hero-text {
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-top: 1rem;
}
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.hero-section .hero-buttons .btn {
  margin-top: 1rem;
}

/* --- Grade strip (homepage "Who Can Join?") --- */
.grade-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 48rem;
  margin: 2.5rem auto 0;
}
@media (min-width: 992px) {
  .grade-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}
.grade-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 0.5rem;
  background: #fffdf8;
  border-radius: 0.375rem;
  border-top: 4px solid var(--accent);
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.06);
  text-decoration: none;
  transition: transform 0.15s ease-in-out;
}
.grade-tile:hover {
  transform: translateY(-2px);
}
.grade-rank {
  font-family: "Varela Round", sans-serif;
  font-size: 1.1rem;
  color: var(--warm-black);
  line-height: 1.2;
}
.grade-grade {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
}

/* --- Photo cards (homepage "What Do Cub Scouts Actually Do?") --- */
.photo-card {
  height: 100%;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0.375rem;
  overflow: hidden;
  text-align: left;
}
.photo-card img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  display: block;
}
@media (min-width: 992px) {
  .photo-card img {
    height: 15rem;
  }
}
.photo-card-body {
  padding: 1rem 1.1rem 1.25rem;
}
.photo-card-title {
  color: #fff;
  font-family: "Varela Round", sans-serif;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.photo-card-text {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* --- Rank cards (Dens page) --- */
.rank-card {
  height: 100%;
  background: #fffdf8;
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.08);
}
.rank-card img {
  width: 100%;
  height: 13rem;
  object-fit: cover;
  display: block;
}
.rank-card-body {
  padding: 1.25rem 1.25rem 1.5rem;
}
.rank-card-grade {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05rem;
  color: var(--pack-blue);
}
.rank-card-rank {
  margin: 0.25rem 0 0.75rem;
}
.rank-card p {
  color: #555;
  margin-bottom: 0;
}

/* --- Split sections: text can now hold several paragraphs --- */
.split-text p {
  margin-bottom: 1rem;
}
.split-text p:last-child {
  margin-bottom: 0;
}
.split-section .why-item {
  margin: 1rem 0 0;
}

/* --- Join page --- */
/* the Who/When/Where columns are left-aligned, so flush-left underlines */
#basics h2::after {
  margin-left: 0;
  margin-right: auto;
}
#basics h2 {
  font-size: 1.6rem;
}
#basics p {
  margin-bottom: 1rem;
}
.visit-fact-dark {
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.4rem;
}
.cost-assistance {
  color: #fff;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

/* --- Visit form extras --- */
.form-optional {
  font-weight: 400;
  color: #6c757d;
}
.form-not-connected {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed #b02a37;
  border-radius: 0.375rem;
  color: #b02a37;
  font-size: 0.9rem;
  text-align: center;
}

/* --- Calendar --- */
.visitor-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 1rem;
  background: var(--accent);
  color: var(--warm-black);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  vertical-align: middle;
}

/* --- FAQ questions are h2s (for structure/SEO) but styled as before;
       no section-heading underline on each one --- */
.faq-list h2.faq-question {
  font-family: inherit;
  font-size: 1.05rem;
  letter-spacing: normal;
  text-transform: none;
  margin-bottom: 0.4rem;
}
.faq-list h2.faq-question::after {
  display: none;
}
.faq-answer p {
  margin-bottom: 0.5rem;
}

/* Secondary hero button: the theme's .btn has no border at all, which
   left the outline button looking like plain text */
.btn-outline-light {
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.btn-outline-light:hover {
  color: var(--warm-black);
}

/* Seven nav items: keep each on one line, and tighten spacing on
   smaller desktop widths so they all fit */
#mainNav .nav-link {
  white-space: nowrap;
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  #mainNav .navbar-nav .nav-item .nav-link {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
  }
  #mainNav .nav-link.nav-cta {
    padding: 0.6rem 1rem !important;
  }
}

/* Mobile menu button: the theme colors it with the primary (now blue),
   which disappears against the navy nav */
#mainNav .navbar-toggler {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* The big spaced-out hero headline runs edge to edge on phones */
@media (max-width: 575.98px) {
  .masthead h1 {
    font-size: 2.1rem;
    line-height: 2.4rem;
    letter-spacing: 0.35rem;
  }
}

/* --- Nav logo: Cub Scouts diamond + wordmark --- */
#mainNav .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.brand-logo {
  width: 48px;
  height: 48px;
}
#mainNav.navbar-shrink .brand-logo {
  width: 40px;
  height: 40px;
}

/* Homepage "Coming Up" before any JS runs: don't flash the no-events
   text there, since that section hides itself when it's empty */
#coming-up .event-empty {
  display: none;
}
.event-empty {
  margin-top: 1.5rem;
}
.year-timeline-dark .event-list .year-row {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}
.year-timeline-dark .event-list .year-row:first-child {
  border-top-color: rgba(255, 255, 255, 0.1);
}
.year-timeline-dark .event-list .year-text {
  color: rgba(255, 255, 255, 0.65);
}
.year-timeline-dark .event-list strong {
  color: #fff;
}
