/*
Theme Name: TownFront
Theme URI: https://www.mytownfront.com
Author: TownFront
Description: TownFront corporate website and reusable municipal WordPress platform. The modern front door for your community.
Version: 1.5.3
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: townfront
*/

/* ==========================================================================
   TownFront Design Tokens
   ========================================================================== */
:root {
  --tf-navy: #0F2D4A;
  --tf-navy-deep: #0A2138;
  --tf-navy-ink: #071829;
  --tf-green: #62875B;
  --tf-green-dark: #4F6F49;
  --tf-green-deep: #435E3E;
  --tf-green-tint: #EFF3EE;
  --tf-blue: #6B7C93;
  --tf-gray: #D7D8DF;
  --tf-gray-soft: #E8EAEF;
  --tf-white: #F8F9FA;
  --tf-panel: #F4F6F9;
  --tf-text: #2A3743;
  --tf-text-soft: #47535F;
  --tf-font: "Montserrat", Arial, Helvetica, sans-serif;
  --tf-radius: 14px;
  --tf-radius-sm: 9px;
  --tf-maxw: 1160px;
  --tf-section: clamp(4rem, 9vw, 6.75rem);
  --tf-shadow-xs: 0 1px 2px rgba(15, 45, 74, 0.05);
  --tf-shadow-sm: 0 1px 2px rgba(15, 45, 74, 0.05), 0 6px 18px -8px rgba(15, 45, 74, 0.10);
  --tf-shadow-md: 0 2px 4px rgba(15, 45, 74, 0.05), 0 16px 36px -16px rgba(15, 45, 74, 0.18);
  --tf-shadow-lg: 0 4px 10px rgba(15, 45, 74, 0.06), 0 32px 64px -28px rgba(15, 45, 74, 0.28);
  --tf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--tf-font);
  font-weight: 400;
  font-size: 1.0325rem;
  line-height: 1.68;
  color: var(--tf-text);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--tf-green-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--tf-navy); }

h1, h2, h3, h4, h5, h6 {
  color: var(--tf-navy);
  font-weight: 700;
  line-height: 1.16;
  margin: 0 0 0.6em;
  overflow-wrap: break-word;
  letter-spacing: -0.022em;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.55rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.45rem); }
h3 { font-size: clamp(1.14rem, 2vw, 1.32rem); font-weight: 650; letter-spacing: -0.012em; }
h4 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.35em; margin: 0 0 1.2em; }
li { margin-bottom: 0.45em; }
hr { border: 0; border-top: 1px solid var(--tf-gray-soft); margin: 2.75rem 0; }
blockquote {
  margin: 1.6rem 0; padding: 0.6rem 0 0.6rem 1.4rem;
  border-left: 3px solid var(--tf-green); color: var(--tf-navy); font-weight: 500;
}
table { border-collapse: collapse; width: 100%; margin: 0 0 1.5rem; }
th, td { border: 1px solid var(--tf-gray-soft); padding: 0.65rem 0.85rem; text-align: left; }
th { background: var(--tf-panel); color: var(--tf-navy); font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--tf-green);
  outline-offset: 2px;
  border-radius: 3px;
}

.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal !important;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--tf-navy); color: #fff; padding: 0.75rem 1.25rem;
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }

