/* ==========================================================================
   Dynamic pages — built on the existing design tokens
   ========================================================================== */

/* ---------- Page hero ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 46px 0 74px;
  background: var(--ink);
  color: #fff;
}
.page-hero::before {
  content: "";
  position: absolute;
  top: -320px;
  right: -200px;
  width: 760px;
  height: 760px;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 147, 132, .22), rgba(14, 147, 132, 0) 66%);
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: -340px;
  left: -220px;
  width: 700px;
  height: 700px;
  z-index: -2;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 181, 68, .10), rgba(242, 181, 68, 0) 68%);
}
.page-hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 85% 90% at 60% 20%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 90% at 60% 20%, #000 10%, transparent 78%);
}
.page-hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 56px;
}
.page-hero-copy { min-width: 0; }
.page-hero h1 {
  margin: 18px 0 20px;
  color: #fff;
  font-size: clamp(2.1rem, 3.7vw, 3.35rem);
  max-width: 760px;
}
.page-hero h1 .hl { color: var(--red-bright); }
.page-lead {
  max-width: 640px;
  font-size: 1.02rem;
  line-height: 1.72;
  color: rgba(255, 255, 255, .72);
}
.page-points { margin-top: 22px; }
.page-eyebrow { color: var(--red-bright); }

/* breadcrumbs */
.breadcrumbs { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumbs a { color: rgba(255, 255, 255, .68); transition: color .2s ease; }
.breadcrumbs a:hover { color: var(--red-bright); }
.breadcrumbs .sep { color: rgba(255, 255, 255, .28); }
.breadcrumbs [aria-current] { color: rgba(255, 255, 255, .9); }

/* hero side card */
.page-hero-card {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.page-hero-card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 14.5px;
  color: #fff;
}
.page-facts { display: grid; gap: 0; margin-bottom: 16px; }
.page-facts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 12.5px;
}
.page-facts li span { color: rgba(255, 255, 255, .55); }
.page-facts li strong { color: #fff; font-weight: 600; }
.page-hero-card .btn { margin-top: 8px; }
.page-hero-card .btn--ghost { margin-top: 8px; }
.page-hero-card-note {
  margin-top: 10px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .42);
  text-align: center;
}

/* ---------- Generic page head (index pages) ---------- */
.page-head {
  padding: 54px 0 62px;
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  top: -260px;
  right: -160px;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 147, 132, .2), transparent 66%);
}
.page-head .breadcrumbs { margin-bottom: 20px; }
.page-head h1 { color: #fff; margin-bottom: 16px; }
.page-head p { max-width: 680px; color: rgba(255, 255, 255, .7); font-size: 1.02rem; }
.page-head .eyebrow { color: var(--red-bright); margin-bottom: 14px; }

/* ---------- Rich text ---------- */
.prose {
  max-width: 820px;
  font-size: 15.5px;
  line-height: 1.78;
  color: #33474c;
}
.prose > * + * { margin-top: 16px; }
.prose h2 {
  margin-top: 38px;
  margin-bottom: 12px;
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
}
.prose h3 { margin-top: 26px; margin-bottom: 8px; font-size: 1.18rem; }
.prose a { color: var(--red-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--ink); }
.prose ul, .prose ol { padding-left: 22px; list-style: disc; display: block; }
.prose ol { list-style: decimal; }
.prose li { margin: 7px 0; }
.prose blockquote {
  margin: 22px 0;
  padding: 16px 22px;
  border-left: 3px solid var(--red-deep);
  border-radius: 0 12px 12px 0;
  background: var(--cream);
  color: #294248;
  font-size: 15px;
}
.prose img { border-radius: 14px; height: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; }
.prose th { background: #f2f9f7; }
.prose code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef5f3;
  font-size: .9em;
}

.section--tight { padding-top: 64px; padding-bottom: 64px; }

/* ---------- Sub-services ---------- */
.subservice-list {
  display: grid;
  gap: 12px;
  max-width: 1000px;
  margin: 0 auto;
}
.subservice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color .25s ease, transform .25s var(--ease), box-shadow .25s ease;
}
.subservice:hover {
  transform: translateY(-2px);
  border-color: #cfe6e1;
  box-shadow: 0 16px 34px rgba(11, 18, 32, .07);
}
.subservice-main { min-width: 0; }
.subservice h3 { font-size: 15.5px; margin-bottom: 4px; }
.subservice h3 a:hover { color: var(--red-ink); }
.subservice p { font-size: 12.5px; line-height: 1.55; color: var(--muted); max-width: 640px; }
.subservice-side { display: flex; align-items: center; gap: 14px; flex: none; }
.subservice-price {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--red-ink);
  white-space: nowrap;
}

/* feature list */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 26px;
  margin-top: 26px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #33474c;
}
.feature-item .icon { width: 17px; height: 17px; margin-top: 3px; color: var(--red-ink); stroke-width: 2.5; }

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.service-meta strong { color: var(--ink); }

/* ---------- Areas / nearby ---------- */
.area-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  max-width: 940px;
  margin: 0 auto;
}
.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  color: #3b5156;
  box-shadow: var(--shadow-sm);
}
.area-chip .icon { width: 13px; height: 13px; color: var(--red-ink); }
.nearby-cities {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.nearby-cities h3 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.nearby-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.nearby-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  transition: border-color .2s ease, color .2s ease, transform .2s var(--ease);
}
.nearby-links a:hover { border-color: var(--red); color: var(--red-ink); transform: translateY(-2px); }
.nearby-links .icon { width: 12px; height: 12px; }

