/* ============================================================
   BSA Troop 45 Little Elm — Static Site Styles
   ============================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  color: #333;
  background: #fff;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: #1e3a6e; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === VARIABLES === */
:root {
  --navy:        #1e3a6e;
  --navy-dark:   #132748;
  --navy-mid:    #1a3060;
  --red:         #be1e2d;
  --red-dark:    #9e1825;
  --white:       #ffffff;
  --light-gray:  #f4f5f7;
  --border:      #dde1e9;
  --text:        #1d1d22;
  --text-mid:    #4a4a6a;
  --container:   1200px;
  --content:     800px;
  --radius:      8px;
}

/* === LAYOUT === */
.container { max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; }

/* === TOP BAR (white — BSA/header logo reads clearly; was dark blue) === */
.top-bar {
  background: #fff;
  color: var(--text-mid);
  font-size: 0.78rem;
  padding: 0.45rem 0;
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--border);
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.top-bar .location {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.top-bar a {
  color: var(--navy);
  font-weight: 600;
  transition: color 0.15s;
}
.top-bar a:hover { color: var(--navy-dark); text-decoration: none; }

/* === HEADER (white bar — Home, Scouts, Parents… + logo reads on white) === */
header {
  background: #fff;
  padding: 0.65rem 0;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(0,0,0,0.06);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo */
.logo-link { flex-shrink: 0; line-height: 0; }
.logo-desktop { height: 54px; width: auto; border-radius: 3px; }
.logo-mobile  { display: none; height: 46px; width: auto; border-radius: 3px; }

/* Header icon links */
.header-icons {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0.5rem;
}
.header-icons a {
  color: var(--navy);
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s, opacity 0.15s;
}
.header-icons a:hover {
  color: var(--navy);
  opacity: 1;
  background: var(--light-gray);
  text-decoration: none;
}
.header-icons svg { width: 18px; height: 18px; fill: currentColor; }

/* === NAVIGATION === */
nav { flex: 1; }

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem;
  flex-wrap: nowrap;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
  color: var(--navy);
  padding: 0.45rem 0.65rem;
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.2rem;
  transition: background 0.15s, color 0.15s;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a {
  background: var(--light-gray);
  color: var(--navy-dark);
  text-decoration: none;
}
.arrow { font-size: 0.65rem; opacity: 0.55; }

/* Dropdown — invisible bridge so pointer doesn’t leave .has-dropdown in the gap */
.nav-menu > .has-dropdown::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 100%;
  width: max(100%, 230px);
  height: 14px;
  z-index: 301;
}
.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 230px;
  list-style: none;
  padding: 0.4rem 0;
  display: none;
  z-index: 300;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--text);
  font-size: 0.875rem;
  transition: background 0.1s, color 0.1s;
}
.dropdown li a:hover {
  background: var(--light-gray);
  color: var(--navy);
  text-decoration: none;
}
.dropdown li + li { border-top: 1px solid #f0f0f5; }

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--navy);
  padding: 0.45rem 0.55rem;
  border-radius: 5px;
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--light-gray); }
.hamburger svg { width: 22px; height: 22px; stroke: currentColor; }

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.8rem 1.75rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  cursor: pointer;
  border: none;
  line-height: 1.4;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--red); color: #fff; box-shadow: 0 2px 8px rgba(190,30,45,0.3); }
.btn-primary:hover { background: var(--red-dark); color: #fff; box-shadow: 0 4px 12px rgba(190,30,45,0.35); }

.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 2px 8px rgba(30,58,110,0.3); }
.btn-navy:hover { background: var(--navy-dark); color: #fff; box-shadow: 0 4px 12px rgba(30,58,110,0.35); }

.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: none;
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  color: #fff;
  box-shadow: none;
}

.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.825rem; }

