/*
 * Custom styles for the True Believers Community Connections website.
 *
 * This stylesheet defines a warm, inviting palette inspired by 2026 design
 * trends, along with modern typography and subtle transitions. Colors are
 * defined as CSS variables for easy maintenance. The design uses Bootstrap
 * for layout, so most spacing and responsive behavior relies on the
 * framework. Additional classes are provided to tweak components without
 * overriding Bootstrap defaults.
 */

:root {
  /*
   * Updated color palette: a richer, more vibrant set of warm tones
   * inspired by earth, clay and sunset hues. These colors still
   * complement the True Believers branding but introduce more energy
   * than the previous muted scheme. Adjust the variables below to
   * fine‑tune the look across the entire site.
   */
  /*
   * Vibrant palette inspired by the TBCC logo. The primary colour is a deep,
   * trust‑worthy blue to anchor the design. Secondary and accent hues
   * borrow from the orange and peach tones in the heart motif, while dark
   * and light values ensure strong contrast and readability.
   */
  --tbcc-primary: #003d73;    /* Deep blue for headings and the nav bar */
  --tbcc-secondary: #fdebd3;  /* Light peach for subtle backgrounds */
  --tbcc-accent: #e36f23;     /* Warm orange for buttons and highlights */
  --tbcc-dark: #2a2a2a;       /* Neutral dark grey for body text */
  --tbcc-light: #ffffff;      /* Pure white for cards and sections */
  --tbcc-link: #0077b6;      /* Bright blue for links */
  --tbcc-link-hover: #004e86; /* Darker shade on hover */
  --font-family-base: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-family-heading: 'Fraunces', 'Playfair Display', serif;
}

body {
  font-family: var(--font-family-base);
  color: var(--tbcc-dark);
  background-color: var(--tbcc-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 700;
  color: var(--tbcc-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

a {
  color: var(--tbcc-link);
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}
a:hover, a:focus {
  color: var(--tbcc-link-hover);
}

/* Navigation bar overrides */
.navbar {
  background-color: var(--tbcc-primary);
}
.navbar-brand img {
  height: 48px;
}
.navbar-nav .nav-link {
  color: var(--tbcc-light) !important;
  font-weight: 600;
  margin-right: 0.5rem;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--tbcc-accent) !important;
}

/* Hero section styling */
.hero {
  background: linear-gradient(135deg, var(--tbcc-primary) 0%, var(--tbcc-secondary) 100%);
  color: var(--tbcc-light);
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}
.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--tbcc-light);
}
.hero p {
  font-size: 1.25rem;
  color: var(--tbcc-light);
  margin-bottom: 2rem;
}
.btn-primary {
  background-color: var(--tbcc-accent);
  border-color: var(--tbcc-accent);
  color: var(--tbcc-dark);
  font-weight: 600;
  transition: background-color 0.2s ease-in-out;
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--tbcc-secondary);
  border-color: var(--tbcc-secondary);
  color: var(--tbcc-dark);
}

/* Section spacing */
.section {
  padding: 4rem 0;
}
.section:nth-of-type(even) {
  background-color: var(--tbcc-light);
}
.section:nth-of-type(odd) {
  background-color: #ffffff;
}

/* Card components */
.card {
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease-in-out;
}
.card:hover {
  transform: translateY(-3px);
}
.card-title {
  color: var(--tbcc-primary);
  font-weight: 700;
}
.card-text {
  color: var(--tbcc-dark);
}

/* Footer styling */
.footer {
  background-color: var(--tbcc-primary);
  color: var(--tbcc-light);
  padding: 2rem 0;
}
.footer a {
  color: var(--tbcc-accent);
}
.footer a:hover {
  color: var(--tbcc-secondary);
}

/* Stats section */
.stats-item {
  text-align: center;
  padding: 2rem;
}
.stats-item h3 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--tbcc-primary);
}
.stats-item p {
  margin-bottom: 0;
  color: var(--tbcc-dark);
  font-weight: 600;
}

/* Event cards */
.event-card .countdown {
  color: var(--tbcc-accent);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Social icons within event cards */
.social-icons a {
  color: var(--tbcc-primary);
  font-size: 1.2rem;
  transition: color 0.15s ease-in-out;
}
.social-icons a:hover {
  color: var(--tbcc-accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
}

/* Inner hero variant for secondary pages */
.inner-hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--tbcc-primary) 0%, var(--tbcc-secondary) 100%);
}
.inner-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: var(--tbcc-light);
}
.inner-hero p {
  font-size: 1.125rem;
  color: var(--tbcc-light);
}

/* Homepage hero photo treatment */
.hero-home {
  background:
    linear-gradient(rgba(0, 61, 115, 0.70), rgba(0, 61, 115, 0.70)),
    url("../images/hero-stay-lit.png") center center / cover no-repeat;
}

