/* fix.css — central override layer */
/* Bump ?v=N in HTML when changes are made here */

/* === New brand logo image styling (replaces text-based brand mark) === */
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand__logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
}
.brand--footer .brand__logo {
  height: 56px;
}
@media (max-width: 600px) {
  .brand__logo { height: 44px; }
}

/* === Footer legal / ADA block === */
.footer__legal {
  margin-top: 1rem;
  padding: 1.5rem 0 1.5rem;
  border-top: 1px solid rgba(248, 244, 237, 0.1);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(248, 244, 237, 0.7);
}
.footer__legal p { margin: 0 0 1rem; }
.footer__legal p:last-child { margin: 0; }
.footer__legal a {
  color: var(--sage);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__legal a:hover { color: var(--cream); }
.footer__disclaimer {
  font-size: 0.75rem !important;
  color: rgba(248, 244, 237, 0.5) !important;
  font-style: italic;
}


.shak-mark {
  display: inline-block;
  width: 21px;
  height: 18px;
  background-color: var(--sage);
  -webkit-mask: url('/assets/img/shak-icon.png') center / contain no-repeat;
          mask: url('/assets/img/shak-icon.png') center / contain no-repeat;
  transition: background-color 0.15s ease, transform 0.15s ease;
  vertical-align: -4px;
  margin-left: 4px;
}
.swg-link:hover .shak-mark {
  background-color: var(--sage-deep);
  transform: scale(1.05);
}
.footer__bar {
  font-size: 0.8125rem;
}

/* === SWG icon footer credit (tinted PNG, axispaingroup pattern) === */
/* === Sticky topbar + header stack === */
.topbar {
  position: sticky;
  top: 0;
  z-index: 99;
  /* preserve existing styles from style.css */
}
.header {
  position: sticky;
  top: var(--topbar-height, 44px);
  z-index: 100;
}
/* Mobile: topbar may wrap/be taller, override */
@media (max-width: 768px) {
  .header { top: 0; } /* topbar will scroll away on small screens */
  .topbar { position: relative; } /* avoid double stacking */
}

/* === Footer privacy-links row === */
.footer__privacy-links {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8125rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.footer__privacy-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer__privacy-links a:hover { color: #fff; }
.footer__privacy-links span { color: rgba(255,255,255,0.4); }
@media (max-width: 600px) {
  .footer__privacy-links { flex-direction: column; gap: 6px; align-items: flex-start; }
  .footer__privacy-links span { display: none; }
}

/* === Services landing page hero (visual split) === */
.page-hero--visual {
  background: linear-gradient(to bottom, var(--cream) 0%, var(--bg) 100%);
  padding: 5rem 0 4rem;
}
.page-hero--visual h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.05;
  margin: 0.5rem 0 1rem;
}
.page-hero--visual .lead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.page-hero__visual {
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(31, 58, 46, 0.18), 0 4px 12px rgba(31, 58, 46, 0.08);
}
.page-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 860px) {
  .page-hero--visual .grid-2 { grid-template-columns: 1fr !important; gap: 2.5rem !important; }
  .page-hero__visual { aspect-ratio: 4/3; }
}

/* === Service category accent images === */
.service-accent {
  margin-top: 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 12px 32px rgba(31, 58, 46, 0.12), 0 2px 8px rgba(31, 58, 46, 0.06);
}
.service-accent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.service-accent:hover img {
  transform: scale(1.03);
}

/* === Blog === */
.blog-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 28px; margin-top: 16px; }
.blog-card {
  background: var(--cream, #F8F4ED);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.blog-card__link { display: block; color: inherit; text-decoration: none; }
.blog-card__image { aspect-ratio: 16/10; overflow: hidden; }
.blog-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.blog-card:hover .blog-card__image img { transform: scale(1.04); }
.blog-card__body { padding: 22px 24px 26px; }
.blog-card__meta { font-size: 0.8125rem; color: var(--muted, #666); margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.blog-card__title { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.3; }
.blog-card__excerpt { margin: 0 0 14px; font-size: 0.95rem; line-height: 1.55; color: var(--text, #1a1a1a); }
.blog-card__cta { font-weight: 600; color: var(--forest, #1F3A2E); font-size: 0.9rem; }
.blog-list__more { margin-top: 28px; text-align: center; font-size: 0.875rem; }
.blog-list__more a { color: var(--text, #1a1a1a); text-decoration: underline; }

/* Blog post page */
.blog-post__head { padding: 56px 0 24px; }
.blog-post__head h1 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 0.5em 0 0.3em; }
.blog-post__byline { font-size: 0.95rem; color: var(--muted, #666); margin: 0; }
.blog-post__hero { margin: 0 0 32px; }
.blog-post__hero img { width: 100%; height: auto; border-radius: 14px; display: block; }
.blog-post__body { padding-bottom: 56px; line-height: 1.7; }
.blog-post__body h2 { margin-top: 1.75em; margin-bottom: 0.5em; font-size: 1.4rem; }
.blog-post__body p { margin: 0 0 1.1em; }
.blog-post__body ul { margin: 0 0 1.3em; padding-left: 1.4em; }
.blog-post__body li { margin: 0 0 0.4em; }
.blog-post__body a { color: var(--forest, #1F3A2E); text-decoration: underline; text-underline-offset: 2px; }
.blog-post__back { margin: 3em 0 0; padding-top: 1.5em; border-top: 1px solid var(--line, #e5e5e5); }
.blog-post__back a { font-weight: 500; }


/* SWG icon footer credit — size and visibility */
.footer-shak {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  text-decoration: none;
  line-height: 0;
  opacity: 0.85;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.footer-shak:hover {
  opacity: 1;
  transform: scale(1.08);
}
.footer-shak img {
  height: 32px;
  width: auto;
  display: block;
}
/* Footer bar uses gap for spacing instead of "Powered by" text */
.footer__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* === Topbar accessibility entry point === */
.topbar-a11y {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--cream, #F8F4ED);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  margin-right: 12px;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.topbar-a11y svg { fill: currentColor; flex-shrink: 0; }
.topbar-a11y:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); }
.topbar-a11y:focus-visible { outline: 2px solid var(--cream, #fff); outline-offset: 2px; }
@media (max-width: 600px) {
  .topbar-a11y span { display: none; }
  .topbar-a11y { padding: 4px 6px; margin-right: 6px; }
}

/* === Force-override sticky topbar (higher specificity to beat style.css) === */
body .topbar {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 99;
}
body .header {
  position: -webkit-sticky;
  position: sticky;
  top: var(--topbar-h, 44px);
  z-index: 100;
}
@media (max-width: 768px) {
  body .header { top: 0; }
  body .topbar { position: relative; top: auto; }
}

/* === Make a11y widget button bigger + more prominent === */
.a11y-widget .a11y-toggle {
  width: 58px;
  height: 58px;
}
.a11y-widget .a11y-toggle svg {
  width: 32px;
  height: 32px;
}


/* === Social icons in header (next to CTA) === */
@media (max-width: 1000px) {
  }

/* === Services HUB page — card grid === */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 2rem;
}
.svc-card {
  display: flex;
  flex-direction: column;
  background: var(--cream, var(--sand, #f8f4ed));
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.10), 0 4px 14px rgba(0,0,0,0.04);
}
.svc-card__image {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.svc-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.svc-card:hover .svc-card__image img {
  transform: scale(1.06);
}
.svc-card__body {
  padding: 1.5rem 1.5rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.svc-card__eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-deep, var(--sky-deep, #6FA47F));
  margin: 0 0 0.5rem;
}
.svc-card__title {
  font-size: 1.4rem;
  margin: 0 0 0.5rem;
  line-height: 1.15;
}
.svc-card__desc {
  font-size: 0.95rem;
  color: var(--ink-soft, #4a5a4f);
  line-height: 1.55;
  margin: 0 0 1rem;
}
.svc-card__cta {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--forest, var(--teal, #1F3A2E));
}

/* === Service DETAIL page === */
.svc-detail-hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 4rem;
  padding: 5rem 0 4rem;
}
.svc-detail-hero__image {
  aspect-ratio: 4/3;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0,0,0,0.15);
  order: 2;
}
.svc-detail-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.svc-detail-hero__text { order: 1; }
.svc-detail-hero__text h1 {
  font-size: clamp(2.3rem, 4.4vw, 3.6rem);
  line-height: 1.05;
  margin: 0.5rem 0 1rem;
}
.svc-detail-hero__text .lead {
  font-size: 1.15rem;
  color: var(--ink-soft, #4a5a4f);
  line-height: 1.6;
  margin: 0 0 1.5rem;
}
.svc-detail-hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
@media (max-width: 900px) {
  .svc-detail-hero {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 3rem 0 2rem;
  }
  .svc-detail-hero__image { order: -1; }
}

/* Detail page sub-sections */
.svc-detail-section { padding: 4rem 0; }
.svc-detail-section--alt { background: var(--cream, var(--sand, #f8f4ed)); }
.svc-detail-includes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.svc-includes-item {
  padding: 1.25rem 1.5rem;
  background: white;
  border-radius: 12px;
  border-left: 3px solid var(--sage, var(--sky, #89B898));
}
.svc-includes-item h4 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.3;
}
.svc-includes-item p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft, #4a5a4f);
  line-height: 1.55;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
  counter-reset: step;
}
.process-step {
  counter-increment: step;
  position: relative;
  padding-top: 3rem;
}
.process-step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 2rem;
  font-weight: 700;
  color: var(--sage, var(--sky, #89B898));
  font-family: var(--font-display, Georgia, serif);
  opacity: 0.45;
}
.process-step h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.process-step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft, #4a5a4f);
  line-height: 1.55;
}

/* === About page Wilmington gallery === */
.about-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}
.about-gallery__item {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 12px 36px rgba(0,0,0,0.10);
}
.about-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.about-gallery__item:hover img { transform: scale(1.04); }
.about-gallery__item--feature {
  grid-column: span 2;
  aspect-ratio: 16/9;
}
@media (max-width: 700px) {
  .about-gallery__item--feature { grid-column: auto; aspect-ratio: 4/3; }
}


/* === Services grid (hub cards) === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
  margin: 0;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 28px rgba(31, 58, 46, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 48px rgba(31, 58, 46, 0.16);
}
.service-card__image {
  aspect-ratio: 3/2;
  overflow: hidden;
}
.service-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.service-card:hover .service-card__image img { transform: scale(1.05); }
.service-card__body { padding: 1.5rem 1.5rem 1.75rem; flex: 1; display: flex; flex-direction: column; }
.service-card__body h3 { font-size: 1.4rem; margin: 0.4rem 0 0.65rem; line-height: 1.15; }
.service-card__body p { margin: 0 0 1rem; color: var(--ink-soft); flex: 1; font-size: 0.95rem; line-height: 1.55; }
.service-card__cta { font-weight: 600; color: var(--forest); font-size: 0.95rem; }

/* === Breadcrumb === */
.breadcrumb {
  background: var(--cream);
  padding: 1rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(31, 58, 46, 0.08);
}
.breadcrumb ol { list-style: none; padding: 0; margin: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; color: var(--ink-soft); }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: 0.5rem; opacity: 0.5; }
.breadcrumb a { color: var(--forest); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* === Service detail page hero === */
.service-hero { padding: 4rem 0 3.5rem; background: linear-gradient(to bottom, var(--cream) 0%, var(--bg) 100%); }
.service-hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 3rem; align-items: center; }
.service-hero__text h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin: 0.5rem 0 1rem; }
.service-hero__text .lead { font-size: 1.125rem; line-height: 1.55; color: var(--ink-soft); }
.service-hero__cta { margin-top: 1.75rem; display: flex; gap: 0.85rem; flex-wrap: wrap; }
.service-hero__visual {
  aspect-ratio: 4/3;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(31, 58, 46, 0.18);
}
.service-hero__visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .service-hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-hero__visual { aspect-ratio: 4/3; }
}

/* === Service blocks (alternating text/image rows) === */
.service-block { padding: 4rem 0; }
.service-block--alt { background: var(--cream); }
.service-block__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.service-block__text h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 1rem; line-height: 1.1; }
.service-block__text p { margin: 0 0 1rem; color: var(--ink); line-height: 1.65; }
.service-block__text p:last-of-type { margin-bottom: 0; }
.service-block__list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.55rem; }
.service-block__list li { padding-left: 1.6rem; position: relative; color: var(--ink-soft); line-height: 1.5; }
.service-block__list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--sage-deep);
  font-weight: 700;
}
.service-block__visual {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 16px 40px rgba(31, 58, 46, 0.14);
}
.service-block__visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  .service-block__grid { grid-template-columns: 1fr; gap: 2rem; }
  .service-block { padding: 3rem 0; }
}

/* === FAQ accordion === */
.faq-list { margin: 2rem 0 0; display: grid; gap: 0.75rem; }
.faq-item {
  background: var(--bg);
  border: 1px solid rgba(31, 58, 46, 0.1);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  transition: border-color 0.2s ease;
}
.faq-item[open] { border-color: var(--sage); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--forest);
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0.85rem 0 0; color: var(--ink-soft); line-height: 1.6; }

/* === Related pills === */
.related-pills { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1rem; }
.related-pill {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  background: var(--cream);
  border-radius: 999px;
  color: var(--forest);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.18s ease;
}
.related-pill:hover { background: var(--sage); color: white; transform: translateY(-2px); }



/* === Header social icons (FB/IG/Yelp inline next to nav) === */
.header__social {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 18px;
}
.header__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--forest);
  background: var(--cream);
  border: 1px solid rgba(31, 58, 46, 0.12);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.header__social a:hover {
  background: var(--forest);
  color: var(--cream);
  border-color: var(--forest);
  transform: translateY(-1px);
}
.header__social svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
@media (max-width: 980px) {
  .header__social { display: none; }
}

/* === Footer social — keep parity with header (filled style, light on dark) === */
.footer__social {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--forest);
  background: var(--cream);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.footer__social a:hover {
  background: var(--sage);
  color: var(--forest);
  transform: translateY(-1px);
}
.footer__social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}


/* === v4: Per-service landing page + hub grid + about gallery === */

/* Service hero (used on services.html + per-service pages) */
.service-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.service-hero__text .breadcrumb-back {
  display: inline-block;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  text-decoration: none;
}
.service-hero__text .breadcrumb-back:hover { color: var(--ACCENT); text-decoration: underline; }
.service-hero__text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  margin: 0.4rem 0 1rem;
}
.service-hero__text .lead { font-size: 1.125rem; color: var(--ink-soft); }
.service-hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.service-hero__visual {
  aspect-ratio: 4/5;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(31, 58, 46, 0.18), 0 4px 12px rgba(31, 58, 46, 0.08);
  position: relative;
}
.service-hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: linear-gradient(135deg, transparent 60%, rgba(31, 58, 46, 0.08));
  pointer-events: none;
}
.service-hero__visual img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.service-hero__visual:hover img { transform: scale(1.03); }
@media (max-width: 860px) {
  .service-hero { grid-template-columns: 1fr; gap: 2rem; }
  .service-hero__visual { aspect-ratio: 4/3; }
}

/* Hub grid (services.html) */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 28px;
}
.svc-card {
  display: block;
  background: var(--BG-CARD);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.svc-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
}
.svc-card__media {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}
.svc-card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.svc-card:hover .svc-card__media img { transform: scale(1.05); }
.svc-card__body { padding: 1.25rem 1.4rem 1.5rem; }
.svc-card__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ACCENT);
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.svc-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  line-height: 1.25;
}
.svc-card__desc {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.svc-card__cta {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ACCENT);
}

/* Service body: 2-col with checklist + process aside */
.service-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3.5rem;
  align-items: start;
}
.service-body h2 { margin: 0 0 1.25rem; font-size: 1.75rem; }
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 1.05rem;
}
.check-list li {
  padding-left: 1.75rem;
  position: relative;
  color: var(--ink);
  line-height: 1.55;
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ACCENT);
  font-weight: 700;
}
.service-body__aside {
  background: var(--BG-ASIDE);
  border-radius: 16px;
  padding: 2rem 1.75rem;
}
.service-body__aside h3 { margin: 0 0 1.25rem; font-size: 1.2rem; }
.process-grid { display: grid; gap: 1.25rem; }
.process-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.85rem;
  align-items: start;
}
.process-step__num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ACCENT);
  color: var(--BG-CARD);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  grid-row: span 2;
}
.process-step h3 { margin: 0; font-size: 1rem; }
.process-step p { margin: 0.25rem 0 0; font-size: 0.92rem; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 900px) {
  .service-body { grid-template-columns: 1fr; gap: 2rem; }
}