/* === HOME HERO: lake + formal logo (768px+); sky blue + mobile logo (mobile) === */
.hero-top {
  position: relative;
  min-height: 186px;
  padding: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #73a8d1;
  overflow: hidden;
}
.hero-top-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  width: 100%;
}
.hero-top-overlay {
  display: none;
}
.hero-logo-formal {
  display: none;
  max-width: min(90vw, 764px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.35));
}
.hero-logo-mobile {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

@media (min-width: 768px) {
  .hero-top {
    min-height: 266px;
    padding: 50px 1.5rem;
    background: var(--navy-dark) url('../images/hero-lake-005.jpg') center left / cover no-repeat;
  }
  .hero-top-overlay {
    display: block;
    position: absolute;
    inset: 0;
    background: var(--navy);
    opacity: 0.1;
    pointer-events: none;
  }
  .hero-logo-formal { display: block; }
  .hero-logo-mobile { display: none; }
}

.section-after-banner {
  padding-top: 3rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
.scouting-intro-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.scouting-intro-welcome {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-mid);
  margin: 0 0 1.25rem;
  max-width: 36em;
}
.scouting-intro .section-label { margin-top: 0; }
.scouting-intro h2 { margin-top: 0.25rem; }
.scouting-intro-cta { margin-top: 1.5rem; }

.two-col-scouting .col-img img {
  height: auto;
  max-height: min(85vh, 720px);
  width: 100%;
  object-fit: contain;
  object-position: top center;
}

@media (min-width: 768px) {
  .two-col-scouting {
    grid-template-columns: 1fr minmax(280px, 38%);
    align-items: start;
    gap: 2.5rem 3rem;
  }
  .two-col-scouting .col-img {
    position: sticky;
    top: 5.5rem;
  }
}

.about-troop45-copy h2 { margin-bottom: 1rem; }
.about-troop45-copy p { margin-bottom: 1rem; }
.about-troop45-copy p:last-of-type { margin-bottom: 0; }
.about-subhead {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin: 1.35rem 0 0.65rem;
}

/* === PAGE HERO (inner pages) === */
.page-hero {
  background: var(--navy-dark);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
}
.page-hero-content { position: relative; z-index: 1; }
.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.page-hero p {
  margin-top: 0.75rem;
  opacity: 0.85;
  font-size: 1rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

/* === SECTIONS === */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--light-gray); }
.section-center { text-align: center; }
.section-center .section-lead { max-width: 680px; margin: 0 auto; }

.section-label {
  display: inline-block;
  background: var(--red);
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}
.section h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.section p {
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.section p:last-child { margin-bottom: 0; }

/* === TWO-COLUMN LAYOUT === */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.col-img img {
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,0.14);
  width: 100%;
  height: 380px;
  object-fit: cover;
}

/* === FORMAL LOGO SECTION === */
.formal-logo-section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.formal-logo-section img {
  max-height: 60px;
  margin: 0 auto;
}

/* === RESOURCES PAGE === */
.resources-section {
  padding: 3rem 0 5rem;
}
.resources-heading {
  text-align: center;
  margin-bottom: 2.5rem;
}
.resources-heading h2 { color: var(--navy); margin-bottom: 0.5rem; }
.resources-heading p { color: var(--text-mid); font-size: 0.95rem; }

.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 760px;
  margin: 0 auto;
}
.resource-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.4rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  gap: 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.resource-item:hover {
  border-color: var(--navy);
  box-shadow: 0 3px 12px rgba(30,58,110,0.1);
}
.resource-icon {
  width: 36px;
  height: 36px;
  background: #eef2fa;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--navy);
}
.resource-icon svg { width: 18px; height: 18px; fill: currentColor; }
.resource-name {
  flex: 1;
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.4;
}
.resource-item .btn { flex-shrink: 0; }

/* === JOIN US PAGE === */
.join-intro {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 3rem;
}
.join-intro p { color: var(--text-mid); }

.steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 700px;
  margin: 0 auto;
}
.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.step-num {
  background: var(--navy);
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.step-body h3 { color: var(--navy); margin-bottom: 0.4rem; }
.step-body p { color: var(--text-mid); margin-bottom: 0.5rem; }
.step-body ul {
  margin-left: 1.25rem;
  color: var(--text-mid);
  line-height: 1.75;
  font-size: 0.9rem;
}

.council-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding: 2.5rem 0 0.5rem;
  opacity: 0.85;
}
.council-logos img { height: 48px; width: auto; }

