.section-eyebrow {
  margin: 0;
  font-family: var(--sans, Arial, sans-serif);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--eyebrow-color, var(--brand, #1d4c7c));
}

.section-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}


/* ---------------------------------------------------------------------------
 * Swiper baseline — required when using slidesPerView: 'auto'
 * (logo marquees, brand strips, card carousels with intrinsic-width slides).
 * Without flex-shrink:0 on slides, the wrapper collapses to a vertical stack.
 * ------------------------------------------------------------------------- */
.swiper-wrapper {
  display: flex;
  align-items: center;
}

.swiper-slide {
  flex-shrink: 0;
}

/* Continuous-marquee variant — apply .swiper-marquee to a `.swiper` element
 * paired with `loop:true, slidesPerView:'auto', allowTouchMove:false,
 * autoplay:{delay:0}, speed:6000, freeMode:true`. */
.swiper-marquee .swiper-wrapper {
  transition-timing-function: linear !important;
}

/* =========================================================================
   Projects & Proof gallery + "Ready to Start" CTA
   Shared by the homepage and service-detail pages via:
     template-parts/projects-proof.php  and  template-parts/ready-cta.php
   Class names keep the .home-* prefix so the homepage renders identically.
   ========================================================================= */

/* ---- Projects & Proof (base) ---- */
.home-projects {
  position: relative;
  isolation: isolate;
  background: var(--bg-section);
  padding-block: clamp(4rem, 6vw, 5.75rem);
  overflow: hidden;
}

.watermark {
  position: absolute;
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 0.8;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  text-transform: uppercase;
}

.watermark--projects {
  top: clamp(3.5rem, 7vw, 6rem);
  left: clamp(1rem, 2.5vw, 2.5rem);
  right: auto;
  font-size: clamp(12rem, 20vw, 19rem);
  color: rgba(30, 94, 170, 0.055);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: none;
  letter-spacing: 0;
}

.home-projects__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.home-projects__head {
  max-width: none;
  display: grid;
  gap: 0.5rem;
  justify-self: end;
  text-align: right;
  margin-bottom: -0.5rem;
}

.home-projects__head .section-eyebrow {
  justify-self: end;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.home-projects__head .section-title {
  white-space: nowrap;
  font-weight: 800;
}

.home-projects__gallery {
  display: grid;
  grid-template-columns: 2.05fr 1fr 1fr 2.05fr;
  grid-template-rows: 185px 185px 185px;
  gap: 12px;
  min-height: 579px;
}

.project-card {
  position: relative;
  display: block;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  color: #ffffff;
  background: var(--project-img) center / cover no-repeat;
}

.project-card--feature {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.project-card:nth-child(2) { grid-column: 2; grid-row: 1; }
.project-card:nth-child(3) { grid-column: 3; grid-row: 1; }
.project-card:nth-child(4) { grid-column: 2; grid-row: 2 / span 2; }
.project-card:nth-child(5) { grid-column: 3; grid-row: 2; }
.project-card:nth-child(6) { grid-column: 4; grid-row: 1; }
.project-card:nth-child(7) { grid-column: 3; grid-row: 3; }
.project-card:nth-child(8) { grid-column: 4; grid-row: 2 / span 2; }

.project-card:nth-child(6),
.project-card:nth-child(8) {
  background-position: center;
}

.home-projects__gallery::after {
  content: "";
  grid-column: 1;
  grid-row: 3;
  background: url("../img/municipal-works-fd357d.png") center / cover no-repeat;
}

.project-card__media {
  position: absolute;
  inset: 0;
  display: none;
}

.project-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.project-card:hover .project-card__media img {
  transform: scale(1.04);
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.7) 100%);
  pointer-events: none;
}

.project-card__title {
  position: absolute;
  inset: auto 0 0 0;
  padding: 1.25rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  z-index: 1;
}

.home-projects__cta {
  justify-self: center;
  min-height: 56px;
  border-color: transparent;
  box-shadow: inset 0 -4px 0 var(--accent-pink);
}

/* ---- Ready to Start CTA (base) ---- */
.home-cta {
  background: #ffffff;
  padding-block: clamp(3.25rem, 5vw, 4.5rem) clamp(4.5rem, 7vw, 6rem);
}

.home-cta__card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 1.75rem;
  padding: clamp(2rem, 4vw, 3.5rem);
  padding-block: clamp(4rem, 7vw, 6rem);
  min-height: 500px;
  background:
    linear-gradient(rgba(30, 94, 170, 0.86), rgba(30, 94, 170, 0.86)),
    url("../img/background-shadow.webp") center / cover no-repeat;
  border-radius: 0;
  color: #ffffff;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
}

.home-cta__body {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
}

.home-cta__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.9vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
  text-transform: uppercase;
}