/* ---------- Location / service index cards ---------- */
.location-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.location-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease;
}
.location-card:hover {
  transform: translateY(-4px);
  border-color: #cfe6e1;
  box-shadow: 0 20px 44px rgba(11, 18, 32, .09);
}
.location-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--red-soft);
  color: var(--red-ink);
}
.location-card-icon .icon { width: 19px; height: 19px; }
.location-card h3 { font-size: 17px; }
.location-card h3 a:hover { color: var(--red-ink); }
.location-card p { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.location-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}
.location-card-foot .service-link { margin-top: 0; }
.location-state {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-light);
}

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: #cfe6e1;
  box-shadow: 0 22px 46px rgba(11, 18, 32, .1);
}
.blog-card-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-3); }
.blog-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.blog-card:hover .blog-card-media img { transform: scale(1.04); }
.blog-card-body { display: flex; flex-direction: column; gap: 9px; padding: 20px; flex: 1; }
.blog-tag {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--red-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red-ink);
}
.blog-card h3 { font-size: 16.5px; line-height: 1.3; }
.blog-card h3 a:hover { color: var(--red-ink); }
.blog-card p { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.blog-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted-light);
}
.blog-card-foot span { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink); }
.blog-card-foot .icon { width: 13px; height: 13px; }

.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}
.blog-filters a {
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: all .2s ease;
}
.blog-filters a:hover { border-color: var(--red); color: var(--red-ink); }
.blog-filters a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* article */
.article { padding: 56px 0 84px; background: #fff; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 54px; align-items: start; }
.article-head { max-width: 820px; margin-bottom: 28px; }
.article-head h1 { font-size: clamp(1.9rem, 3.3vw, 2.75rem); margin: 14px 0 18px; }
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.article-cover { margin: 0 0 30px; border-radius: var(--radius); overflow: hidden; }
.article-cover img { width: 100%; height: auto; }
.article-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 18px; }
.side-card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}
.side-card h3 { font-size: 15px; margin-bottom: 10px; }
.side-card p { font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.side-card .btn { margin-top: 13px; }
.side-list { display: grid; gap: 12px; }
.side-list a { display: block; font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.side-list a:hover { color: var(--red-ink); }
.side-list span { display: block; margin-top: 3px; font-size: 10.5px; color: var(--muted-light); }

/* pagination */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 40px;
}
.pagination a, .pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.pagination a:hover { border-color: var(--red); color: var(--red-ink); }
.pagination .is-current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- CTA band ---------- */
.cta-band { padding-top: 20px; padding-bottom: 80px; }
.cta-band-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 38px 40px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 10%, rgba(20, 184, 166, .22), transparent 60%),
    linear-gradient(145deg, #0e1a2c 0%, #0b1220 100%);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.5vw, 2rem); margin-bottom: 8px; }
.cta-band p { max-width: 560px; font-size: 13.5px; line-height: 1.65; color: rgba(255, 255, 255, .62); }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: none; }

/* ---------- Local / service side card ---------- */
.local-card { max-width: 480px; }
.local-card-body { padding: 18px 0 4px; }
.local-card-body p { font-size: 12.5px; line-height: 1.62; color: var(--muted); }
.local-contact {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid #e7f0ee;
}
.local-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  transition: color .2s ease;
}
.local-contact a:hover { color: var(--red-ink); }
.local-contact .icon { width: 15px; height: 15px; color: var(--red-ink); }
.local-map {
  overflow: hidden;
  margin: 6px -27px -27px;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  background: #eef5f3;
}
.local-map iframe { display: block; width: 100%; height: 240px; border: 0; }
.side-feature-list {
  display: grid;
  gap: 9px;
  margin: 18px 0 4px;
  padding: 0;
}
.side-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #3b5156;
}
.side-feature-list .icon { width: 15px; height: 15px; margin-top: 2px; color: var(--red-ink); stroke-width: 2.5; }
.prose-wrap { max-width: 880px; }

.article-related { margin-top: 52px; padding-top: 34px; border-top: 1px solid var(--line); }
.article-related h2 { font-size: 1.5rem; margin-bottom: 22px; }
.blog-grid--two { grid-template-columns: repeat(2, 1fr); }
.article-page-head .article-meta {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .55);
}

.location-group + .location-group { margin-top: 46px; }
.location-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 1.15rem;
  letter-spacing: -.01em;
}
.location-group-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Forms on dynamic pages ---------- */
.form-error {
  display: none;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 12px 15px;
  border: 1px solid #f1cfcb;
  border-radius: 10px;
  background: #fdf5f4;
  font-size: 12.5px;
  line-height: 1.5;
  color: #93231c;
}
.form-error.is-visible { display: flex; }
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Empty / error ---------- */
.empty-state {
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
}
.empty-state h1 { margin-bottom: 12px; }
.empty-state p { color: var(--muted); }
.error-page { min-height: 60vh; display: grid; place-items: center; padding: 80px 0; text-align: center; }
.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.05em;
  color: var(--red-deep);
  opacity: .18;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .page-hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .page-hero-card { max-width: 520px; }
  .article-layout { grid-template-columns: 1fr; gap: 40px; }
  .article-side { position: static; grid-template-columns: 1fr 1fr; }
  .location-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .page-hero { padding: 34px 0 56px; }
  .page-hero h1 { margin: 14px 0 16px; }
  .subservice { flex-direction: column; align-items: flex-start; gap: 12px; }
  .subservice-side { width: 100%; justify-content: space-between; }
  .feature-grid { grid-template-columns: 1fr; }
  .cta-band-inner { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .article-side { grid-template-columns: 1fr; }
  .blog-filters { gap: 6px; }
}
@media (max-width: 620px) {
  .location-grid, .blog-grid { grid-template-columns: 1fr; }
  .page-hero-card { padding: 18px; }
  .page-hero-card .btn { font-size: 13px; }
}