/* FAQ list */
.faq-list { display: grid; gap: 0.5rem; margin-top: 1.5rem; }
.faq-item {
  background: var(--BG-CARD);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  padding-right: 1.5rem;
  position: relative;
  font-size: 1.02rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--ACCENT);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0.85rem 0 0; color: var(--ink-soft); line-height: 1.6; }

/* Related services cards */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.related-card {
  display: flex;
  flex-direction: column;
  background: var(--BG-CARD);
  border-radius: 12px;
  padding: 1.4rem 1.3rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.related-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.related-card__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ACCENT);
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.related-card__title {
  font-size: 1.15rem;
  font-weight: 600;
}

/* About gallery (famdent Wilmington photos) */
.about-gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}
.about-gallery__item {
  margin: 0;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  grid-column: span 2;
  grid-row: span 1;
  background: var(--BG-CARD);
}
.about-gallery__item--lg { grid-column: span 3; grid-row: span 2; }
.about-gallery__item--wide { grid-column: span 4; }
.about-gallery__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.5s ease;
}
.about-gallery__item:hover img { transform: scale(1.04); }
.about-gallery__item figcaption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  padding: 1.5rem 1rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.35;
}
@media (max-width: 800px) {
  .about-gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
  .about-gallery__item, .about-gallery__item--lg, .about-gallery__item--wide {
    grid-column: span 2; grid-row: span 1;
  }
}