/* === CONTACT PAGES === */
.contact-blocks {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 720px;
  margin: 0 auto;
}
.contact-block {
  padding: 2.75rem 0;
  border-bottom: 1px solid var(--border);
}
.contact-block:last-child { border-bottom: none; }
.contact-block h2 {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.contact-block p {
  color: var(--text-mid);
  margin-bottom: 1.5rem;
  line-height: 1.7;
  max-width: 560px;
}
.contact-block .btn { display: inline-block; }

/* Simple contact page */
.contact-simple {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 0;
}
.contact-simple h2 { color: var(--navy); margin-bottom: 1rem; }
.contact-simple p { color: var(--text-mid); margin-bottom: 2rem; }

/* === CALLOUT BOX === */
.callout {
  background: #eef2fa;
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--text-mid);
  font-size: 0.9rem;
}

/* === FOOTER === */
footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 1.75rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}
.footer-logo img {
  height: 32px;
  width: auto;
  opacity: 0.85;
  filter: brightness(10);  /* Force white on dark bg */
}
.footer-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}
.footer-nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.footer-nav a {
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.footer-nav a:hover { color: #fff; background: rgba(255,255,255,0.08); text-decoration: none; }
.footer-nav span { color: rgba(255,255,255,0.25); }

.footer-divider {
  width: 100%;
  max-width: 400px;
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 0.25rem 0;
}
.footer-attribution {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-attribution a { color: rgba(255,255,255,0.55); }
.footer-attribution a:hover { color: rgba(255,255,255,0.85); text-decoration: none; }
.footer-attribution img {
  height: 18px;
  width: auto;
  opacity: 0.55;
  vertical-align: middle;
  display: inline-block;
}

/* === RESPONSIVE — TABLET === */
@media (max-width: 960px) {
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .col-img img { height: 280px; }
  .two-col.flip-mobile .col-img { order: -1; }
}

/* === RESPONSIVE — MOBILE === */
@media (max-width: 768px) {
  .logo-desktop { display: none; }
  .logo-mobile  { display: block; }
  .hamburger    { display: flex; }
  .header-icons { display: none; }

  nav { position: static; }

  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.5rem 0.75rem 1rem;
    gap: 0.1rem;
    border-top: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    z-index: 299;
  }
  .nav-menu.open { display: flex; }

  .nav-menu > li > a {
    padding: 0.7rem 0.75rem;
    border-radius: 5px;
    font-size: 0.9rem;
    color: var(--navy);
  }

  /* Mobile dropdowns */
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown { display: none; }
  .has-dropdown.open .dropdown {
    display: block;
    position: static;
    box-shadow: none;
    border: 1px solid var(--border);
    background: var(--light-gray);
    border-radius: 5px;
    margin: 0.25rem 0 0.25rem 1rem;
    padding: 0.25rem 0;
  }
  .has-dropdown.open .dropdown li a {
    color: var(--text);
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
  }
  .has-dropdown.open .dropdown li a:hover {
    background: #fff;
    color: var(--navy);
  }
  .has-dropdown.open .dropdown li + li { border-top: 1px solid var(--border); }

  .section-after-banner { padding-top: 2rem; }
  .scouting-intro-title { font-size: 1.65rem; }
  .section { padding: 3rem 0; }

  .resource-item {
    flex-wrap: wrap;
  }
  .resource-name { width: 100%; }

  .step { flex-direction: column; gap: 1rem; }

  .council-logos { gap: 1.5rem; }
  .council-logos img { height: 36px; }

  .top-bar .location { display: none; }
}

@media (max-width: 480px) {
  .btn { padding: 0.75rem 1.25rem; font-size: 0.875rem; }
  .contact-block { padding: 2rem 0; }
}
