/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Global styles */
:root {
  --primary: #003F87;
  --secondary: #CE1126;
  --header-height: 70px;
  /* Advertise theme support to the browser */
  /* color-scheme: light dark; */
}

html {
  scroll-padding-top: var(--header-height);
  scroll-behavior: smooth;
}

/* Global resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  color: #333;
  background: white;
}

p li {
  padding: 2rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s;
}

.btn-white {
  background: #fff;
  color: var(--primary);
  border: none;
}

.btn-white:hover {
  background: #f5f5f5;
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border: none;
}

.btn-secondary:hover {
  background: rgba(206, 70, 84, 0.9);
  cursor: pointer;
}

.btn-outline {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary,
.btn-header,
.sign-up-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  margin: 10px;
}

.btn-primary:hover,
.btn-header:hover {
  background: rgba(0, 63, 135, 0.9);
}

@media (max-width: 768px) {
  .btn-header {
    display: none;
  }
}

/* Header */
.site-header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
}

@media (max-width: 768px) {
  .site-header {
    position: sticky;
  }
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

.site-title {
  margin-left: 0.75rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary);
}

.nav-links ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links ul li a {
  font-weight: 500;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links ul li a:hover {
  color: var(--primary);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #4b5563;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav-links ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 1rem;
    background: #fff;
    width: 200px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }

  .nav-links ul.open {
    display: flex;
  }

  .mobile-menu-toggle {
    display: block;
  }
}

/* Footer */
.site-footer {
  background: #1f2937;
  color: #fff;
  padding: 2rem 0;
}

.site-footer .footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.site-footer h3 {
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: #9ca3af;
  text-decoration: none;
  display: inline;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #374151;
  padding-top: 1rem;
}

.footer-legal a {
  margin-left: 1rem;
  font-size: 0.875rem;
}

.footer-contact p {
  position: relative;
  padding-left: 1.5rem;
  text-indent: -1.5rem;
  line-height: 1.5;
  margin-top: 0.2rem;
}

.footer-contact i {
  margin-right: .4rem;
}

/* Hero Section */
.hero-section {
  background-size: cover;
  background-position: center;
  position: relative;
  height: 600px;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: white;
  opacity: 85%;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 600px;
  color: #fff;
  margin-top: 2rem;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-logo {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 4rem;
  height: auto;
  pointer-events: none;
  opacity: 0.8;
  z-index: 1;
}

@media (max-width: 640px) {
  .hero-content {
    margin-bottom: 2rem;
  }

  .hero-logo {
    width: 3rem;
    bottom: 0.5rem;
    right: 0.5rem;
  }
}

/* Programs Overview */
.programs-overview {
  padding: 4rem 0;
  background: #f9fafb;
}

.programs-overview h1,
.programs-overview h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #1f2937;
}

.programs-overview h1 {
  font-size: 3rem;
}

.programs-overview h2 {
  font-size: 2rem;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.program-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s;
}

.program-card:hover {
  transform: translateY(-8px);
}

.program-icon {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 768px) {
  .program-icon {
    display: none;
  }
}

/* Hide small logo on large screens */
.program-icon-mobile-only {
  display: none;
}

/* Show and position logo on mobile */
@media (max-width: 768px) {
  .program-content {
    position: relative;
  }

  .program-icon-mobile-only {
    display: block;
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 4rem;
    height: auto;
  }

  .program-icon-mobile-only img {
    width: 100%;
    height: auto;
  }
}

.cub-bg {
  background: #DBEAFE;
}

.scouts-bg {
  background: #FEF9C3;
}

.venturing-bg {
  background: #D1FAE5;
}

.sea-scouts-bg {
  background: #779ECB;
}

.exploring-bg {
  background: #c3b1e1;
}

.program-content {
  padding: 1.5rem;
}

.program-content h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.program-content p {
  color: #4b5563;
  margin-bottom: 1rem;
}

.program-content ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.program-content ul li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: start;
}

.program-content ul li::before {
  content: '✔';
  color: var(--secondary);
  margin-right: 0.5rem;
}

/* Benefits Section */
.benefits-section {
  padding: 4rem 0;
}

.benefits-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #1f2937;
}

.benefit-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 2rem;
}

.benefit-item.reverse {
  flex-direction: row-reverse;
}

.benefit-text {
  flex: 1;
  padding: 1rem;
}

.benefit-text h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.benefit-text p {
  margin-bottom: 1rem;
}

.benefit-text blockquote {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
  font-style: italic;
}

.benefit-text ul {
  flex: 1;
  padding: 1rem;
  list-style: none;
}

.benefit-text ul li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
}

.benefit-text ul li::before {
  content: '✔';
  color: var(--secondary);
  margin-right: 0.5rem;
}

.benefit-image {
  flex: 1;
}