/* About page hero photo treatment */
.about-photo-hero {
  padding: 4rem 0;
  background:
    linear-gradient(rgba(0, 61, 115, 0.70), rgba(0, 61, 115, 0.70)),
    url("../images/about-hero-team.png") center center / cover no-repeat;
}

/* Event cards: more contrast and depth */
.event-card {
  border: 1px solid rgba(0, 61, 115, 0.14);
  background: linear-gradient(180deg, #ffffff 0%, #fff4e8 100%);
  box-shadow: 0 1rem 2.5rem rgba(0, 61, 115, 0.15);
  border-radius: 1.25rem;
  overflow: hidden;
  position: relative;
}
.event-card::before {
  content: "";
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--tbcc-primary), var(--tbcc-accent));
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1.25rem 3rem rgba(0, 61, 115, 0.22);
}
.event-card .card-body {
  padding: 1.5rem;
}
.event-card .btn-outline-primary {
  border-color: var(--tbcc-primary);
  color: var(--tbcc-primary);
  font-weight: 600;
}
.event-card .btn-outline-primary:hover {
  background-color: var(--tbcc-primary);
  color: #fff;
}

/* Make event card titles more prominent */
.event-card .card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--tbcc-primary);
}

/* Give the upcoming events section its own card-like container */
.highlighted-events .container {
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 2rem 1rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 61, 115, 0.05);
}

/* =========================
   Fiscal Year Snapshot styling
   This section summarises age groups and total service hours. The cards are
   slightly smaller than the main impact stats and use a soft gradient
   background.
========================= */
.fy-snapshot {
  padding: 3rem 0;
  background: linear-gradient(180deg, #fffdf8 0%, #fff5ea 100%);
}

.fy-card {
  background: #ffffff;
  border: 1px solid rgba(0, 61, 115, 0.12);
  border-radius: 1rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 61, 115, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.fy-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(0, 61, 115, 0.16);
}
.fy-card h3 {
  /* Slightly smaller heading for FY snapshot cards (~20% reduction) */
  font-size: 1.6rem;
  color: var(--tbcc-primary);
  margin-bottom: 0.25rem;
}

/*
 * Service Hours by Month Section
 * A light gradient background with a card-like table.  The table headers use
 * TBCC primary colours for contrast, and cells are right-aligned for
 * numerical clarity.
 */
.service-hours-monthly {
  padding: 3rem 0;
  background: linear-gradient(180deg, #fffdf8 0%, #fff4e8 100%);
}
.service-hours-monthly .table {
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
}
.service-hours-monthly .table thead th {
  background-color: var(--tbcc-primary);
  color: #ffffff;
  border: none;
}
.service-hours-monthly .table tbody td {
  border-top: 1px solid rgba(0, 61, 115, 0.1);
  font-weight: 600;
}
.service-hours-monthly .table tbody tr:nth-child(odd) {
  background-color: rgba(0, 61, 115, 0.02);
}

/*
 * Highlight the total service hours card in the FY snapshot.  This card uses
 * a warm, subtle gradient and tinted border to distinguish it from the
 * age group cards.  The number (h3) is coloured with the accent colour
 * defined in the palette for additional emphasis.
 */
.service-hours-card {
  background: linear-gradient(180deg, #ffe8d9 0%, #fff2e5 100%);
  border: 1px solid rgba(227, 111, 35, 0.2);
  box-shadow: 0 0.75rem 1.5rem rgba(227, 111, 35, 0.05);
}
.service-hours-card h3 {
  color: var(--tbcc-accent);
}
.service-hours-card p {
  color: var(--tbcc-primary);
  font-weight: 600;
}

/*
 * Card wrapper for the monthly hours table.  This wrapper provides a
 * contained white card with rounded corners and subtle shadow so the
 * table stands out against the section background.  When no data is
 * present, messages will also appear inside this wrapper.
 */
.hours-table-wrapper {
  background-color: var(--tbcc-light);
  border: 1px solid rgba(0, 61, 115, 0.08);
  border-radius: 1rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0, 61, 115, 0.08);
  padding: 1.25rem;
}

/* Age group icon holder in the fiscal year snapshot */
.age-card-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.age-card-icon img {
  /* Increase the icon size slightly so the age group cards feel more vibrant */
  max-width: 80px;
  height: auto;
}

/* Highlight the total row in the monthly hours table */
.service-hours-monthly .table tfoot tr {
  background-color: rgba(227, 111, 35, 0.1); /* light accent tint */
  font-weight: 700;
}
.service-hours-monthly .table tfoot th {
  border-top: 2px solid rgba(0, 61, 115, 0.2);
  color: var(--tbcc-primary);
}

/* Emphasise the Hours column by adding subtle boldness */
.service-hours-monthly .table tbody td.text-end {
  /* Give the hours column a more prominent weight and colour so it draws the eye */
  font-weight: 700;
  color: var(--tbcc-accent);
}

/* Make the hours column header stand out */
.service-hours-monthly .table thead th:nth-child(2) {
  color: var(--tbcc-accent);
  font-weight: 700;
}

/* Apply special styling to the age group cards within the fiscal year snapshot */
#who-serving-section .fy-card {
  /* Add a soft tint and left border to differentiate age groups */
  background: linear-gradient(180deg, #fff8f2 0%, #fff3e8 100%);
  border-left: 4px solid var(--tbcc-accent);
}

/* Increase the size of the age group numbers for better legibility */
#who-serving-section .fy-card h3 {
  font-size: 2rem;
}
.fy-card p {
  color: var(--tbcc-dark);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Section title underline */
.section-title {
  position: relative;
  display: inline-block;
  font-size: 2rem; /* Increase font size to make headings stand out */
  font-weight: 700; /* Bold weight for emphasis */
  color: var(--tbcc-primary); /* Use primary brand color for consistency */
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.25rem;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: var(--tbcc-accent);
}

/* Highlight Upcoming Events */
.highlighted-events {
  background-color: #fff7f2;
  border-top: 1px solid rgba(0, 61, 115, 0.08);
  border-bottom: 1px solid rgba(0, 61, 115, 0.08);
}

/* Service Areas chips */
.service-areas-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  background-color: var(--tbcc-secondary);
  color: var(--tbcc-primary);
  font-weight: 600;
  opacity: 0;
  animation: chipFadeIn 1s forwards;
}
.area-chip i {
  color: var(--tbcc-accent);
}
@keyframes chipFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Custom hero backgrounds for secondary pages */
.programs-hero {
  background-image:
    linear-gradient(rgba(0, 61, 115, 0.7), rgba(0, 61, 115, 0.7)),
    url('../images/hero-stay-lit.png') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
.accomplishments-hero {
  background-image:
    linear-gradient(rgba(0, 61, 115, 0.7), rgba(0, 61, 115, 0.7)),
    url('../images/about-hero-team.png') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}
.careers-hero {
  background-image:
    linear-gradient(rgba(0, 61, 115, 0.7), rgba(0, 61, 115, 0.7)),
    url('../images/hero-stay-lit.png') !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}


/* FORCE image-backed hero backgrounds. Keep this near the bottom of styles.css. */
body .hero.hero-home {
  background-image:
    linear-gradient(rgba(0, 61, 115, 0.70), rgba(0, 61, 115, 0.70)),
    url("../images/hero-stay-lit.png") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

body .hero.about-photo-hero {
  background-image:
    linear-gradient(rgba(0, 61, 115, 0.70), rgba(0, 61, 115, 0.70)),
    url("../images/about-hero-team.png") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}



/* =========================
   High-End Nonprofit Partner Wall
========================= */
.partners-section {
  background:
    radial-gradient(circle at top left, rgba(227, 111, 35, 0.10), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(0, 61, 115, 0.08);
  color: var(--tbcc-primary);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .75rem;
  margin-bottom: 1rem;
}

.partner-tier {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 61, 115, 0.10);
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 61, 115, 0.08);
  backdrop-filter: blur(8px);
}

.featured-tier {
  border-color: rgba(227, 111, 35, 0.28);
  box-shadow: 0 1.25rem 3rem rgba(227, 111, 35, 0.12);
}

.tier-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--tbcc-primary);
  font-weight: 800;
  letter-spacing: .02em;
}