.tf-container { max-width: var(--tf-maxw); margin: 0 auto; padding: 0 1.5rem; }
/* longhand only: .tf-section is often combined with .tf-container on one element */
.tf-section { padding-top: var(--tf-section); padding-bottom: var(--tf-section); }
.tf-section--panel { background: linear-gradient(180deg, var(--tf-panel) 0%, #FBFCFD 100%); }
.tf-section--tint { background: linear-gradient(180deg, var(--tf-green-tint) 0%, #F7FAF6 100%); }
.tf-section--navy {
  background:
    radial-gradient(52rem 30rem at 84% -10%, rgba(98, 135, 91, 0.16), transparent 60%),
    radial-gradient(40rem 26rem at 8% 110%, rgba(107, 124, 147, 0.14), transparent 55%),
    linear-gradient(160deg, var(--tf-navy) 0%, var(--tf-navy-deep) 100%);
}
.tf-section--navy h2, .tf-section--navy h3, .tf-section--navy p { color: #fff; }

.tf-kicker {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.76rem;
  font-weight: 650;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--tf-green-dark);
  margin-bottom: 1.1rem;
}
.tf-kicker::before {
  content: ""; width: 1.6rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--tf-green), rgba(98,135,91,0.35));
}
.tf-center .tf-kicker::after {
  content: ""; width: 1.6rem; height: 2px; border-radius: 2px;
  background: linear-gradient(270deg, var(--tf-green), rgba(98,135,91,0.35));
}
.tf-section--navy .tf-kicker { color: #A9C8A2; }
.tf-lead { font-size: 1.17rem; line-height: 1.7; color: var(--tf-text-soft); max-width: 46em; }
.tf-center { text-align: center; }
.tf-center .tf-lead { margin-left: auto; margin-right: auto; }
.tf-measure { max-width: 46em; }
.tf-section-head { margin-bottom: 0.75rem; }

/* ==========================================================================
   Duotone icons — navy stroke over a translucent brand-green fill layer
   ========================================================================== */
svg .duo {
  fill: var(--tf-ico-duo, rgba(98, 135, 91, 0.32));
  stroke: none;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.tf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  font-family: var(--tf-font);
  font-size: 0.97rem;
  font-weight: 600;
  line-height: 1;
  padding: 1.02rem 1.65rem;
  border-radius: 10px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--tf-ease), color .18s var(--tf-ease),
              border-color .18s var(--tf-ease), box-shadow .18s var(--tf-ease),
              transform .18s var(--tf-ease);
}
.tf-btn:hover { transform: translateY(-1px); }
.tf-btn:active { transform: translateY(0); }
.tf-btn--primary {
  background: var(--tf-navy);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(15,45,74,0.5);
}
.tf-btn--primary:hover { color: #fff; background: var(--tf-navy-deep); }
.tf-btn--green {
  background: var(--tf-green-dark);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(79,111,73,0.55);
}
.tf-btn--green:hover { color: #fff; background: var(--tf-green-deep); }
.tf-btn--outline { background: rgba(255,255,255,0.6); color: var(--tf-navy); border-color: rgba(15,45,74,0.28); }
.tf-btn--outline:hover { border-color: var(--tf-navy); background: #fff; color: var(--tf-navy); }
.tf-btn--reverse { background: #fff; color: var(--tf-navy); box-shadow: 0 10px 24px -12px rgba(0,0,0,0.4); }
.tf-btn--reverse:hover { background: var(--tf-white); color: var(--tf-navy); }
.tf-btn .tf-btn__arrow { transition: transform .18s var(--tf-ease); }
.tf-btn:hover .tf-btn__arrow { transform: translateX(3px); }
.tf-btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.tf-header {
  background: #fff;
  border-bottom: 1px solid var(--tf-gray-soft);
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow .25s var(--tf-ease);
}
.tf-header.is-scrolled {
  box-shadow: 0 10px 28px -22px rgba(15, 45, 74, 0.35);
}
@media (max-width: 1020px) {
  .tf-header {
    transition: box-shadow .25s var(--tf-ease), transform .3s var(--tf-ease);
  }
  .tf-header.is-hidden { transform: translateY(-100%); }
}
.tf-header__inner {
  display: flex; align-items: center; gap: 2rem;
  min-height: 96px;
}
.tf-brand {
  display: inline-flex; align-items: center; gap: 0.72rem;
  text-decoration: none; flex-shrink: 0;
}
.tf-brand__lockup { display: block; width: auto; max-width: 100%; height: auto; }
.tf-brand__lockup--full { width: 268px; }
.tf-brand__lockup--compact { display: none; width: 158px; }
.tf-brand__text {
  display: flex; flex-direction: column; line-height: 1;
  border-left: 1.5px solid rgba(107, 124, 147, 0.8); /* Civic Blue divider per production spec */
  padding-left: 0.78rem;
  margin-left: 0.1rem;
}
.townfront-wordmark {
  font-family: var(--tf-font);
  font-size: 1.38rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.townfront-wordmark .town { color: var(--tf-navy); }
.townfront-wordmark .front { color: var(--tf-green); }
.tf-brand__tagline {
  font-size: 0.465rem;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--tf-blue);
  margin-top: 0.34rem;
  white-space: nowrap;
}
.tf-nav { margin-left: auto; }
.tf-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(0.4rem, 1.4vw, 1.1rem); }
.tf-nav li { margin: 0; }
.tf-nav a {
  position: relative;
  display: inline-block;
  white-space: nowrap;
  font-size: 0.94rem; font-weight: 500;
  color: var(--tf-text-soft); text-decoration: none;
  padding: 0.5rem 0.3rem;
}
.tf-nav a::after {
  content: ""; position: absolute; left: 0.3rem; right: 0.3rem; bottom: 0.14rem;
  height: 2px; border-radius: 2px; background: var(--tf-green);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s var(--tf-ease);
}
.tf-nav a:hover { color: var(--tf-navy); }
.tf-nav a:hover::after { transform: scaleX(1); }
.tf-nav .current-menu-item > a,
.tf-nav .current_page_item > a,
.tf-nav .current-menu-ancestor > a { color: var(--tf-navy); font-weight: 600; }
.tf-nav .current-menu-item > a::after,
.tf-nav .current_page_item > a::after,
.tf-nav .current-menu-ancestor > a::after { transform: scaleX(1); }
.tf-nav .menu-cta > a {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--tf-navy);
  color: #fff; font-weight: 600; font-size: 0.9rem; letter-spacing: 0.01em;
  padding: 0.74rem 1.35rem; margin-left: 1.1rem; border-radius: 8px;
  box-shadow: 0 6px 16px -8px rgba(15, 45, 74, 0.45);
  transition: background-color .18s var(--tf-ease), box-shadow .18s var(--tf-ease);
}
.tf-nav .menu-cta > a::after { display: none; }
.tf-nav .menu-cta > a::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #9DC694; flex-shrink: 0;
}
.tf-nav .menu-cta > a:hover {
  color: #fff; background: var(--tf-green-dark);
  box-shadow: 0 8px 18px -8px rgba(79, 111, 73, 0.55);
}

.tf-nav-toggle {
  display: none;
  margin-left: auto;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: none; border: 1px solid var(--tf-gray); border-radius: 9px;
  padding: 0; cursor: pointer; color: var(--tf-navy);
}
.tf-nav-toggle__bars { display: block; width: 20px; height: 2px; background: currentColor; position: relative; border-radius: 2px; }
.tf-nav-toggle__bars::before, .tf-nav-toggle__bars::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .2s var(--tf-ease), top .2s var(--tf-ease);
}
.tf-nav-toggle__bars::before { top: -6px; }
.tf-nav-toggle__bars::after { top: 6px; }
.tf-nav-toggle[aria-expanded="true"] .tf-nav-toggle__bars { background: transparent; }
.tf-nav-toggle[aria-expanded="true"] .tf-nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
.tf-nav-toggle[aria-expanded="true"] .tf-nav-toggle__bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1020px) {
  .tf-nav-toggle { display: inline-flex; align-items: center; gap: 0.55rem; }
  .tf-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: rgba(255,255,255,0.98);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--tf-gray-soft);
    box-shadow: 0 24px 48px -24px rgba(15,45,74,0.3);
    padding: 0.9rem 1.5rem 1.4rem;
  }
  .tf-nav.is-open { display: block; animation: tf-drop .22s var(--tf-ease); }
  @keyframes tf-drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .tf-nav ul { flex-direction: column; align-items: stretch; gap: 0.1rem; }
  .tf-nav a { display: block; padding: 0.85rem 0.75rem; font-size: 1.02rem; }
  .tf-nav a::after { display: none; }
  .tf-nav .menu-cta > a { margin: 0.6rem 0 0; text-align: center; border-radius: 10px; }
  .tf-brand__lockup--full { display: none; }
  .tf-brand__lockup--compact { display: block; }

  .tf-header__inner { min-height: 78px; }
}