/* Section title spacing */
.section__title { margin: 0 0 2rem; font-size: clamp(1.6rem, 3vw, 2.2rem); }

/* Service-page colour bindings (Lennox) */
.page-hero--visual, .service-hero { --ACCENT: var(--sage-deep, #6FA47F); --BG-CARD: var(--cream, #F8F4ED); --BG-ASIDE: var(--cream, #F8F4ED); }
.svc-card, .related-card, .faq-item { --ACCENT: var(--sage-deep, #6FA47F); --BG-CARD: var(--cream, #F8F4ED); }
.about-gallery, .about-gallery__item { --BG-CARD: var(--cream, #F8F4ED); }
.process-step__num { color: var(--cream, #F8F4ED); }

/* ============================================================
   v7 — Service card overlay redesign (fintech-modern)
   Text overlaid on image with dark gradient for legibility.
   Replaces flat image-then-text layout. Works for both
   .svc-card__media and legacy .svc-card__image markup.
   ============================================================ */

.svc-card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  background: #1a2b22;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05);
  transition:
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  isolation: isolate;
  /* kill all prior flex/padding/background from earlier rules */
  padding: 0;
  flex-direction: row;
  background-clip: padding-box;
}

.svc-card:hover,
.svc-card:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.20),
    0 8px 22px rgba(0, 0, 0, 0.10);
}

.svc-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.7);
  outline-offset: 4px;
}

/* media layer — covers the whole card */
.svc-card__media,
.svc-card__image {
  position: absolute;
  inset: 0;
  z-index: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border-radius: 0;
}

.svc-card__media img,
.svc-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: saturate(0.95) brightness(0.92);
}

.svc-card:hover .svc-card__media img,
.svc-card:hover .svc-card__image img {
  transform: scale(1.07);
}

/* legibility gradient — top:light, bottom:heavy */
.svc-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(12, 22, 17, 0.05) 0%,
    rgba(12, 22, 17, 0.15) 38%,
    rgba(12, 22, 17, 0.62) 70%,
    rgba(12, 22, 17, 0.92) 100%
  );
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.svc-card:hover::before {
  background: linear-gradient(
    180deg,
    rgba(12, 22, 17, 0.10) 0%,
    rgba(12, 22, 17, 0.28) 38%,
    rgba(12, 22, 17, 0.74) 70%,
    rgba(12, 22, 17, 0.96) 100%
  );
}

/* body — bottom-aligned, padding cleared from old rules */
.svc-card__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem 1.625rem 1.5rem;
  color: #fff;
  background: transparent;
}

/* eyebrow chip — floats top-left as a frosted pill */
.svc-card__eyebrow {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin: 0;
  line-height: 1;
}

.svc-card__title {
  font-size: 1.5rem;
  line-height: 1.12;
  margin: 0 0 0.55rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.svc-card__desc {
  font-size: 0.93rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 1.1rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.svc-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
  letter-spacing: 0.01em;
  transition: gap 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  margin-top: auto;
}

.svc-card:hover .svc-card__cta {
  gap: 0.8rem;
}

/* grid tightening — fewer columns for taller cards */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 0;
}

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .svc-card {
    aspect-ratio: 5 / 6;
  }
  .svc-card__title {
    font-size: 1.3rem;
  }
}

/* ============================================================
   v7 — Home page service cards converted to overlay format.
   .service class becomes inline alias of .svc-card when nested
   inside .services-grid. Backwards-compatible.
   ============================================================ */

/* if .service block still uses icon-only layout (no link wrapper),
   leave it. Only the .svc-card class triggers the new overlay. */

/* end v7 */