.tier-heading::before,
.tier-heading::after {
  content: "";
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 61, 115, 0.25));
  flex: 1;
}

.tier-heading::after {
  background: linear-gradient(90deg, rgba(0, 61, 115, 0.25), transparent);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.partners-grid-featured {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.partner-card {
  min-height: 124px;
  padding: 1rem;
  border-radius: 1.15rem;
  background: #ffffff;
  border: 1px solid rgba(0, 61, 115, 0.09);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.partner-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 61, 115, 0.08), rgba(227, 111, 35, 0.10));
  opacity: 0;
  transition: opacity .25s ease;
}

.partner-card img {
  max-width: 145px;
  max-height: 78px;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter: grayscale(100%);
  opacity: 0.72;
  transition: transform .25s ease, filter .25s ease, opacity .25s ease;
}

.partner-card.featured {
  min-height: 150px;
}

.partner-card.featured img {
  max-width: 180px;
  max-height: 92px;
}

.partner-card:hover,
.partner-card:focus {
  transform: translateY(-6px);
  box-shadow: 0 1rem 2rem rgba(0, 61, 115, 0.16);
  border-color: rgba(227, 111, 35, 0.35);
}

.partner-card:hover::before,
.partner-card:focus::before {
  opacity: 1;
}

.partner-card:hover img,
.partner-card:focus img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.045);
}

@media (max-width: 575.98px) {
  .partners-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .partner-card {
    min-height: 104px;
    padding: .85rem;
  }

  .partner-card img {
    max-width: 125px;
    max-height: 64px;
  }
}