.benefit-image img {
  width: 100%;
  border-radius: 12px;
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--secondary);
}

.stat-label {
  font-size: 0.875rem;
  color: #4b5563;
}

@media (max-width: 768px) {
  .benefit-image img {
    display: none;
  }

  .benefit-item {
    display: flex;
    flex-direction: column !important;
  }

  .benefit-text {
    width: 100%;
  }

  .benefit-item.reverse {
    flex-direction: column-reverse !important;
  }
}

/* Find a Troop Section */
.find-troop-section {
  padding: 4rem 0;
  background: #f9fafb;
}

.unit-finder-card {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.finder-form {
  flex: 1;
}

.finder-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.finder-form input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.finder-form button {
  margin-bottom: 1rem;
}

.finder-help {
  background: #f3f4f6;
  padding: 1rem;
  border-radius: 8px;
}

.finder-help p {
  margin-bottom: 0.5rem;
}

.finder-map {
  flex: 2;
  min-height: 300px;
  background: #e5e7eb url('/assets/images/map_placeholder.png') no-repeat center;
  background-size: cover;
  border-radius: 12px;
}

/* Get Started Section */
.get-started-section {
  padding: 4rem 0;
  background-color: #f9fafb;
}

.get-started-section h2,
.get-started-section p {
  text-align: center;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.step-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.step-box::before {
  content: attr(data-step);
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
}

.signup-form-card form input[type="text"],
.signup-form-card form input[type="email"],
.signup-form-card form input[type="tel"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.signup-form-card form .radio-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  border: none;
}

.signup-form-card .radio-group legend {
  padding-bottom: 0.5rem;
}

.signup-form-card form .radio-group label {
  display: flex;
  align-items: center;
  padding-right: 2rem;
}

.signup-form-card form .radio-group input {
  margin-right: 0.5rem;
  accent-color: var(--primary);
}

/* Chat Support */
.chat-support .chat-button {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 4rem;
  height: 4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.3s;
}

.chat-support .chat-button:hover {
  background: rgba(0, 63, 135, 0.9);
}

/* ——— Get Started: side-by-side layout ——— */
.get-started-section .container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.get-started-section .container>h2,
.get-started-section .container>p {
  flex: 1 1 100%;
}

.get-started-section .steps-grid {
  flex: 1 1 0;
}

/* ——— Mobile fallback ——— */
@media (max-width: 768px) {
  .get-started-section .container {
    display: block;
  }
}

/* ——— Force 2×2 layout for steps ——— */
@media (min-width: 768px) {
  .get-started-section .steps-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 1.5rem;
  }
}

/* Logo link & image */
.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  margin: 10px;
}

.logo {
  height: 56px;
  display: inline-flex;
  align-items: center;
}

.logo-image {
  height: 56px;
  width: auto;
  display: block;
}

.logo+.site-title {
  margin-left: 0.75rem;
}

.outlined {
  border: 6px solid currentColor;
  padding: 0.05rem 0.4rem;
  display: inline-block;
}

.highlight {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 10px;
}

/* Page Break for mobile screens only */
@media (max-width: 640px) {
  .mobile-only {
    display: block;
  }
}

/* Programs Page */
@media (min-width: 768px) {
  #programs-page {
    margin-block-start: var(--header-height);
  }
}

.tabs {
  display: flex;
  margin-bottom: 1rem;
  border-bottom: 1px solid #ddd;
}

.tab-button {
  padding: 1rem 1rem;
  background: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 5px 5px 0 0;
  margin-right: 0.25rem;
  cursor: pointer;
  font-weight: 500;
  font-size: large;
}

.tab-button.active {
  background: #fff;
  font-weight: 600;
  border-bottom: none;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.program-page-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.3s;
}

.program-page-icon {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =====================================
   BeAScout Redirect Form Styling
===================================== */

.signup-form-card {
  background: #ffffff;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  max-width: 600px;
  margin: 0 auto;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.signup-form-card h3 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.signup-form-card p {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #4b5563;
}

/* Zip Input */
#zipInput {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 1rem;
  margin-bottom: 1.25rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

#zipInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 63, 135, 0.15);
}

/* Checkbox Group */
.filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.filters label {
  display: flex;
  align-items: center;
  background: #f9fafb;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filters label:hover {
  border-color: var(--primary);
  background: rgba(0, 63, 135, 0.05);
}

.filters input[type="checkbox"] {
  margin-right: 0.6rem;
  accent-color: var(--primary);
  transform: scale(1.1);
}

/* Selected state enhancement */
.filters input[type="checkbox"]:checked+span,
.filters input[type="checkbox"]:checked {
  font-weight: 600;
}

/* Button */
#beascoutRedirectForm button {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
}