/* ============================================================
   v8 — Service card gradient panels (no fake photos)
   Per Shak's rule: never use images we can't prove are us.
   Cards now use CSS gradient backgrounds + decorative tooth
   icon. Same overlay typography from v7 still applies on top.
   ============================================================ */

/* Decorative tooth-icon background (single re-used SVG, low opacity) */
.svc-card__media,
.svc-card__media--general,
.svc-card__media--cosmetic,
.svc-card__media--implants,
.svc-card__media--pediatric,
.svc-card__media--emergency,
.svc-card__media--emergencies,
.svc-card__media--ortho,
.svc-card__media--orthodontics,
.svc-card__media--surgery,
.svc-card__media--restorative {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.10)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: 50% 22%;
  background-size: 42%;
}

/* General — forest/sage gradient */
.svc-card__media--general {
  background-color: #1f3a2e;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.12)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #2d5a45 0%, #1f3a2e 55%, #14271f 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* Cosmetic — blush/rose gradient */
.svc-card__media--cosmetic {
  background-color: #8b3a52;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.14)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #c66a82 0%, #8b3a52 55%, #4d1f2c 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* Implants — teal gradient */
.svc-card__media--implants {
  background-color: #0e6477;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.13)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #2a99af 0%, #0e6477 55%, #073744 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* Pediatric — amber/gold gradient */
.svc-card__media--pediatric {
  background-color: #b86b1a;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.14)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #e69f4f 0%, #b86b1a 55%, #6a3c0e 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* Emergencies — coral/red gradient */
.svc-card__media--emergency,
.svc-card__media--emergencies {
  background-color: #a23a3a;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.14)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #d96a55 0%, #a23a3a 55%, #5a1c1c 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* Orthodontics — indigo/violet gradient */
.svc-card__media--ortho,
.svc-card__media--orthodontics {
  background-color: #463c8a;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.13)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #6e62b8 0%, #463c8a 55%, #25204e 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* Oral Surgery — navy/steel gradient */
.svc-card__media--surgery,
.svc-card__media--oral-surgery {
  background-color: #28384e;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.12)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #4d6585 0%, #28384e 55%, #131c2a 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* Restorative — bronze/amber-deep gradient (fallback) */
.svc-card__media--restorative {
  background-color: #7d4520;
  background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.13)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>"),
    linear-gradient(135deg, #b06d3a 0%, #7d4520 55%, #432311 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: 50% 22%, 0 0;
  background-size: 42%, cover;
}

/* The dark legibility gradient (svc-card::before) still layers on top.
   Soften it slightly since the panels already darken downward. */
.svc-card::before {
  background: linear-gradient(
    180deg,
    rgba(12, 22, 17, 0.00) 0%,
    rgba(12, 22, 17, 0.08) 38%,
    rgba(12, 22, 17, 0.55) 72%,
    rgba(12, 22, 17, 0.90) 100%
  ) !important;
}
.svc-card:hover::before {
  background: linear-gradient(
    180deg,
    rgba(12, 22, 17, 0.04) 0%,
    rgba(12, 22, 17, 0.18) 38%,
    rgba(12, 22, 17, 0.66) 72%,
    rgba(12, 22, 17, 0.94) 100%
  ) !important;
}

/* ============================================================
   v8 — Hero refactor: drop image, single-column text hero
   ============================================================ */
.hero__grid {
  grid-template-columns: 1fr !important;
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
}
.hero__copy {
  max-width: 100%;
}
/* v13: removed v8 .hero__visual + .hero__floating { display:none !important }
   — both heroes are now intentional and require display block/flex */
/* ============================================================
   v8 — Service detail hero: image-free, full-width copy
   ============================================================ */
.service-hero__grid {
  grid-template-columns: 1fr !important;
  max-width: 880px;
  margin: 0 auto;
}
.service-hero__visual {
  display: none !important;
}

/* ============================================================
   v8 — Blog post hero: compact, no image
   Older blog markup used a full-width <img> tag below the
   header. With it stripped, the spacing tightens automatically.
   ============================================================ */
.blog-post__hero img,
.blog-card__image {
  display: none;
}
.blog-card {
  /* recompose card without image rail */
  padding: 1.5rem 1.5rem 1.75rem;
}

/* end v8 */

/* ============================================================
   v9 — Restore 2-col Lennox hero with CSS gradient panel
   (overrides v8 single-col hero override above)
   ============================================================ */

/* Restore 2-col grid on Lennox hero. Use .hero alone as a selector
   for higher specificity vs the bare .hero__grid override in v8. */
.hero .hero__grid {
  grid-template-columns: 1.05fr 0.95fr !important;
  max-width: none;
  margin: 0;
  text-align: left;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

/* Stop hiding .hero__visual when the modifier --gradient is present. */
.hero__visual.hero__visual--gradient {
  display: block !important;
  position: relative !important;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow:
    0 24px 60px rgba(31, 58, 46, 0.15),
    0 4px 14px rgba(31, 58, 46, 0.06);
}

.hero__visual.hero__visual--gradient .hero__visual-inner {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 25%, rgba(255,255,255,0.25), transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(212, 162, 76, 0.20), transparent 60%),
    linear-gradient(135deg, #4a7a5e 0%, #2d5a45 45%, #1f3a2e 100%);
}

/* Subtle tooth-motif overlay so the panel reads as "dental" not abstract */
.hero__visual.hero__visual--gradient .hero__visual-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='rgba(255,255,255,0.08)'><path d='M16 2c-1.9 0-3.5.6-4 1.5C11.5 2.6 9.9 2 8 2 4.7 2 2 4.7 2 8c0 2.4.8 4.6 2 6.4l3 7.6c.1.3.4.5.7.5h.6c.3 0 .5-.2.7-.4l1.6-3.4c.4-.9 1.5-.9 1.9 0l1.6 3.4c.1.3.4.4.7.4h.6c.3 0 .6-.2.7-.5l3-7.6C21.2 12.6 22 10.4 22 8c0-3.3-2.7-6-6-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: 50% 45%;
  background-size: 55%;
}

/* Show the floating "33 years" badge again — but anchor cleanly */
.hero__visual.hero__visual--gradient .hero__floating {
  display: flex !important;
  position: absolute;
  bottom: -22px;
  left: -22px;
  background: var(--white, #ffffff);
  padding: 1rem 1.25rem;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  align-items: center;
  gap: 0.75rem;
  z-index: 2;
  max-width: 200px;
}
.hero__visual.hero__visual--gradient .hero__floating-num {
  font-family: var(--font-display, Georgia, serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--forest-deep, #1f3a2e);
  line-height: 1;
}
.hero__visual.hero__visual--gradient .hero__floating-text {
  font-size: 0.8125rem;
  color: var(--ink-soft, #555);
  line-height: 1.3;
}

/* Collapse to single column on mobile */
@media (max-width: 900px) {
  .hero .hero__grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .hero__visual.hero__visual--gradient {
    aspect-ratio: 16/10;
    max-width: 100%;
  }
  .hero__visual.hero__visual--gradient .hero__floating {
    left: 1rem;
    bottom: 1rem;
  }
}

/* ============================================================
   v9 — Simplify .hero__heritage badge (dot pattern, no stacked
   circle). Matches Famdent's hero badge convention.
   ============================================================ */
.hero__heritage {
  display: inline-flex !important;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(45, 90, 69, 0.15);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--forest, #2d5a45);
  box-shadow: 0 2px 8px rgba(31, 58, 46, 0.06);
  margin-bottom: 1.25rem;
  line-height: 1;
}

.hero__heritage .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--sage, #88a890);
  box-shadow: 0 0 0 3px rgba(136, 168, 144, 0.25);
  flex-shrink: 0;
}

/* Force-hide the legacy stacked circle if any survives in cache */
.hero__heritage-badge { display: none !important; }

/* ============================================================
   v9 — Collapse empty grid-2 cells to single column when only
   one .fade-in child remains
   ============================================================ */
.grid.grid-2:has(> .fade-in:only-child) {
  grid-template-columns: 1fr !important;
  max-width: 720px;
  margin: 0 auto;
}

/* Fallback for browsers without :has() — universal max-width on grid-2
   children to keep them readable when alone */
.grid.grid-2 > .fade-in:only-child {
  max-width: 720px;
  margin: 0 auto;
}

/* end v9 */

/* ============================================================
   v10 — Restore svc-card photo media + services-hero image
   Reverses v8's display:none on .service-hero__visual.
   ============================================================ */

/* services hub: show the hero image again, full bleed inside the panel */
.service-hero__grid {
  grid-template-columns: 1.05fr 0.95fr !important;
  max-width: none;
  margin: 0;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}
.service-hero__visual {
  display: block !important;
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 5/4;
  box-shadow:
    0 24px 60px rgba(31, 58, 46, 0.15),
    0 4px 14px rgba(31, 58, 46, 0.06);
  background: var(--cream-warm, #F1EADE);
}
.service-hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}
.service-hero__visual:hover img { transform: scale(1.03); }

/* Subtle warm tint overlay so the photo feels editorial */
.service-hero__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(31, 58, 46, 0.0) 0%,
    rgba(31, 58, 46, 0.04) 60%,
    rgba(31, 58, 46, 0.10) 100%
  );
  pointer-events: none;
}

/* svc-card photo media — image variant overrides the gradient variant */
.svc-card__media:has(> img) {
  background: var(--cream-warm, #F1EADE) !important;
  aspect-ratio: 4/3;
}
.svc-card__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.svc-card:hover .svc-card__media > img { transform: scale(1.04); }

/* Collapse to single column on mobile */
@media (max-width: 900px) {
  .service-hero__grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  .service-hero__visual {
    aspect-ratio: 16/10;
    max-width: 100%;
  }
}

/* end v10 */

/* ============================================================
   v11 — Real hero image + two-tone tab heritage badge
   ============================================================ */

/* Hero visual: real photographic panel
   Overrides v9 .hero__visual--gradient (which is no longer in markup). */
.hero .hero__grid .hero__visual {
  position: relative;
  display: block;
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--cream-warm, #F1EADE);
  box-shadow:
    0 24px 60px rgba(31, 58, 46, 0.18),
    0 6px 18px rgba(31, 58, 46, 0.08);
}
.hero .hero__grid .hero__visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(.2,.7,.2,1);
}
.hero .hero__grid .hero__visual:hover > img { transform: scale(1.025); }

/* Floating "33 years" badge — INSIDE the panel, no clipping */
.hero__visual > .hero__floating {
  position: absolute;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.96);
  -webkit-backdrop-filter: saturate(140%);
  backdrop-filter: saturate(140%);
  padding: 12px 16px 12px 14px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 40, 34, 0.18);
  max-width: 230px;
  z-index: 2;
}
.hero__visual > .hero__floating .hero__floating-num {
  font-family: var(--font-display, Georgia, serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--forest-deep, #142822);
  line-height: 1;
}
.hero__visual > .hero__floating .hero__floating-text {
  font-size: 0.8125rem;
  color: var(--ink-soft, #3D3D3D);
  line-height: 1.25;
  font-weight: 500;
}

/* Force-hide any v9 gradient panel rules that might cascade through */
.hero__visual--gradient { /* legacy, no-op */ }

/* ---------- Two-tone tab heritage badge (Option B) ---------- */
.hero__heritage.hero__heritage--tab {
  display: inline-flex !important;
  align-items: stretch;
  padding: 0;
  background: #ffffff;
  border: 1px solid rgba(31, 58, 46, 0.18);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(31, 58, 46, 0.06);
}
.hero__heritage--tab .hero__heritage-est {
  background: var(--forest, #1F3A2E);
  color: var(--cream-warm, #F1EADE);
  padding: 9px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1;
}
.hero__heritage--tab .hero__heritage-est-label {
  font-family: var(--font-display, Georgia, serif);
  font-size: 0.5rem;
  letter-spacing: 0.22em;
  color: var(--sage, #89B898);
  text-transform: uppercase;
}
.hero__heritage--tab .hero__heritage-est-year {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.hero__heritage--tab .hero__heritage-text {
  padding: 9px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  line-height: 1.2;
}
.hero__heritage--tab .hero__heritage-headline {
  font-family: var(--font-display, Georgia, serif);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--forest, #1F3A2E);
}
.hero__heritage--tab .hero__heritage-sub {
  font-family: var(--font-display, Georgia, serif);
  font-size: 0.75rem;
  font-style: italic;
  color: var(--forest-soft, #2D5040);
}

/* Suppress legacy .dot child if any survives in old caches */
.hero__heritage--tab .dot { display: none !important; }

/* Mobile: badge sits inside, smaller scale */
@media (max-width: 900px) {
  .hero .hero__grid .hero__visual {
    aspect-ratio: 4/3;
    max-width: 100%;
  }
  .hero__visual > .hero__floating {
    bottom: 14px;
    left: 14px;
    padding: 10px 14px;
    max-width: 60%;
  }
  .hero__visual > .hero__floating .hero__floating-num {
    font-size: 1.7rem;
  }
}

/* end v11 */

/* ============================================================
   v12 — Two-tier service cards (kills v7 overlay design)
   Image on top, body below in clean white surface.
   No text-over-image, no dark gradient slab.
   ============================================================ */

.svc-card {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  aspect-ratio: auto !important;
  background: var(--white, #ffffff) !important;
  color: var(--ink, #1A1A1A) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  border: 1px solid rgba(31, 58, 46, 0.10);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  isolation: isolate;
  transition: transform 0.3s cubic-bezier(0.2,0.7,0.2,1),
              box-shadow 0.3s cubic-bezier(0.2,0.7,0.2,1);
}
.svc-card:hover,
.svc-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(31, 58, 46, 0.12),
              0 4px 12px rgba(31, 58, 46, 0.06);
}

/* Kill v7 dark gradient overlay completely */
.svc-card::before { content: none !important; background: none !important; }
.svc-card:hover::before { content: none !important; background: none !important; }

/* Media block — top of card, real aspect ratio, no absolute positioning */
.svc-card__media,
.svc-card__image {
  position: relative !important;
  inset: auto !important;
  aspect-ratio: 4/3 !important;
  width: 100%;
  height: auto !important;
  overflow: hidden;
  z-index: 0;
  background: var(--cream-warm, #F1EADE);
  border-radius: 0 !important;
}
.svc-card__media > img,
.svc-card__image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: none !important;
  transition: transform 0.5s ease;
}
.svc-card:hover .svc-card__media > img,
.svc-card:hover .svc-card__image > img {
  transform: scale(1.04);
}

/* Body — solid white surface beneath the image */
.svc-card__body {
  position: static !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding: 1.4rem 1.4rem 1.5rem !important;
  background: transparent !important;
  color: var(--ink, #1A1A1A) !important;
  flex: 1;
  gap: 0;
}

/* Eyebrow — small caps text label, NOT an overlay chip */
.svc-card__eyebrow {
  position: static !important;
  top: auto !important;
  left: auto !important;
  display: inline-block !important;
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  color: var(--sage-deep, var(--sky-deep, #6FA47F)) !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 0 !important;
  margin: 0 0 0.4rem !important;
  text-shadow: none !important;
}

.svc-card__title {
  font-family: var(--font-display, Georgia, "Palatino Linotype", serif);
  font-size: 1.35rem !important;
  font-weight: 600 !important;
  color: var(--forest, var(--teal, #1F3A2E)) !important;
  margin: 0 0 0.45rem !important;
  line-height: 1.2 !important;
  letter-spacing: -0.005em !important;
  text-shadow: none !important;
}

.svc-card__desc {
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  color: var(--ink-soft, #3D3D3D) !important;
  margin: 0 0 1rem !important;
  text-shadow: none !important;
  flex: 1;
}

.svc-card__cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  color: var(--forest, var(--teal, #1F3A2E)) !important;
  text-shadow: none !important;
  margin-top: auto !important;
  transition: gap 0.25s ease, color 0.25s ease;
}
.svc-card:hover .svc-card__cta,
.svc-card:focus-visible .svc-card__cta {
  gap: 0.7rem;
  color: var(--forest-deep, var(--teal-deep, #142822)) !important;
}

/* Grid - clean 3-col on desktop, responsive below */
.services-grid,
.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .services-grid,
  .svc-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .svc-card { aspect-ratio: auto !important; }
  .svc-card__media,
  .svc-card__image { aspect-ratio: 16/10 !important; }
  .svc-card__title { font-size: 1.2rem !important; }
}

/* end v12 */


/* ============================================================
   v14 — Universal grid centering rule
   PROBLEM: With `repeat(auto-fit, minmax(MIN, 1fr))` the last
   row stretches its items to fill the row width. A row with one
   leftover item ends up as a single 100%-wide card looking lonely.
   FIX: cap the column max-width and add justify-content: center
   on the grid container so partial last rows center naturally.
   Applies to .services-grid, .svc-grid, .related-grid,
   .about-gallery, .doctors-grid, .reviews-grid, .process-grid.
   ============================================================ */
.services-grid,
.svc-grid,
.related-grid,
.about-gallery,
.doctors-grid,
.reviews-grid,
.process-grid {
  justify-content: center !important;
}
.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px)) !important;
}
.svc-grid {
  grid-template-columns: repeat(auto-fit, minmax(290px, 380px)) !important;
}
.related-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px)) !important;
}
.doctors-grid,
.reviews-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px)) !important;
}
.process-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 300px)) !important;
}


/* ============================================================
   v15 — Explicit 3-column grid + centered last row
   REPLACES the v14 auto-fit approach. Now: at desktop we ALWAYS
   render 3 cards per row in a 12-track grid (each card spans 4
   tracks). When the final row has 1 or 2 leftovers, they're
   shifted to the center columns so 7 items render as 3/3/1
   centered, 8 as 3/3/2 centered, etc.
   ============================================================ */
.services-grid,
.svc-grid {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  gap: 1.75rem !important;
  justify-content: stretch !important;
}
.services-grid > *,
.svc-grid > * {
  grid-column: span 4 !important;        /* 3 per row */
}

/* Last row has 1 leftover — center it (cols 5-8) */
.services-grid > :nth-child(3n+1):last-child,
.svc-grid     > :nth-child(3n+1):last-child {
  grid-column: 5 / span 4 !important;
}
/* Last row has 2 leftovers — center the pair (cols 3-6, 7-10) */
.services-grid > :nth-child(3n+1):nth-last-child(2),
.svc-grid     > :nth-child(3n+1):nth-last-child(2) {
  grid-column: 3 / span 4 !important;
}
.services-grid > :nth-child(3n+2):last-child,
.svc-grid     > :nth-child(3n+2):last-child {
  grid-column: 7 / span 4 !important;
}

/* Tablet: 2 per row (cards span 6 tracks). Reset the 3-col centerers
   and apply a 2-col centerer for an odd single leftover. */
@media (max-width: 900px) {
  .services-grid > *,
  .svc-grid > *,
  .services-grid > :nth-child(3n+1):last-child,
  .svc-grid     > :nth-child(3n+1):last-child,
  .services-grid > :nth-child(3n+1):nth-last-child(2),
  .svc-grid     > :nth-child(3n+1):nth-last-child(2),
  .services-grid > :nth-child(3n+2):last-child,
  .svc-grid     > :nth-child(3n+2):last-child {
    grid-column: span 6 !important;
  }
  .services-grid > :nth-child(2n+1):last-child,
  .svc-grid     > :nth-child(2n+1):last-child {
    grid-column: 4 / span 6 !important;  /* center single leftover */
  }
}

/* Mobile: 1 per row */
@media (max-width: 600px) {
  .services-grid > *,
  .svc-grid > *,
  .services-grid > :nth-child(2n+1):last-child,
  .svc-grid     > :nth-child(2n+1):last-child,
  .services-grid > :nth-child(3n+1):last-child,
  .svc-grid     > :nth-child(3n+1):last-child,
  .services-grid > :nth-child(3n+1):nth-last-child(2),
  .svc-grid     > :nth-child(3n+1):nth-last-child(2),
  .services-grid > :nth-child(3n+2):last-child,
  .svc-grid     > :nth-child(3n+2):last-child {
    grid-column: 1 / span 12 !important;
  }
}

/* Related-grid + doctors/reviews/process unchanged from v14 — those grids
   typically have 2-4 items and the v14 auto-fit + cap is correct there. */


/* ============================================================
   v16 — Uniform gallery sizing + explicit 3-col grid centering
   APPLIES TO: .about-gallery and .practice-gallery
   Problem: Legacy --feature/--tall/--lg/--wide modifiers gave
   some items 2x-3x size, and images sized to their natural
   aspect ratio. Result: jagged 5-item rows with row 2 left-aligned.
   Fix: 12-track grid, every item span 4 (3 per row), partial last
   row centered. All images forced to 4:3 with object-fit: cover.
   Modifier classes neutralized so they don't break uniformity.
   ============================================================ */
.about-gallery,
.practice-gallery {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  grid-auto-rows: auto !important;
  gap: 1.75rem !important;
  align-items: stretch !important;
}
.about-gallery > *,
.practice-gallery > * {
  grid-column: span 4 !important;       /* 3 per row */
  grid-row: auto !important;
  aspect-ratio: 4 / 3 !important;
  width: 100% !important;
  height: auto !important;
  overflow: hidden !important;
  border-radius: var(--radius-lg, 14px) !important;
  margin: 0 !important;
}
.about-gallery > * > img,
.practice-gallery > * > img,
.about-gallery > * img,
.practice-gallery > * img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
  aspect-ratio: auto !important;
}

/* Neutralize legacy size modifiers so they don't break uniformity */
.about-gallery__item--feature,
.about-gallery__item--lg,
.about-gallery__item--wide,
.practice-gallery__item--tall {
  grid-column: span 4 !important;
  grid-row: auto !important;
  aspect-ratio: 4 / 3 !important;
}

/* Last-row centering — same pattern as services-grid */
.about-gallery > :nth-child(3n+1):last-child,
.practice-gallery > :nth-child(3n+1):last-child {
  grid-column: 5 / span 4 !important;
}
.about-gallery > :nth-child(3n+1):nth-last-child(2),
.practice-gallery > :nth-child(3n+1):nth-last-child(2) {
  grid-column: 3 / span 4 !important;
}
.about-gallery > :nth-child(3n+2):last-child,
.practice-gallery > :nth-child(3n+2):last-child {
  grid-column: 7 / span 4 !important;
}

/* Tablet: 2 per row */
@media (max-width: 900px) {
  .about-gallery > *,
  .practice-gallery > *,
  .about-gallery > :nth-child(3n+1):last-child,
  .practice-gallery > :nth-child(3n+1):last-child,
  .about-gallery > :nth-child(3n+1):nth-last-child(2),
  .practice-gallery > :nth-child(3n+1):nth-last-child(2),
  .about-gallery > :nth-child(3n+2):last-child,
  .practice-gallery > :nth-child(3n+2):last-child,
  .about-gallery__item--feature,
  .about-gallery__item--lg,
  .about-gallery__item--wide,
  .practice-gallery__item--tall {
    grid-column: span 6 !important;
  }
  .about-gallery > :nth-child(2n+1):last-child,
  .practice-gallery > :nth-child(2n+1):last-child {
    grid-column: 4 / span 6 !important;
  }
}

/* Mobile: 1 per row */
@media (max-width: 600px) {
  .about-gallery > *,
  .practice-gallery > *,
  .about-gallery > :nth-child(3n+1):last-child,
  .practice-gallery > :nth-child(3n+1):last-child,
  .about-gallery > :nth-child(3n+1):nth-last-child(2),
  .practice-gallery > :nth-child(3n+1):nth-last-child(2),
  .about-gallery > :nth-child(3n+2):last-child,
  .practice-gallery > :nth-child(3n+2):last-child,
  .about-gallery > :nth-child(2n+1):last-child,
  .practice-gallery > :nth-child(2n+1):last-child,
  .about-gallery__item--feature,
  .about-gallery__item--lg,
  .about-gallery__item--wide,
  .practice-gallery__item--tall {
    grid-column: 1 / span 12 !important;
  }
}


/* ============================================================
   v17 — Gallery captions restored
   PROBLEM: v16 applied aspect-ratio: 4/3 + overflow: hidden to the
   gallery __item (the <figure> wrapper). This clipped <figcaption>
   below the image — captions on practice-gallery vanished.
   FIX: keep the 4:3 uniform sizing ON THE <img> ONLY. The wrapper
   becomes a flex column: image up top, caption flows naturally
   below at its own height. Rounded corners preserved via overflow:
   hidden on the wrapper (which still works because the bounding
   box grows to fit the caption — only OUTSIDE-the-box is clipped).
   ============================================================ */
.about-gallery > *,
.practice-gallery > * {
  display: flex !important;
  flex-direction: column !important;
  aspect-ratio: auto !important;              /* override v16 */
  height: auto !important;
  background: var(--sand, var(--BG-CARD, #F4EFE8)) !important;
  border-radius: var(--radius-lg, 14px) !important;
  overflow: hidden !important;                /* clips image corners only — caption stays inside box */
  box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}
/* The IMG carries the 4:3 uniform sizing now, not its parent */
.about-gallery > * > img,
.practice-gallery > * > img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3 !important;
  object-fit: cover !important;
  display: block !important;
  border-radius: 0 !important;                /* parent handles radius */
  margin: 0 !important;
}
/* Caption styling — visible below the image */
.about-gallery figcaption,
.about-gallery__caption,
.practice-gallery figcaption,
.practice-gallery__caption {
  display: block !important;
  padding: 0.95rem 1.1rem 1.1rem !important;
  font-size: 0.92rem !important;
  line-height: 1.5 !important;
  color: var(--ink-soft, #4a5860) !important;
  background: var(--sand, var(--BG-CARD, #F4EFE8)) !important;
  margin: 0 !important;
  flex: 1 1 auto !important;                  /* row-equal-height: caption fills remaining space */
}
/* Make rows equal-height across a row so card bottoms align even when caption lengths vary */
.about-gallery,
.practice-gallery {
  align-items: stretch !important;
}


/* ============================================================
   v19 — Universal grid rule: every multi-card grid uses the
   explicit 12-track 3-column layout with centered last row.
   ADDS: .doctors-grid, .reviews-grid, .related-grid, .process-grid
   (services-grid + svc-grid handled in v15; galleries in v16/v17)
   ============================================================ */
.doctors-grid,
.reviews-grid,
.related-grid,
.process-grid {
  display: grid !important;
  grid-template-columns: repeat(12, 1fr) !important;
  gap: 1.75rem !important;
  align-items: stretch !important;
}
.doctors-grid > *,
.reviews-grid > *,
.related-grid > *,
.process-grid > * {
  grid-column: span 4 !important;        /* 3 per row */
}

/* Last row: 1 leftover → cols 5-8 */
.doctors-grid > :nth-child(3n+1):last-child,
.reviews-grid > :nth-child(3n+1):last-child,
.related-grid > :nth-child(3n+1):last-child,
.process-grid > :nth-child(3n+1):last-child {
  grid-column: 5 / span 4 !important;
}
/* Last row: 2 leftovers → cols 3-6 + 7-10 */
.doctors-grid > :nth-child(3n+1):nth-last-child(2),
.reviews-grid > :nth-child(3n+1):nth-last-child(2),
.related-grid > :nth-child(3n+1):nth-last-child(2),
.process-grid > :nth-child(3n+1):nth-last-child(2) {
  grid-column: 3 / span 4 !important;
}
.doctors-grid > :nth-child(3n+2):last-child,
.reviews-grid > :nth-child(3n+2):last-child,
.related-grid > :nth-child(3n+2):last-child,
.process-grid > :nth-child(3n+2):last-child {
  grid-column: 7 / span 4 !important;
}

/* Tablet ≤900px: 2 per row, single dangler centered */
@media (max-width: 900px) {
  .doctors-grid > *,
  .reviews-grid > *,
  .related-grid > *,
  .process-grid > *,
  .doctors-grid > :nth-child(3n+1):last-child,
  .reviews-grid > :nth-child(3n+1):last-child,
  .related-grid > :nth-child(3n+1):last-child,
  .process-grid > :nth-child(3n+1):last-child,
  .doctors-grid > :nth-child(3n+1):nth-last-child(2),
  .reviews-grid > :nth-child(3n+1):nth-last-child(2),
  .related-grid > :nth-child(3n+1):nth-last-child(2),
  .process-grid > :nth-child(3n+1):nth-last-child(2),
  .doctors-grid > :nth-child(3n+2):last-child,
  .reviews-grid > :nth-child(3n+2):last-child,
  .related-grid > :nth-child(3n+2):last-child,
  .process-grid > :nth-child(3n+2):last-child {
    grid-column: span 6 !important;
  }
  .doctors-grid > :nth-child(2n+1):last-child,
  .reviews-grid > :nth-child(2n+1):last-child,
  .related-grid > :nth-child(2n+1):last-child,
  .process-grid > :nth-child(2n+1):last-child {
    grid-column: 4 / span 6 !important;
  }
}

/* Mobile ≤600px: 1 per row */
@media (max-width: 600px) {
  .doctors-grid > *,
  .reviews-grid > *,
  .related-grid > *,
  .process-grid > *,
  .doctors-grid > :nth-child(3n+1):last-child,
  .reviews-grid > :nth-child(3n+1):last-child,
  .related-grid > :nth-child(3n+1):last-child,
  .process-grid > :nth-child(3n+1):last-child,
  .doctors-grid > :nth-child(3n+1):nth-last-child(2),
  .reviews-grid > :nth-child(3n+1):nth-last-child(2),
  .related-grid > :nth-child(3n+1):nth-last-child(2),
  .process-grid > :nth-child(3n+1):nth-last-child(2),
  .doctors-grid > :nth-child(3n+2):last-child,
  .reviews-grid > :nth-child(3n+2):last-child,
  .related-grid > :nth-child(3n+2):last-child,
  .process-grid > :nth-child(3n+2):last-child,
  .doctors-grid > :nth-child(2n+1):last-child,
  .reviews-grid > :nth-child(2n+1):last-child,
  .related-grid > :nth-child(2n+1):last-child,
  .process-grid > :nth-child(2n+1):last-child {
    grid-column: 1 / span 12 !important;
  }
}

/* === Hero video (vertical phone-style player) === */
.hero__visual--video {
  aspect-ratio: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}
.hero__visual--video::after {
  display: none !important;
}
.hero-video {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 36px;
  overflow: hidden;
  background: #1F3A2E;
  box-shadow:
    0 35px 80px -25px rgba(31, 58, 46, 0.55),
    0 14px 32px -12px rgba(31, 58, 46, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  max-width: 460px;
  margin: 0 auto;
}
.hero-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-video__badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  right: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.1rem;
  background: rgba(31, 58, 46, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 999px;
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  font-weight: 600;
  width: max-content;
  max-width: calc(100% - 2.5rem);
}
.hero-video__badge svg {
  width: 14px;
  height: 14px;
  fill: var(--mustard, #D4A24C);
  flex-shrink: 0;
}

/* === Single-doctor team grid === */
.doctors-grid--single {
  display: grid;
  grid-template-columns: minmax(280px, 360px);
  justify-content: center;
  margin: 0 auto;
}

/* === Patient Care Team callout === */
.care-team {
  background: var(--cream, #F8F4ED);
  border: 1px solid rgba(31, 58, 46, 0.12);
  border-radius: 20px;
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: start;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.care-team__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--mustard, #D4A24C);
  display: grid;
  place-items: center;
}
.care-team__icon svg { width: 28px; height: 28px; fill: var(--forest, #1F3A2E); }
.care-team__eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--forest, #1F3A2E);
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.care-team h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.5vw, 1.5rem);
  margin: 0 0 0.75rem;
  color: var(--forest, #1F3A2E);
}
.care-team p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}
@media (max-width: 600px) {
  .care-team { grid-template-columns: 1fr; }
}

/* ============================================================
   v20 — Insurance & Financing page (2026-05-20)
   Page: /insurance-financing.html (and /es/...)
   Uses .svc-grid (existing centered 3-col rule)
   ============================================================ */

/* Insurance carrier chips — flex wrap pill list (NOT a grid) */
.insurance-chips {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.insurance-chips > li {
  background: var(--cream);
  border: 1px solid var(--line);
  color: var(--forest, #1F3A2E);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}
.insurance-chips > li:hover {
  background: #fff;
  border-color: var(--sage);
  transform: translateY(-1px);
}
.insurance-chips > li:last-child {
  background: transparent;
  border-style: dashed;
  border-color: var(--sage-deep);
  color: var(--forest-soft, #2D5040);
  font-style: italic;
}

/* Finance card variant — sits inside .svc-grid > .svc-card */
.finance-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.75rem;
  box-shadow: 0 2px 12px rgba(31, 58, 46, 0.04);
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.finance-card:hover {
  box-shadow: 0 8px 24px rgba(31, 58, 46, 0.08);
  transform: translateY(-2px);
}
.finance-card > h3 {
  font-family: var(--font-display);
  color: var(--forest, #1F3A2E);
  margin: 0;
  font-size: clamp(1.1rem, 1.05rem + 0.3vw, 1.35rem);
}
.finance-card > p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
  font-size: 0.97rem;
}
.finance-card .check-list { margin: 0.25rem 0 0; padding: 0; }
.finance-card .check-list li {
  font-size: 0.93rem;
  padding: 0.25rem 0 0.25rem 1.5rem;
}
.finance-card__brand {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin: -0.5rem -0.5rem 0;
  flex-wrap: wrap;
}
.finance-card__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.finance-card__tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  opacity: 0.85;
}
.finance-card__brand--cherry {
  background: linear-gradient(135deg, #FFE3EC 0%, #FFCDD8 100%);
  color: #B30B4F;
}
.finance-card__brand--cherry .finance-card__logo::before {
  content: "🍒  ";
  font-size: 1.2rem;
}
.finance-card__brand--carecredit {
  background: linear-gradient(135deg, #E1F0F9 0%, #C9E4F4 100%);
  color: #005B8A;
}
.finance-card__brand--inhouse {
  background: var(--sage);
  color: var(--forest, #1F3A2E);
}
.finance-card__brand--cash {
  background: var(--cream-warm);
  color: var(--forest, #1F3A2E);
  border: 1px solid var(--line);
}
.finance-card__cta {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.finance-card__cta .btn {
  width: 100%;
  text-align: center;
  justify-content: center;
}
.finance-disclaimer {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: var(--cream);
  border-left: 3px solid var(--sage);
  border-radius: 0 6px 6px 0;
}

/* Tighten finance-card spacing on smaller screens */
@media (max-width: 900px) {
  .finance-card { padding: 1.25rem 1.25rem 1.5rem; }
  .finance-card__brand { padding: 0.7rem 0.85rem; }
  .finance-card__logo { font-size: 1.25rem; }
}
@media (max-width: 600px) {
  .insurance-chips > li { font-size: 0.85rem; padding: 0.45rem 0.85rem; }
}

/* ============================================================
   v14 — Center hero CTAs inside .page-hero
   .page-hero sets text-align:center on the section, which centers
   inline text but does NOT center .service-hero__cta (display:flex).
   Result: eyebrow/h1/lead read centered but the button row left-aligns.
   This fix centers the flex row to match the rest of the hero copy
   on services.html and insurance-financing.html (both desktop and
   the mobile single-column collapse <860px).
   ============================================================ */
.page-hero .service-hero__cta {
  justify-content: center;
}
.page-hero .service-hero__text {
  text-align: center;
}


/* ============================================================
   v15 — Hero video → static image swap
   Replaces shared placeholder hero.mp4 with the new hero-poster
   on the homepage. Same .hero-video container; add sizing for img.
   ============================================================ */
.hero-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