/* =========================
   Partner Carousel
========================= */
.partners-section {
  background:
    radial-gradient(circle at top left, rgba(227, 111, 35, 0.10), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.partner-carousel {
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(0, 61, 115, 0.12);
  border-radius: 1.5rem;
  padding: 2rem 4rem 3rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 61, 115, 0.10);
  overflow: hidden;
}

.partner-carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 61, 115, 0.04), rgba(227, 111, 35, 0.06));
  pointer-events: none;
}

.partner-carousel-slide {
  min-height: 150px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.partner-carousel-logo {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(0, 61, 115, 0.08);
  box-shadow: 0 .5rem 1.5rem rgba(0, 61, 115, 0.06);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.partner-carousel-logo img {
  display: block;
  width: auto;
  max-width: 180px;
  max-height: 82px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: .78;
  transition: filter .25s ease, opacity .25s ease, transform .25s ease;
}

.partner-carousel-logo:hover {
  transform: translateY(-5px);
  border-color: rgba(227, 111, 35, 0.35);
  box-shadow: 0 1rem 2rem rgba(0, 61, 115, 0.14);
}

.partner-carousel-logo:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.04);
}

.partner-carousel-control {
  width: 3rem;
  opacity: 1;
}

.partner-carousel-control .carousel-control-prev-icon,
.partner-carousel-control .carousel-control-next-icon {
  width: 2.25rem;
  height: 2.25rem;
  background-size: 50% 50%;
  background-color: var(--tbcc-primary);
  border-radius: 999px;
  box-shadow: 0 .5rem 1rem rgba(0, 61, 115, 0.20);
}

.partner-carousel-indicators {
  margin-bottom: .75rem;
}

.partner-carousel-indicators [data-bs-target] {
  width: .65rem;
  height: .65rem;
  border-radius: 999px;
  background-color: var(--tbcc-primary);
}

@media (max-width: 991.98px) {
  .partner-carousel {
    padding: 1.5rem 3.25rem 3rem;
  }

  .partner-carousel-slide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 270px;
  }
}

@media (max-width: 575.98px) {
  .partner-carousel {
    padding: 1rem 2.75rem 2.75rem;
  }

  .partner-carousel-slide {
    grid-template-columns: 1fr;
    min-height: 520px;
  }

  .partner-carousel-logo {
    min-height: 108px;
  }

  .partner-carousel-logo img {
    max-width: 165px;
    max-height: 76px;
  }
}



/* Partner carousel color fix: always show logos in full color */
.partner-carousel-logo img,
.partner-card img {
  filter: none !important;
  opacity: 1 !important;
}


/* Slightly increase white card contrast for partner logos */

.partner-carousel-logo {
  background: #ffffff !important;
  border: 1px solid rgba(0, 61, 115, 0.16) !important;
}