/* ==========================================================================
   Hero — full-bleed photography with fading slider
   ========================================================================== */
.tf-hero--photo {
  position: relative;
  display: flex; align-items: center;
  min-height: clamp(580px, 78vh, 780px);
  padding: clamp(4rem, 9vw, 6.5rem) 0;
  overflow: hidden;
  color: #fff;
  background: var(--tf-navy-deep);
}
.tf-hero__bg { position: absolute; inset: -7% 0; z-index: 0; }
.tf-hero__bg .tf-slider__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden; transform: none;
  transition: opacity 1.2s ease, visibility 0s linear 1.2s;
}
.tf-hero__bg .tf-slider__slide.is-active {
  position: absolute;
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 1.2s ease;
}
.tf-hero__bg .tf-slider__slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.07);
  transition: transform 9s linear;
}
.tf-hero__bg .tf-slider__slide.is-active img { transform: scale(1); }
/* Fade the photography into the brand navy for natural, legible blending */
.tf-hero--photo::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(97deg,
      rgba(7, 24, 41, 0.82) 0%,
      rgba(8, 28, 48, 0.66) 30%,
      rgba(11, 34, 57, 0.40) 58%,
      rgba(15, 45, 74, 0.20) 100%),
    linear-gradient(180deg,
      rgba(7, 24, 41, 0.28) 0%,
      rgba(7, 24, 41, 0.00) 32%,
      rgba(7, 24, 41, 0.00) 62%,
      rgba(7, 24, 41, 0.48) 100%);
}
.tf-hero__content { position: relative; z-index: 2; width: 100%; }
.tf-hero__copy { max-width: 660px; }
.tf-hero--photo h1 { color: #fff; text-shadow: 0 2px 24px rgba(7, 24, 41, 0.4); }
.tf-hero--photo .tf-lead { color: #E2E9F0; text-shadow: 0 1px 12px rgba(7, 24, 41, 0.45); }
.tf-hero__badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-radius: 99px;
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: #fff; padding: 0.45rem 1rem; margin-bottom: 1.6rem;
}
.tf-hero--photo h1 .tf-underline { position: relative; white-space: nowrap; }
.tf-hero--photo h1 .tf-underline::after {
  content: ""; position: absolute; left: 0.02em; right: 0.02em; bottom: 0.05em;
  height: 0.14em; border-radius: 0.1em; z-index: -1;
  background: linear-gradient(90deg, rgba(98, 135, 91, 0.85), rgba(98, 135, 91, 0.45));
}
.tf-hero__proof {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1.6rem; margin: 2.1rem 0 0;
  padding: 0; list-style: none;
}
.tf-hero__proof li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.87rem; font-weight: 500; color: #D4DDE6; margin: 0;
}
.tf-hero__proof svg { width: 21px; height: 21px; color: #C9D5E0; flex-shrink: 0; --tf-ico-duo: rgba(157, 198, 148, 0.45); }
.tf-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff; border-color: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.tf-btn--ghost:hover { background: #fff; color: var(--tf-navy); border-color: #fff; }

/* Slider controls */
.tf-hero__slider-ui { display: flex; align-items: center; gap: 1.1rem; margin-top: 2.6rem; }
.tf-slider__nav { display: flex; align-items: center; gap: 0.5rem; }
.tf-slider__dot {
  width: auto; min-width: 26px; height: 30px;
  background: none; border: 0; cursor: pointer; position: relative; padding: 0 2px;
}
.tf-slider__dot::before {
  content: ""; display: block; height: 4px; border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  transition: background-color .2s, width .25s var(--tf-ease);
  width: 22px; margin: 0 auto;
}
.tf-slider__dot:hover::before { background: rgba(255, 255, 255, 0.6); }
.tf-slider__dot.is-active::before { background: #9DC694; width: 34px; }
.tf-slider__caption {
  margin: 0;
  font-size: 0.8rem; font-weight: 500; color: #B9C6D3;
  letter-spacing: 0.02em;
}
.tf-photo-credit {
  display: block;
  font-size: 0.66rem; color: var(--tf-blue); opacity: 0.85;
}
.tf-photo-credit--hero {
  position: absolute; right: 1.1rem; bottom: 0.65rem; z-index: 2;
  color: rgba(255, 255, 255, 0.5); opacity: 1; margin: 0;
}
@media (max-width: 640px) {
  .tf-hero__slider-ui { flex-direction: column; align-items: flex-start; gap: 0.3rem; margin-top: 2rem; }
  .tf-hero--photo { min-height: 0; }
}

/* ==========================================================================
   Page hero (interior pages) — photo background with navy fade
   ========================================================================== */
.tf-page-hero {
  position: relative; overflow: hidden;
  background-color: var(--tf-navy-deep);
  background-size: cover;
  background-position: center 38%;
  color: #fff;
  padding: clamp(3.25rem, 7vw, 5.25rem) 0;
}
.tf-page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(97deg,
      rgba(7, 24, 41, 0.93) 0%,
      rgba(8, 28, 48, 0.82) 34%,
      rgba(11, 34, 57, 0.58) 64%,
      rgba(15, 45, 74, 0.38) 100%),
    linear-gradient(180deg, rgba(7, 24, 41, 0.2) 0%, rgba(7, 24, 41, 0.45) 100%);
}
.tf-page-hero .tf-container { position: relative; }
/* About: show more of the lower part of the hero photo */
.page-id-15 .tf-page-hero { background-position: center 78%; }
.tf-page-hero h1 { margin-bottom: 0.35em; font-size: clamp(2rem, 4vw, 2.9rem); color: #fff; text-shadow: 0 2px 20px rgba(7, 24, 41, 0.4); }
.tf-page-hero .tf-lead { margin-bottom: 0; color: #E2E9F0; max-width: 44em; }
.tf-page-hero .tf-kicker { color: #A9C8A2; }
.tf-page-hero .tf-search-form input[type="search"] { border-color: transparent; }

/* ==========================================================================
   Cards and grids
   ========================================================================== */
.tf-grid { display: grid; gap: 1.35rem; margin-top: 2.5rem; }
.tf-grid--2 { grid-template-columns: repeat(2, 1fr); }
.tf-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tf-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .tf-grid--3, .tf-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tf-grid--2, .tf-grid--3, .tf-grid--4 { grid-template-columns: 1fr; } }

.tf-card {
  position: relative;
  background: #fff; border: 1px solid var(--tf-gray-soft); border-radius: var(--tf-radius);
  padding: 1.8rem 1.65rem 1.6rem;
  box-shadow: var(--tf-shadow-sm);
  transition: transform .25s var(--tf-ease), box-shadow .25s var(--tf-ease), border-color .25s var(--tf-ease);
}
.tf-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tf-shadow-md);
  border-color: rgba(98, 135, 91, 0.45);
}
.tf-card h3 { margin-bottom: 0.5em; }
.tf-card p { color: var(--tf-text-soft); font-size: 0.97rem; }
.tf-card p:last-child { margin-bottom: 0; }
.tf-card__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(160deg, #16395C, var(--tf-navy-deep));
  color: #fff; font-weight: 700; font-size: 0.98rem;
  margin-bottom: 1.05rem;
  box-shadow: 0 6px 14px -6px rgba(15,45,74,0.5);
}
.tf-card__ico {
  width: 58px; height: 58px; border-radius: 16px;
  background: linear-gradient(160deg, #FFFFFF, var(--tf-green-tint));
  border: 1px solid rgba(98, 135, 91, 0.45);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.1rem; color: var(--tf-navy);
  box-shadow: 0 4px 10px -5px rgba(79, 111, 73, 0.4), inset 0 1px 0 #fff;
}
.tf-card__ico svg { width: 30px; height: 30px; }
.tf-section--navy .tf-card {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.14);
  box-shadow: none;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.tf-section--navy .tf-card:hover { border-color: rgba(169, 200, 162, 0.5); box-shadow: 0 20px 44px -24px rgba(0,0,0,0.5); }
.tf-section--navy .tf-card h3 { color: #fff; }
.tf-section--navy .tf-card p { color: #C6D2DE; }
.tf-section--navy .tf-card__ico {
  background: rgba(169, 200, 162, 0.12);
  border-color: rgba(169, 200, 162, 0.35);
  color: #DCE5ED; box-shadow: none;
  --tf-ico-duo: rgba(169, 200, 162, 0.35);
}

/* Split (two-column) blocks */
.tf-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.25rem, 5vw, 4.5rem); align-items: center; }
@media (max-width: 900px) { .tf-split { grid-template-columns: 1fr; } }

/* Checklist */
.tf-check { list-style: none; padding: 0; margin: 1.35rem 0 0; }
.tf-check li { position: relative; padding-left: 2.05em; margin-bottom: 0.72em; }
.tf-check li::before {
  content: ""; position: absolute; left: 0; top: 0.16em;
  width: 1.18em; height: 1.18em; border-radius: 50%;
  background: var(--tf-green);
  border: 1.4px solid var(--tf-green-dark);
  box-shadow: 0 2px 6px -2px rgba(98,135,91,0.5);
}
.tf-check li::after {
  content: ""; position: absolute; left: 0.34em; top: 0.46em;
  width: 0.52em; height: 0.3em;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.tf-section--navy .tf-check li::before { background: rgba(169,200,162,0.12); box-shadow: none; }
.tf-section--navy .tf-check li::after { border-color: #A9C8A2; }

/* Icon list — iconized replacement for plain checklists */
.tf-icon-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.95rem; }
.tf-icon-list li { display: flex; align-items: flex-start; gap: 0.9rem; margin: 0; }
.tf-icon-list__ico {
  flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(160deg, #FFFFFF, var(--tf-green-tint));
  border: 1px solid rgba(98, 135, 91, 0.45);
  display: flex; align-items: center; justify-content: center;
  color: var(--tf-navy);
  box-shadow: 0 3px 8px -4px rgba(79, 111, 73, 0.4), inset 0 1px 0 #fff;
}
.tf-icon-list__ico svg { width: 25px; height: 25px; }
.tf-icon-list__body { padding-top: 0.55rem; }
.tf-icon-list__body strong { color: var(--tf-navy); }
.tf-icon-list--compact { gap: 0.7rem; }
.tf-icon-list--compact .tf-icon-list__ico { width: 40px; height: 40px; border-radius: 11px; }
.tf-icon-list--compact .tf-icon-list__ico svg { width: 21px; height: 21px; }
.tf-icon-list--compact .tf-icon-list__body { padding-top: 0.45rem; font-size: 0.95rem; }
.tf-section--navy .tf-icon-list__ico {
  background: rgba(169, 200, 162, 0.12);
  border-color: rgba(169, 200, 162, 0.35);
  color: #A9C8A2; box-shadow: none;
}

/* Full-width photo statement band */
.tf-photo-band {
  position: relative;
  background-size: cover; background-position: center 42%;
  background-color: var(--tf-navy-deep);
  padding: clamp(4rem, 9vw, 6.5rem) 0;
  color: #fff;
}
.tf-photo-band::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 24, 41, 0.5) 0%, rgba(10, 33, 56, 0.55) 100%);
}
.tf-photo-band .tf-container { position: relative; text-align: center; }
.tf-photo-band h2 { color: #fff; text-shadow: 0 2px 22px rgba(7, 24, 41, 0.5); max-width: 22em; margin-left: auto; margin-right: auto; }
.tf-photo-band p { color: #E2E9F0; max-width: 40em; margin: 0 auto 1.5rem; text-shadow: 0 1px 12px rgba(7, 24, 41, 0.5); }

/* Inline photo (rounded, used inside split sections) */
.tf-inline-photo {
  margin: 0 0 1.6rem;
  border-radius: var(--tf-radius); overflow: hidden;
  box-shadow: var(--tf-shadow-md);
  aspect-ratio: 16 / 10;
}
.tf-inline-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Community photo strip */
.tf-photo-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; margin-top: 2.5rem; }
@media (max-width: 760px) { .tf-photo-strip { grid-template-columns: 1fr; } }
.tf-photo-strip figure {
  position: relative; margin: 0;
  border-radius: var(--tf-radius); overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--tf-shadow-md);
}
.tf-photo-strip img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .6s var(--tf-ease);
}
.tf-photo-strip figure:hover img { transform: scale(1.045); }
.tf-photo-strip figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2rem 1.2rem 0.95rem;
  background: linear-gradient(180deg, transparent 0%, rgba(7, 24, 41, 0.72) 100%);
  color: #fff; font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
}