#beascoutRedirectForm button:hover {
  transform: translateY(-2px);
}

/* Mobile Adjustments */
@media (max-width: 640px) {
  .filters {
    grid-template-columns: 1fr;
  }

  .signup-form-card {
    padding: 2rem 1.5rem;
  }
}

/* ==============================
   Parent Resources Page
============================== */

.parents-hero {
  margin-top: 2rem;
  padding: 6rem 0 4rem;
  text-align: center;
  background: #f9fafb;
}

.parents-hero h1 {
  font-size: 2.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.parents-hero p {
  max-width: 700px;
  margin: 0 auto 2rem;
  color: #4b5563;
}

.parents-section {
  padding: 4rem 0;
}

.light-bg {
  background: #f9fafb;
}

.parents-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
  font-size: 2rem;
}

.parents-timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  text-align: center;
}

.timeline-step {
  background: #fff;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.timeline-icon {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.parents-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.parents-card {
  background: #fff;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.parents-card h3 {
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.parents-note {
  text-align: center;
  margin-top: 2rem;
  font-weight: 500;
}

.faq-item {
  max-width: 800px;
  margin: 1.5rem auto;
}

.faq-item h3 {
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.parents-cta {
  padding: 5rem 0;
  text-align: center;
  background: var(--primary);
  color: white;
}

.parents-cta h2 {
  color: white;
  margin-bottom: 1rem;
}

.parents-cta p {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.safety-note {
  margin-top: 2rem;
  text-align: center;
  font-weight: 500;
  font-size: 1.1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================
   Parent Cost Section
========================== */

.cost-highlight {
  text-align: center;
  background: white;
  padding: 3rem 2rem;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  margin-bottom: 3rem;
}

.cost-highlight h3 {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.cost-sub {
  font-size: 1.1rem;
  color: #4b5563;
  font-weight: 500;
}

.cost-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  align-items: start;
}

.cost-card {
  background: white;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.cost-card h4 {
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.cost-compare {
  margin-top: 1rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 500;
  font-size: 1.3rem;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================
   Parent Page – Mobile Optimization
===================================== */

/* ---------- Global Section Padding ---------- */

@media (max-width: 768px) {

  .parents-hero {
    padding: 4rem 0 3rem;
  }

  .parents-hero h1 {
    font-size: 2rem;
  }

  .parents-hero p {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .parents-section {
    padding: 3rem 0;
  }

  .parents-section h2 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }

}

/* ---------- Timeline (First 30 Days) ---------- */

@media (max-width: 768px) {

  .parents-timeline {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .timeline-step {
    padding: 1.5rem;
  }

  .timeline-icon {
    font-size: 1.75rem;
  }

}

/* ---------- Cost Highlight ---------- */

@media (max-width: 768px) {

  .cost-highlight {
    padding: 2rem 1.5rem;
  }

  .cost-highlight h3 {
    font-size: 2.2rem;
  }

  .cost-sub {
    font-size: 1rem;
  }

  .cost-details {
    grid-template-columns: 1fr;
  }

}

/* ---------- Card Grids ---------- */

@media (max-width: 768px) {

  .parents-card-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .parents-card {
    padding: 1.5rem;
  }

}

/* ---------- FAQ ---------- */

@media (max-width: 768px) {

  .faq-item {
    padding: 0 1rem;
  }

  .faq-item h3 {
    font-size: 1.1rem;
  }

}

/* ---------- CTA Section ---------- */

@media (max-width: 768px) {

  .parents-cta {
    padding: 3rem 1rem;
  }

  .parents-cta h2 {
    font-size: 1.6rem;
  }

  .parents-cta p {
    font-size: 1rem;
  }

}

/* ---------- Button Improvements on Mobile ---------- */

@media (max-width: 768px) {

  .parents-hero .btn,
  .parents-cta .btn {
    width: 100%;
    max-width: 320px;
  }

}

/* ---------- Improve Text Readability ---------- */

@media (max-width: 480px) {

  .parents-hero h1 {
    font-size: 1.8rem;
  }

  .parents-section h2 {
    font-size: 1.4rem;
  }

  .cost-highlight h3 {
    font-size: 1.9rem;
  }

}

/* ==========================
   Expandable Cost Cards
========================== */

.cost-card {
  background: #fff;
  padding: 2rem;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

.cost-summary {
  margin-bottom: 1rem;
  font-weight: 500;
}

.cost-toggle {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
}

.cost-toggle i {
  transition: transform 0.25s ease;
}

.cost-extra {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.cost-card.active .cost-extra {
  max-height: 500px;
  margin-top: 1rem;
}

.cost-card.active .cost-toggle i {
  transform: rotate(180deg);
}

.cost-media {
  margin-top: 1rem;
}

.cost-media img {
  width: 100%;
  border-radius: 12px;
}