/* =========================
   TBCC Logo-Inspired Color System
   Adds tasteful logo color throughout the site without making it feel busy.
========================= */
:root {
  --tbcc-navy: #160d2e;
  --tbcc-ink: #090814;
  --tbcc-blue: #0066d6;
  --tbcc-sky: #34c6ff;
  --tbcc-pink: #ec2b88;
  --tbcc-gold: #ffd54a;
  --tbcc-green: #7ac943;
  --tbcc-orange: #ff6a18;
  --tbcc-rainbow: linear-gradient(100deg, #ec2b88 0%, #ffd54a 28%, #7ac943 48%, #34c6ff 70%, #0066d6 100%);
}

/* richer nonprofit feel inspired by original site */
body {
  background: #f8fbff;
}

.navbar {
  background:
    radial-gradient(circle at 10% 0%, rgba(236, 43, 136, 0.28), transparent 24%),
    radial-gradient(circle at 90% 0%, rgba(52, 198, 255, 0.20), transparent 28%),
    #080713 !important;
  border-bottom: 4px solid transparent;
  border-image: var(--tbcc-rainbow) 1;
  box-shadow: 0 .75rem 2rem rgba(0, 0, 0, 0.18);
}

.navbar-brand img {
  height: 62px !important;
  filter: drop-shadow(0 0 10px rgba(255,255,255,.18));
}

.navbar-nav .nav-link {
  position: relative;
  color: #ffffff !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--tbcc-gold) !important;
}

.navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: .45rem;
  right: .85rem;
  bottom: .2rem;
  height: 3px;
  border-radius: 999px;
  background: var(--tbcc-rainbow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

/* use rainbow gradient as a tasteful accent, not everywhere */
.btn-primary {
  background: var(--tbcc-rainbow) !important;
  border: none !important;
  color: #fff !important;
  letter-spacing: .03em;
  box-shadow: 0 .7rem 1.5rem rgba(236, 43, 136, .20);
}

.btn-primary:hover,
.btn-primary:focus {
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 .9rem 1.8rem rgba(0, 102, 214, .24);
}

.btn-outline-primary {
  border-color: var(--tbcc-blue);
  color: var(--tbcc-blue);
}

.btn-outline-primary:hover {
  background: var(--tbcc-blue);
  color: #fff;
}

/* Homepage hero: deeper like original site, with colorful image treatment */
body .hero.hero-home {
  background-image:
    radial-gradient(circle at 18% 18%, rgba(236, 43, 136, .25), transparent 20%),
    radial-gradient(circle at 82% 18%, rgba(52, 198, 255, .22), transparent 22%),
    linear-gradient(rgba(8, 7, 19, 0.72), rgba(8, 7, 19, 0.72)),
    url("../images/hero-stay-lit.png") !important;
  border-bottom: 6px solid transparent;
  border-image: var(--tbcc-rainbow) 1;
}

body .hero.about-photo-hero {
  background-image:
    radial-gradient(circle at 18% 18%, rgba(236, 43, 136, .22), transparent 20%),
    radial-gradient(circle at 82% 18%, rgba(52, 198, 255, .20), transparent 22%),
    linear-gradient(rgba(8, 7, 19, 0.70), rgba(8, 7, 19, 0.70)),
    url("../images/about-hero-team.png") !important;
  border-bottom: 6px solid transparent;
  border-image: var(--tbcc-rainbow) 1;
}

.hero h1 {
  text-shadow: 0 4px 22px rgba(0,0,0,.42);
}

.hero .lead,
.hero p {
  text-shadow: 0 2px 12px rgba(0,0,0,.42);
}

/* colorful section titles */
.section h2 {
  position: relative;
  display: inline-block;
}

.section h2::after {
  content: "";
  display: block;
  height: 5px;
  width: 74px;
  border-radius: 999px;
  background: var(--tbcc-rainbow);
  margin: .7rem auto 0;
}

/* Center major section headings across the homepage.
   The title underline stays centered because the h2 itself is centered. */
.section h2,
.section .container > h2.text-center,
.section .text-center > h2 {
  display: table !important;
  width: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

/* Mission and impact sections get subtle brand warmth */
#stats-section {
  background:
    radial-gradient(circle at left top, rgba(255, 213, 74, 0.16), transparent 25%),
    radial-gradient(circle at right top, rgba(52, 198, 255, 0.12), transparent 26%),
    #ffffff;
}

.stats-item {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid rgba(0, 102, 214, .10);
  box-shadow: 0 1rem 2rem rgba(0, 61, 115, .08);
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.stats-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: var(--tbcc-rainbow);
}

.stats-item h3 {
  background: var(--tbcc-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  font-weight: 900;
}

/* Program/event cards with brand-color lift */
.card {
  border: 1px solid rgba(0, 102, 214, .08);
  box-shadow: 0 .75rem 2rem rgba(0, 61, 115, .08);
  border-radius: 1.1rem;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 1rem 2.3rem rgba(0, 61, 115, .14);
}

.card .text-primary,
.text-primary {
  color: var(--tbcc-blue) !important;
}

.event-card {
  background:
    linear-gradient(#fff, #fff) padding-box,
    var(--tbcc-rainbow) border-box !important;
  border: 2px solid transparent !important;
}

.event-card::before {
  background: var(--tbcc-rainbow) !important;
}

/* Partner carousel keeps full color and has a brighter TBCC frame */
.partner-carousel {
  border: 2px solid transparent !important;
  background:
    linear-gradient(#ffffff, #ffffff) padding-box,
    var(--tbcc-rainbow) border-box !important;
}

.partner-carousel-logo img,
.partner-card img {
  filter: none !important;
  opacity: 1 !important;
}

/* Footer mirrors original dark colorful style */
.footer {
  background:
    radial-gradient(circle at 15% 10%, rgba(236, 43, 136, 0.22), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(52, 198, 255, 0.18), transparent 25%),
    #080713 !important;
  border-top: 5px solid transparent;
  border-image: var(--tbcc-rainbow) 1;
}

.footer a {
  color: var(--tbcc-gold);
}

.footer a:hover {
  color: var(--tbcc-sky);
}

/* small colorful separators */
hr {
  border: 0;
  height: 3px;
  background: var(--tbcc-rainbow);
  opacity: 1;
  border-radius: 999px;
}



.hero-action-card {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  box-shadow: 0 .85rem 2rem rgba(0,0,0,.22);
}
.stay-lit-mini {
  font-weight: 900;
  color: var(--tbcc-gold);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.hero-action-text {
  color: #fff;
  font-weight: 700;
}

/* Interactive Community Resource Map */
.community-map-section {
  background:
    radial-gradient(circle at 10% 10%, rgba(227, 111, 35, 0.12), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(0, 119, 182, 0.10), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #fff8ef 100%);
}

.community-map-subtitle {
  max-width: 680px;
  color: #5f6b76;
  font-size: 1.08rem;
}

.community-map-card {
  display: grid;
  grid-template-columns: minmax(240px, 0.65fr) minmax(0, 0.75fr);
  gap: 1.5rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 61, 115, 0.10);
  border-radius: 1.5rem;
  box-shadow: 0 1.25rem 3rem rgba(0, 61, 115, 0.12);
  padding: clamp(1rem, 2vw, 1.75rem);
  overflow: hidden;
}

.community-map-copy {
  background:
    linear-gradient(135deg, rgba(0, 61, 115, 0.96), rgba(0, 119, 182, 0.92)),
    var(--tbcc-primary);
  color: #fff;
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.community-map-copy h3 {
  color: #fff;
  margin-top: 0.4rem;
  margin-bottom: 0.75rem;
}

.community-map-copy p {
  color: rgba(255,255,255,0.88);
  margin-bottom: 0;
}

.community-map-kicker {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
  border-radius: 999px;
  padding: .35rem .8rem;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.community-map-frame {
  position: relative;
  width: 100%;
  max-width: 440px; /* 50% smaller than the previous 880px map width */
  display: block;
  isolation: isolate;
  margin: 0 auto;
  border-radius: 1.1rem;
  overflow: hidden;
  background: #f7fbff;
  box-shadow: inset 0 0 0 1px rgba(0, 61, 115, .08);
}

.community-map-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  position: relative;
  z-index: 1;
}

.community-map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  pointer-events: none;
}

.community-hotspot {
  pointer-events: auto;
  cursor: pointer;
  fill: rgba(227, 111, 35, 0.02);
  stroke: rgba(0, 61, 115, 0.0);
  stroke-width: 5;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill .2s ease, stroke .2s ease, filter .2s ease, transform .2s ease;
}

.community-hotspot:hover,
.community-hotspot:focus {
  fill: rgba(227, 111, 35, 0.22);
  stroke: rgba(0, 61, 115, 0.72);
  filter: drop-shadow(0 0 12px rgba(227, 111, 35, 0.74));
  transform: translateY(-7px) scale(1.025);
  outline: none;
}

.community-resource-modal .modal-content {
  border: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 2rem 4rem rgba(0, 0, 0, .22);
}

.community-resource-modal .modal-header {
  align-items: flex-start;
  color: #fff;
  background:
    radial-gradient(circle at left top, rgba(227, 111, 35, .38), transparent 30%),
    linear-gradient(135deg, var(--tbcc-primary), #0077b6);
  border-bottom: 0;
  padding: 1.25rem 1.5rem;
}

.community-resource-modal .modal-title {
  color: #fff;
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
}

.community-resource-modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: .9;
}

.modal-eyebrow {
  color: rgba(255,255,255,.78);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modal-intro {
  color: rgba(255,255,255,.82);
}

.resource-category + .resource-category {
  margin-top: 1.6rem;
}

.resource-category h6 {
  color: var(--tbcc-primary);
  font-family: var(--font-family-base);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
  margin: 0 0 .75rem;
}

.resource-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.resource-card {
  background: #fff;
  border: 1px solid rgba(0, 61, 115, .10);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 .55rem 1.25rem rgba(0, 61, 115, .07);
}

.resource-card h5 {
  color: var(--tbcc-primary);
  font-family: var(--font-family-base);
  font-size: 1rem;
  font-weight: 850;
  margin: 0 0 .55rem;
}

.resource-address,
.resource-description {
  color: #4f5d68;
  margin-bottom: .45rem;
}

.resource-address i,
.resource-links i {
  color: var(--tbcc-accent);
  margin-right: .45rem;
  width: 1rem;
  text-align: center;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  font-size: .92rem;
  font-weight: 700;
}

.resource-links a {
  overflow-wrap: anywhere;
}

.resources-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #637381;
}

.resources-empty i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 999px;
  background: rgba(227, 111, 35, .12);
  color: var(--tbcc-accent);
  font-size: 1.35rem;
  margin-bottom: .75rem;
}

/* ---------------------------------------------------------------------------
 * Community resource modal category styling
 * These classes add coloured borders and a soft background to each category
 * section within the community resources modal. Combined with a Font Awesome
 * icon, they make it easier for visitors to distinguish between resource
 * groups such as Education, Parks, Libraries, etc.
 */
.resource-category {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-radius: 1rem;
  background-color: var(--tbcc-secondary);
}
.resource-category h6 {
  display: flex;
  align-items: center;
  font-family: var(--font-family-heading);
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--tbcc-primary);
}
.category-icon {
  margin-right: 0.6rem;
}
/* Category accent colours */
.resource-category.category-health {
  border-left: 6px solid #e74c3c;
}
.resource-category.category-community {
  border-left: 6px solid #16a085;
}
.resource-category.category-education {
  border-left: 6px solid #2980b9;
}
.resource-category.category-libraries {
  border-left: 6px solid #8e44ad;
}
.resource-category.category-parks {
  border-left: 6px solid #27ae60;
}
.resource-category.category-government {
  border-left: 6px solid #2c3e50;
}

@media (max-width: 991.98px) {
  .community-map-card {
    grid-template-columns: 1fr;
  }

  .community-map-copy {
    min-height: auto;
  }
}

@media (max-width: 767.98px) {
  .community-map-card {
    padding: .85rem;
    border-radius: 1.1rem;
  }

  .community-map-copy {
    padding: 1.1rem;
  }

  .resource-card-grid {
    grid-template-columns: 1fr;
  }

  .community-resource-modal .modal-header {
    padding: 1rem;
  }
}

/* COMMUNITY MAP OVERLAY HOTFIX: keep SVG hotspots on top of the static map and keep map smaller */
.community-map-frame {
  position: relative !important;
  width: min(100%, 440px) !important;
  max-width: 440px !important;
  aspect-ratio: 1767 / 2048 !important;
  display: block !important;
  isolation: isolate !important;
  margin: 0 auto !important;
  border-radius: 1.1rem !important;
  overflow: hidden !important;
  background: #f7fbff !important;
  box-shadow: inset 0 0 0 1px rgba(0, 61, 115, .08), 0 18px 45px rgba(0, 0, 0, .12) !important;
}
.community-map-image {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  user-select: none !important;
  z-index: 1 !important;
}
.community-map-overlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  z-index: 20 !important;
  pointer-events: none !important;
  overflow: visible !important;
}
.community-hotspot {
  pointer-events: all !important;
  cursor: pointer !important;
  fill: rgba(255, 255, 255, 0.001) !important;
  stroke: rgba(0, 61, 115, 0) !important;
  stroke-width: 5 !important;
  transform-box: fill-box !important;
  transform-origin: center !important;
  transition: fill .2s ease, stroke .2s ease, filter .2s ease, transform .2s ease !important;
}
.community-hotspot:hover,
.community-hotspot:focus {
  fill: rgba(255, 203, 5, 0.28) !important;
  stroke: rgba(0, 61, 115, .85) !important;
  filter: drop-shadow(0 0 10px rgba(255, 203, 5, .85)) !important;
  transform: translateY(-3px) scale(1.015) !important;
  outline: none !important;
}

/* =========================================================
   COMMUNITY MAP FINAL ALIGNMENT FIX
   The image creates the height; the SVG is absolutely layered on top.
   This prevents hotspots from appearing below the map or as black blocks.
========================================================= */
.community-map-section .community-map-card {
  display: block !important;
  max-width: 1040px !important;
  margin: 0 auto !important;
  padding: clamp(1rem, 2vw, 1.5rem) !important;
}
.community-map-section .community-map-copy {
  max-width: 820px !important;
  min-height: auto !important;
  margin: 0 auto 1.25rem auto !important;
  text-align: center !important;
}
.community-map-section .community-map-kicker {
  align-self: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.community-map-section .community-map-frame {
  position: relative !important;
  display: block !important;
  width: min(100%, 760px) !important;
  max-width: 760px !important;
  height: auto !important;
  aspect-ratio: auto !important;
  margin: 0 auto !important;
  line-height: 0 !important;
  overflow: hidden !important;
  border-radius: 1.1rem !important;
  background: #ffffff !important;
  isolation: isolate !important;
  box-shadow: 0 18px 45px rgba(0, 61, 115, .14), inset 0 0 0 1px rgba(0, 61, 115, .10) !important;
}
.community-map-section .community-map-image {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  user-select: none !important;
}
.community-map-section .community-map-overlay {
  position: absolute !important;
  inset: 0 !important;
  z-index: 30 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto !important;
  overflow: hidden !important;
}
.community-map-section .community-hotspot {
  pointer-events: auto !important;
  cursor: pointer !important;
  fill: rgba(255, 255, 255, 0.001) !important;
  stroke: rgba(0, 61, 115, 0) !important;
  stroke-width: 5 !important;
  vector-effect: non-scaling-stroke !important;
  transform-box: fill-box !important;
  transform-origin: center !important;
  transition: fill .18s ease, stroke .18s ease, filter .18s ease, transform .18s ease !important;
}
.community-map-section .community-hotspot:hover,
.community-map-section .community-hotspot:focus {
  fill: rgba(255, 203, 5, .28) !important;
  stroke: rgba(0, 61, 115, .85) !important;
  filter: drop-shadow(0 0 10px rgba(255, 203, 5, .80)) !important;
  transform: translateY(-3px) scale(1.015) !important;
  outline: none !important;
}
@media (max-width: 991.98px) {
  .community-map-section .community-map-frame { width: min(100%, 680px) !important; }
}
@media (max-width: 575.98px) {
  .community-map-section .community-map-card { padding: .75rem !important; }
  .community-map-section .community-map-frame { width: 100% !important; border-radius: .85rem !important; }
}

/* =========================================================
   MOBILE COMMUNITY MAP FIX
   Keeps the map visible on iPhone/Safari and keeps the SVG
   clickable layer perfectly on top of the static image.
========================================================= */
.community-map-section .community-map-card { max-width: 980px !important; }
.community-map-section .community-map-frame {
  position: relative !important; display: block !important;
  width: min(100%, 640px) !important; max-width: 640px !important;
  aspect-ratio: 1767 / 2048 !important; height: auto !important; min-height: 260px !important;
  margin: 0 auto !important; line-height: 0 !important; overflow: hidden !important;
  border-radius: 1.1rem !important; background: #ffffff !important; isolation: isolate !important;
  box-shadow: 0 18px 45px rgba(0, 61, 115, .14), inset 0 0 0 1px rgba(0, 61, 115, .10) !important;
}
.community-map-section .community-map-image {
  position: absolute !important; inset: 0 !important; z-index: 1 !important;
  display: block !important; width: 100% !important; height: 100% !important; max-width: none !important;
  object-fit: contain !important; user-select: none !important; -webkit-user-drag: none !important;
}
.community-map-section .community-map-overlay {
  position: absolute !important; inset: 0 !important; z-index: 30 !important;
  display: block !important; width: 100% !important; height: 100% !important;
  pointer-events: auto !important; touch-action: manipulation !important;
  -webkit-tap-highlight-color: rgba(255, 203, 5, .22) !important;
}
.community-map-section .community-hotspot {
  pointer-events: auto !important; cursor: pointer !important; fill: rgba(255, 255, 255, 0.01) !important;
  stroke: rgba(0, 61, 115, 0) !important; stroke-width: 8 !important; vector-effect: non-scaling-stroke !important;
  touch-action: manipulation !important;
}
@media (max-width: 767.98px) {
  .community-map-section { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .community-map-section .container { padding-left: 14px !important; padding-right: 14px !important; }
  .community-map-section .community-map-card { padding: .85rem !important; border-radius: 1.05rem !important; }
  .community-map-section .community-map-copy { padding: 1rem !important; margin-bottom: 1rem !important; }
  .community-map-section .community-map-frame { width: 100% !important; max-width: 420px !important; min-height: 0 !important; border-radius: .85rem !important; }
}
@media (max-width: 390px) { .community-map-section .community-map-frame { max-width: 360px !important; } }

/* =========================================================
   COMMUNITY RESOURCE MODAL MOBILE HOTFIX
   Uses a custom modal layer so iPhone/Safari does not show
   only the gray backdrop without the popup content.
========================================================= */
body.community-modal-open {
  overflow: hidden !important;
  touch-action: none !important;
}

.community-resource-modal.is-open {
  position: fixed !important;
  inset: 0 !important;
  z-index: 20000 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  padding: 24px 14px !important;
  overflow-y: auto !important;
  background: rgba(14, 25, 38, .68) !important;
  opacity: 1 !important;
  -webkit-overflow-scrolling: touch !important;
}

.community-resource-modal.is-open .modal-dialog {
  width: min(100%, 1100px) !important;
  max-width: 1100px !important;
  margin: auto !important;
  transform: none !important;
  pointer-events: auto !important;
}

.community-resource-modal.is-open .modal-content {
  max-height: calc(100vh - 48px) !important;
  max-height: calc(100dvh - 48px) !important;
  display: flex !important;
  flex-direction: column !important;
}

.community-resource-modal.is-open .modal-body {
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding: 1.25rem !important;
}

@media (max-width: 767.98px) {
  .community-resource-modal.is-open {
    align-items: flex-start !important;
    padding: 10px !important;
  }

  .community-resource-modal.is-open .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  .community-resource-modal.is-open .modal-content {
    max-height: calc(100vh - 20px) !important;
    max-height: calc(100dvh - 20px) !important;
    border-radius: 1rem !important;
  }

  .community-resource-modal .modal-header {
    padding: 1rem !important;
  }

  .community-resource-modal .modal-title {
    font-size: 1.35rem !important;
  }

  .community-resource-modal.is-open .modal-body {
    padding: 1rem !important;
  }

  .resource-card-grid {
    grid-template-columns: 1fr !important;
  }

  .resource-card {
    padding: .9rem !important;
  }
}

/* Refined vector graphics for the age range cards */
#who-serving-section .age-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}
#who-serving-section .age-vector {
  width: 116px;
  height: 88px;
  margin-bottom: 0.75rem;
}
#who-serving-section .age-vector svg {
  width: 100%;
  height: 100%;
  display: block;
}
#who-serving-section .age-bg {
  fill: rgba(0, 61, 115, 0.06);
}
#who-serving-section .age-person {
  fill: var(--tbcc-primary);
}
#who-serving-section .age-person-secondary {
  fill: #316ea0;
}
#who-serving-section .age-detail {
  fill: none;
  stroke: var(--tbcc-accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#who-serving-section .age-accent-dot {
  fill: var(--tbcc-accent);
}
#who-serving-section .age-card-child {
  border-left-color: #e36f23;
}
#who-serving-section .age-card-teen {
  border-left-color: #2f80ed;
}
#who-serving-section .age-card-adult {
  border-left-color: #7b4bb2;
}
#who-serving-section .age-card h3 {
  margin-top: 0.35rem;
}