/* Feature panel (white card list on tinted sections) */
.tf-panel-card {
  background: #fff; border: 1px solid var(--tf-gray-soft); border-radius: var(--tf-radius);
  box-shadow: var(--tf-shadow-md);
  padding: 2rem 1.9rem 1.85rem;
}
.tf-panel-card h3 { display: flex; align-items: center; gap: 0.7rem; }
.tf-h3-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  color: var(--tf-navy);
}
.tf-h3-ico svg { width: 32px; height: 32px; }

/* Steps */
.tf-steps { counter-reset: tf-step; }
.tf-steps .tf-card { padding-top: 2rem; }
.tf-steps .tf-card::before {
  content: ""; position: absolute; top: 0; left: 1.65rem; right: 1.65rem; height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--tf-green), rgba(98,135,91,0.15));
}

/* Comparison table */
.tf-compare { margin-top: 2.5rem; border: 1px solid var(--tf-gray-soft); border-radius: var(--tf-radius); overflow: hidden; box-shadow: var(--tf-shadow-sm); background: #fff; }
.tf-compare table { margin: 0; }
.tf-compare th, .tf-compare td { border: 0; border-bottom: 1px solid var(--tf-gray-soft); padding: 0.95rem 1.2rem; }
.tf-compare tr:last-child td { border-bottom: 0; }
.tf-compare th:first-child, .tf-compare td:first-child { border-right: 1px solid var(--tf-gray-soft); }
.tf-compare thead th { background: var(--tf-navy); color: #fff; }
.tf-compare td:first-child { color: var(--tf-blue); }
.tf-compare td:last-child { color: var(--tf-navy); font-weight: 500; }

/* ==========================================================================
   Posts / Resources
   ========================================================================== */
.tf-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.35rem; margin-top: 2.5rem; }
@media (max-width: 980px) { .tf-post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tf-post-grid { grid-template-columns: 1fr; } }
.tf-post-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--tf-gray-soft); border-radius: var(--tf-radius);
  padding: 1.7rem 1.6rem 1.5rem;
  box-shadow: var(--tf-shadow-sm);
  transition: transform .25s var(--tf-ease), box-shadow .25s var(--tf-ease), border-color .25s var(--tf-ease);
}
.tf-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--tf-shadow-md);
  border-color: rgba(98, 135, 91, 0.45);
}
.tf-post-card__cat {
  display: inline-flex; align-self: flex-start;
  font-size: 0.68rem; font-weight: 650; letter-spacing: 0.11em; text-transform: uppercase;
  color: #fff;
  background: var(--tf-green); border-radius: 99px;
  padding: 0.3rem 0.75rem; margin-bottom: 0.95rem;
}
.tf-post-card h3 { font-size: 1.13rem; line-height: 1.36; margin-bottom: 0.55em; }
.tf-post-card h3 a { color: var(--tf-navy); text-decoration: none; }
.tf-post-card h3 a::after { content: ""; position: absolute; inset: 0; }
.tf-post-card h3 a:hover { color: var(--tf-green-dark); }
.tf-post-card p { font-size: 0.93rem; color: var(--tf-text-soft); flex: 1; }
.tf-post-card__meta { font-size: 0.79rem; color: var(--tf-blue); margin-top: 0.85rem; }