.home-cta__copy {
  margin: 0;
  max-width: 36rem;
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}

.home-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  justify-self: center;
  justify-content: center;
}

.home-cta__actions .btn-layout {
  min-width: 0;
  min-height: 52px;
  padding: 1rem 2.5rem;
  border-radius: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.home-cta .btn-layout.default {
  background: #ffffff;
  color: var(--brand);
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.home-cta .btn-layout.default:hover {
  background: var(--accent-pink);
  border-color: var(--accent-pink);
  color: #ffffff;
}

/* Tertiary "white ghost" on the dark CTA — transparent with a uniform white
   outline. Overrides the base .hollow (white fill + magenta underline), which
   is the light-background secondary variant. */
.home-cta__phone {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.home-cta__phone:hover {
  background: #ffffff !important;
  color: var(--brand) !important;
  border-color: #ffffff !important;
}

.home-cta__phone .cnm-icon {
  background-color: #ffffff;
}

.home-cta__phone:hover .cnm-icon {
  background-color: var(--brand);
}

.home-cta__phone .cnm-icon {
  width: 1.15rem;
  height: 1.15rem;
}

/* ---- Responsive (effective values, matching the homepage) ---- */
@media (max-width: 991px) {
  .home-projects__head {
    justify-self: start;
    text-align: left;
    margin-bottom: 0;
  }

  .home-projects__head .section-eyebrow {
    justify-self: start;
  }

  .home-projects__head .section-title {
    white-space: normal;
    font-size: clamp(1.9rem, 8vw, 2.55rem);
    overflow-wrap: anywhere;
  }

  .watermark--projects {
    display: none;
  }

  .home-projects__gallery {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: 230px;
    gap: 10px;
    min-height: 0;
  }

  .project-card,
  .project-card--feature,
  .project-card:nth-child(2),
  .project-card:nth-child(3),
  .project-card:nth-child(4),
  .project-card:nth-child(5),
  .project-card:nth-child(6),
  .project-card:nth-child(7),
  .project-card:nth-child(8) {
    grid-column: auto;
    grid-row: auto;
  }

  .home-projects__gallery::after {
    display: none;
  }

  .home-cta__title {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.08;
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .home-cta__copy {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .home-cta__card {
    grid-template-columns: 1fr;
    text-align: center;
    min-height: 0;
    padding: clamp(3rem, 10vw, 4rem) 1.5rem;
  }

  .home-cta__actions {
    display: grid;
    width: 100%;
    gap: 1rem;
    justify-self: center;
    justify-content: center;
  }

  .home-cta__actions .btn-layout {
    width: 100%;
    min-height: 52px;
    padding: 1rem 1.25rem;
  }
}

@media (max-width: 575px) {
  .home-projects__gallery {
    grid-auto-rows: 240px;
  }

  .home-cta__body {
    max-width: 342px;
    max-width: min(342px, calc(100vw - 48px));
  }
}

/* =========================================================================
   News article card — used by the News listing grid and the News-Detail
   "Read Next" grid (image + category eyebrow + title + excerpt).
   ========================================================================= */
.news-card {
  display: flex;
  flex-direction: column;
}

/* Card grid — shared by the News listing (templates/news.php) and the homepage
   "Latest News" row (template-parts/latest-news.php). Lives here rather than in
   news.css because news.css only loads on the News page template.
   The gap is a custom property because home.css computes the track width from
   it (see .home-news .news-feed__grid) — one source so the two cannot drift. */
.news-feed__grid {
  --news-grid-gap: clamp(1.5rem, 2.5vw, 2.25rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--news-grid-gap);
}

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

@media (max-width: 575px) {
  .news-feed__grid {
    grid-template-columns: 1fr;
  }
}

.news-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}

.news-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card__media:hover img {
  transform: scale(1.04);
}

.news-card__body {
  display: grid;
  gap: 0.6rem;
  padding-top: 1.1rem;
}

.news-card__cat {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1E5EAA;
}

.news-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.news-card__title a {
  color: inherit;
  text-decoration: none;
}

.news-card__title a:hover {
  color: var(--brand);
}

.news-card__excerpt {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-light);
}

/* =========================================================================
   Fancybox lightbox stacking
   Used by the homepage Projects & Proof grid, /gallery/ and service-detail.
   Fancybox 5 hardcodes z-index: 1050 on its container, but .site-header is
   raised to 1150 at (max-width: 991px) — so on mobile the header painted over
   the lightbox and buried its Close button. 1200 clears every header layer
   (1150 header, 1140 inner, 1120 nav panel, 1100 nav scrim).
   The `body` prefix is required, not decorative: the CDN fancybox.css is
   enqueued after the theme styles, so a bare .fancybox__container rule loses
   the cascade on equal specificity.
   ========================================================================= */
body .fancybox__container {
  z-index: 1200;
}
