/* ============================================================
   Troop 212 Merit Badge Tracker — Public Styles
   ============================================================ */

:root {
  --scout-green:       #1b5e20;
  --scout-green-mid:   #2e7d32;
  --scout-green-light: #e8f5e9;
  --eagle-gold:        #f9a825;
  --eagle-gold-dark:   #e65100;
  --eagle-bg:          #fff8e1;
  --text-dark:         #212121;
  --text-muted:        #616161;
  --card-shadow:       0 2px 8px rgba(0,0,0,.10);
  --card-hover-shadow: 0 6px 20px rgba(0,0,0,.18);
  --radius:            12px;
}

/* ── Base ── */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #f5f5f5;
  color: var(--text-dark);
  margin: 0;
}

a { color: var(--scout-green-mid); }
a:hover { color: var(--scout-green); }

/* ── Navbar ── */
.troop-navbar {
  background: linear-gradient(135deg, var(--scout-green) 0%, var(--scout-green-mid) 100%);
  color: #fff;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.troop-navbar .navbar-brand {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .02em;
}
.troop-navbar .navbar-subtitle {
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  display: block;
  line-height: 1;
}
.troop-navbar .navbar-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
}
.troop-navbar .fleur {
  font-size: 1.8rem;
  line-height: 1;
}
.admin-link {
  color: rgba(255,255,255,.7) !important;
  font-size: .8rem;
  text-decoration: none;
  margin-left: auto;
}
.admin-link:hover { color: #fff !important; }

/* ── Hero search section ── */
.hero-section {
  background: linear-gradient(160deg, var(--scout-green) 0%, var(--scout-green-mid) 60%, #43a047 100%);
  color: #fff;
  padding: 3rem 1rem 2.5rem;
  text-align: center;
}
.hero-section h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  margin-bottom: .5rem;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.hero-section p {
  color: rgba(255,255,255,.88);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}
.search-bar-wrap {
  max-width: 560px;
  margin: 0 auto 1.25rem;
  position: relative;
}
.search-bar-wrap .bi-search {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9e9e9e;
  font-size: 1.1rem;
}
#badge-search {
  width: 100%;
  padding: .75rem 1rem .75rem 2.8rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  outline: none;
}
#badge-search:focus { box-shadow: 0 2px 10px rgba(0,0,0,.2), 0 0 0 3px rgba(255,255,255,.4); }

.filter-pills { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.filter-pill {
  padding: .35rem .9rem;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  color: #fff;
  font-size: .85rem;
  cursor: pointer;
  transition: all .2s;
}
.filter-pill:hover,
.filter-pill.active {
  background: rgba(255,255,255,.2);
  border-color: #fff;
  font-weight: 600;
}

/* ── Results info bar ── */
.results-bar {
  padding: .75rem 0 0;
  color: var(--text-muted);
  font-size: .9rem;
}

/* ── Badge cards ── */
.badges-section { padding: 1.5rem 0 3rem; }

.badge-card-col { padding: .5rem; }

.badge-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}
.badge-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-hover-shadow);
  color: inherit;
  text-decoration: none;
}

.badge-img-wrap {
  background: var(--scout-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem .5rem .8rem;
  position: relative;
  min-height: 110px;
}
.badge-img-wrap img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 4px;
}
.eagle-ribbon {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--eagle-gold);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 2px 7px;
  border-radius: 50px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.badge-card-body {
  padding: .75rem .75rem .9rem;
  text-align: center;
}
.badge-card-name {
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.25;
  color: var(--text-dark);
  margin-bottom: .3rem;
}
.badge-card-count {
  font-size: .78rem;
  color: var(--text-muted);
}
.badge-card-count.no-counselors { color: #bdbdbd; font-style: italic; }

/* No-results message */
#no-results {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
#no-results .bi { font-size: 3rem; color: #bdbdbd; }

/* ── Badge detail page ── */
.badge-detail-header {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.badge-detail-img {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--scout-green-light);
  padding: .5rem;
}
.eagle-badge-label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--eagle-bg);
  border: 1.5px solid var(--eagle-gold);
  color: #b45309;
  font-size: .85rem;
  font-weight: 700;
  padding: .3rem .8rem;
  border-radius: 50px;
  margin-bottom: .75rem;
}
.eagle-group-note {
  font-size: .82rem;
  color: #b45309;
  font-style: italic;
  margin-top: .25rem;
}
.badge-links { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }
.badge-links a {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem 1rem;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.btn-requirements {
  background: var(--scout-green-mid);
  color: #fff;
}
.btn-requirements:hover { background: var(--scout-green); color: #fff; }
.btn-workbook {
  background: #fff;
  color: var(--scout-green-mid);
  border: 2px solid var(--scout-green-mid);
}
.btn-workbook:hover { background: var(--scout-green-light); }

/* Counselor section */
.counselor-section-head {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--scout-green);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.parent-reminder {
  border-left: 4px solid var(--eagle-gold);
  background: var(--eagle-bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .85rem 1.1rem;
  font-size: .9rem;
  margin-bottom: 1.25rem;
}
.parent-reminder strong { color: var(--eagle-gold-dark); }

.counselor-accordion .accordion-button {
  font-weight: 600;
  color: var(--text-dark);
}
.counselor-accordion .accordion-button:not(.collapsed) {
  background: var(--scout-green-light);
  color: var(--scout-green);
}
.counselor-accordion .accordion-button::after { margin-left: auto; }
.counselor-accordion .accordion-button .counselor-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--scout-green-mid);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  margin-right: .75rem;
  flex-shrink: 0;
}
.counselor-contact p { margin-bottom: .45rem; display: flex; align-items: center; gap: .5rem; }
.counselor-contact .bi { color: var(--scout-green-mid); }
.counselor-contact a { text-decoration: none; }
.counselor-contact a:hover { text-decoration: underline; }

.no-counselors-msg {
  text-align: center;
  padding: 2.5rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  color: var(--text-muted);
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--scout-green-mid);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.back-link:hover { color: var(--scout-green); }

/* ── Footer ── */
.site-footer {
  background: var(--scout-green);
  color: rgba(255,255,255,.75);
  text-align: center;
  padding: 1.25rem;
  font-size: .83rem;
  margin-top: 3rem;
}
.site-footer a { color: rgba(255,255,255,.9); }

/* ── Responsive tweaks ── */
@media (max-width: 576px) {
  .badge-detail-header { flex-direction: column; text-align: center; }
  .badge-detail-img { width: 100px; height: 100px; }
  .badge-links { justify-content: center; }
  .counselor-section-head { justify-content: center; }
}