.tf-article { padding: var(--tf-section) 0; }
.tf-article__inner { max-width: 46em; margin: 0 auto; }
.tf-article__meta { font-size: 0.85rem; color: var(--tf-blue); margin-bottom: 0.75rem; }
.tf-article h1 { font-size: clamp(1.85rem, 3.5vw, 2.55rem); }
.tf-article .entry-content h2 { margin-top: 1.8em; }
.tf-article .entry-content h3 { margin-top: 1.5em; }

.tf-pagination { margin-top: 3.25rem; display: flex; justify-content: center; gap: 0.45rem; }
.tf-pagination .page-numbers {
  display: inline-block; min-width: 2.5rem; text-align: center;
  padding: 0.55rem 0.65rem; border: 1px solid var(--tf-gray-soft); border-radius: 9px;
  background: #fff; text-decoration: none; color: var(--tf-navy); font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
.tf-pagination .page-numbers.current { background: var(--tf-navy); color: #fff; border-color: var(--tf-navy); }
.tf-pagination a.page-numbers:hover { border-color: var(--tf-navy); box-shadow: var(--tf-shadow-xs); }

/* Entry content (interior pages) */
.entry-content { font-size: 1.045rem; }
.entry-content > * { max-width: 46em; }
.entry-content > .alignwide, .entry-content > .wp-block-columns, .entry-content > .tf-fullw { max-width: none; }
.entry-content h2 { margin-top: 1.7em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content li { margin-bottom: 0.6em; }
.entry-content .wp-block-buttons { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.entry-content .wp-block-button__link {
  display: inline-block;
  background: linear-gradient(180deg, #16395C 0%, var(--tf-navy) 55%, var(--tf-navy-deep) 100%);
  color: #fff; border-radius: 10px;
  font-weight: 600; font-size: 0.96rem; padding: 1rem 1.6rem; text-decoration: none;
  box-shadow: 0 1px 2px rgba(15,45,74,0.25), 0 10px 22px -10px rgba(15,45,74,0.45);
  transition: transform .18s var(--tf-ease), box-shadow .18s var(--tf-ease);
}
.entry-content .wp-block-button__link:hover { transform: translateY(-1px); }
.entry-content .is-style-outline .wp-block-button__link {
  background: rgba(255,255,255,0.6); color: var(--tf-navy); border: 1.5px solid rgba(15,45,74,0.28); box-shadow: none;
}
.entry-content .is-style-outline .wp-block-button__link:hover { border-color: var(--tf-navy); background: #fff; }

/* ==========================================================================
   Footer
   ========================================================================== */
.tf-footer {
  position: relative;
  background:
    radial-gradient(50rem 28rem at 90% -20%, rgba(98, 135, 91, 0.14), transparent 60%),
    linear-gradient(165deg, var(--tf-navy) 0%, var(--tf-navy-ink) 100%);
  color: #B9C6D3;
  font-size: 0.94rem;
}
.tf-footer::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--tf-green), rgba(98,135,91,0.1));
}
.tf-footer a { color: #DCE5ED; text-decoration: none; }
.tf-footer a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--tf-green); }
.tf-footer__cta { border-bottom: 1px solid rgba(255,255,255,0.1); padding: clamp(2.75rem, 6vw, 4.25rem) 0; }
.tf-footer__cta-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.75rem; }
.tf-footer__cta h2 { color: #fff; margin: 0 0 0.3em; }
.tf-footer__cta p { margin: 0; color: #B9C6D3; max-width: 34em; }
.tf-footer__main {
  display: grid; grid-template-columns: 2.1fr 1fr 1.3fr 1.1fr; gap: 2.75rem;
  /* longhand only: must not clobber .tf-container's horizontal padding */
  padding-top: clamp(2.5rem, 6vw, 3.75rem);
  padding-bottom: clamp(2.5rem, 6vw, 3.75rem);
}
.tf-footer__main > * { min-width: 0; }
@media (max-width: 900px) { .tf-footer__main { grid-template-columns: 1fr 1fr; gap: 2.25rem; } }
@media (max-width: 560px) { .tf-footer__main { grid-template-columns: 1fr; } }
.tf-footer__lockup { display: block; width: 230px; height: auto; margin-bottom: 0.9rem; }
.tf-footer .townfront-wordmark { font-size: 1.22rem; }
.tf-footer a.tf-btn--reverse { color: var(--tf-navy); }
.tf-footer a.tf-btn--reverse:hover { color: var(--tf-navy); text-decoration: none; }
.tf-footer .townfront-wordmark .town { color: #fff; }
.tf-footer .townfront-wordmark .front { color: #9DC694; }
.tf-footer__tagline {
  font-size: 0.6rem; letter-spacing: 0.20em; text-transform: uppercase;
  color: #8FA3B5; line-height: 1.6; max-width: 30ch;
}
.tf-footer__about { font-size: 0.88rem; margin-top: 1rem; max-width: 26em; color: #9DB0C2; overflow-wrap: break-word; }
.tf-footer__h {
  font-size: 0.72rem; font-weight: 650; letter-spacing: 0.16em; text-transform: uppercase;
  color: #8FA3B5; margin: 0 0 1.05rem;
}
.tf-footer ul { list-style: none; margin: 0; padding: 0; }
.tf-footer li { margin-bottom: 0.6rem; font-size: 0.9rem; }
.tf-footer__bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; }
.tf-footer__bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.85rem; font-size: 0.8rem; color: #8FA3B5; }
.tf-footer__legal { text-align: right; }
.tf-footer__legal a { color: #B9C6D3; }
.tf-footer__motto {
  display: block; margin-top: 1.4rem;
  letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.7rem; font-weight: 550; color: #B9C6D3;
}
.tf-footer__motto::after { content: ""; display: block; width: 34px; height: 2px; border-radius: 2px; background: var(--tf-green); margin-top: 0.45rem; }

/* ==========================================================================
   Search form
   ========================================================================== */
.tf-search-form { display: flex; gap: 0.55rem; max-width: 30rem; }
.tf-search-form input[type="search"] {
  flex: 1; font-family: var(--tf-font); font-size: 1rem;
  padding: 0.85rem 1.05rem; border: 1px solid var(--tf-gray); border-radius: 10px;
  background: #fff; box-shadow: var(--tf-shadow-xs);
}
.tf-search-form input[type="search"]:focus { border-color: var(--tf-navy); outline: 2px solid var(--tf-green); outline-offset: 1px; }

/* ==========================================================================
   Formidable Forms — TownFront native styling
   ========================================================================== */
.frm_forms {
  font-family: var(--tf-font); max-width: 44rem;
  background: #fff;
  border: 1px solid var(--tf-gray-soft);
  border-top: 3px solid var(--tf-green);
  border-radius: var(--tf-radius);
  box-shadow: var(--tf-shadow-md);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}
.frm_forms .frm_form_fields { border: 0; padding: 0; }
.frm_forms fieldset { border: 0; padding: 0; margin: 0; }
.frm_forms legend { font-weight: 600; color: var(--tf-navy); }
.frm_forms .frm_form_field { margin-bottom: 1.4rem; }
.frm_forms label,
.frm_forms .frm_primary_label {
  display: block; font-size: 0.92rem; font-weight: 600;
  color: var(--tf-navy); margin-bottom: 0.45rem;
}
.frm_forms .frm_required { color: #A63D3D; }
.frm_forms .frm_description { font-size: 0.85rem; color: var(--tf-blue); margin-top: 0.35rem; }
.frm_forms input[type="text"],
.frm_forms input[type="email"],
.frm_forms input[type="tel"],
.frm_forms input[type="url"],
.frm_forms input[type="number"],
.frm_forms input[type="date"],
.frm_forms input[type="password"],
.frm_forms select,
.frm_forms textarea {
  width: 100%; font-family: var(--tf-font); font-size: 1rem; color: var(--tf-text);
  background: #fff; border: 1px solid #B9BCC7; border-radius: 10px;
  padding: 0.85rem 1rem; line-height: 1.4;
  box-shadow: var(--tf-shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
.frm_forms input:focus, .frm_forms select:focus, .frm_forms textarea:focus {
  border-color: var(--tf-navy); outline: 2px solid var(--tf-green); outline-offset: 1px;
}
.frm_forms input[type="radio"], .frm_forms input[type="checkbox"] {
  width: 1.1rem; height: 1.1rem; accent-color: var(--tf-green-dark); margin-right: 0.5rem;
}
.frm_forms .frm_radio, .frm_forms .frm_checkbox { margin-bottom: 0.45rem; }
.frm_forms .frm_radio label, .frm_forms .frm_checkbox label { font-weight: 400; display: inline-flex; align-items: center; }
.frm_forms input[type="file"] { font-family: var(--tf-font); font-size: 0.92rem; }
.frm_forms .frm_error_style,
.frm_forms .frm_error {
  color: #8C2F2F; font-size: 0.86rem; font-weight: 500;
}
.frm_forms .frm_error_style {
  background: #FBEDED; border: 1px solid #DFB1B1; border-radius: 10px;
  padding: 0.95rem 1.15rem; margin-bottom: 1.5rem;
}
.frm_forms .frm_blank_field input,
.frm_forms .frm_blank_field select,
.frm_forms .frm_blank_field textarea { border-color: #B96A6A; }
.frm_forms .frm_message,
.frm_forms .frm_success_style {
  background: var(--tf-green-tint); border: 1px solid var(--tf-green);
  color: var(--tf-green-dark); border-radius: 10px; padding: 1.05rem 1.25rem; font-weight: 500;
}
.frm_forms .cf-turnstile { margin: 0.25rem 0 0.5rem; }
.frm_forms .frm_submit { margin-top: 0.5rem; }
.frm_forms .frm_submit button,
.frm_forms button[type="submit"],
.frm_forms input[type="submit"] {
  font-family: var(--tf-font); font-size: 0.98rem; font-weight: 600;
  background: linear-gradient(180deg, #16395C 0%, var(--tf-navy) 55%, var(--tf-navy-deep) 100%);
  color: #fff; border: 0; border-radius: 10px;
  padding: 1rem 1.8rem; cursor: pointer;
  box-shadow: 0 1px 2px rgba(15,45,74,0.25), 0 10px 22px -10px rgba(15,45,74,0.45);
  transition: transform .18s var(--tf-ease), box-shadow .18s var(--tf-ease);
}
.frm_forms .frm_submit button:hover,
.frm_forms button[type="submit"]:hover,
.frm_forms input[type="submit"]:hover { transform: translateY(-1px); }
.frm_forms .frm_submit button:focus-visible { outline: 3px solid var(--tf-green); outline-offset: 2px; }
/* Multi-step progress */
.frm_forms .frm_rootline .frm_current_page .frm_rootline_title { color: var(--tf-navy); font-weight: 600; }
.frm_forms .frm_page_bar .frm_progress_line { background: var(--tf-gray); }
.frm_forms .frm_page_bar .frm_progress_line .frm_progress_active { background: var(--tf-green); }

/* ==========================================================================
   Utility / misc
   ========================================================================== */
.tf-note {
  background: linear-gradient(180deg, #FBFCFD, var(--tf-panel));
  border: 1px solid var(--tf-gray-soft); border-left: 3px solid var(--tf-green);
  border-radius: 10px; padding: 1.05rem 1.3rem; font-size: 0.93rem; color: var(--tf-text-soft);
  box-shadow: var(--tf-shadow-xs);
}
.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--tf-blue); }
.sticky, .bypostauthor, .gallery-caption { /* WP required classes */ }

/* Reveal on scroll */
.tf-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--tf-ease), transform .7s var(--tf-ease); }
.tf-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .tf-reveal { opacity: 1; transform: none; transition: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
