/* =============================================================================
   MERIDIAN POOLS — renovations.css
   MigsFlow Web Design

   Remodeling & Renovation page specific styles only.
   global.css + components.css + animations.css must load before this file.

   MOBILE FIRST — base styles target mobile.

   TABLE OF CONTENTS
   01. Page Hero (image override only — layout in components.css)
   02. What We Do Section
   03. Before & After Section
============================================================================= */


/* =============================================================================
   01 — PAGE HERO IMAGE OVERRIDE
   Only the background image path changes per service page.
   All layout, overlay, and breadcrumb styles live in components.css.
============================================================================= */

/* No overrides needed — components.css handles everything.
   Add page-specific section styles below as sections are built. */


/* =============================================================================
   02 — WHAT WE DO SECTION
============================================================================= */

#what-we-do {
  background-color: var(--bg-300);
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.wwd-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-3xl);
}

.wwd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--blue);
}

/* Blue squares either side of eyebrow */
.wwd-eyebrow span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: var(--blue);
  flex-shrink: 0;
}

/* ── Grid — mobile: 1 col, tablet: 2 col, desktop: 3 col ─────────────────── */
.wwd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .wwd-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ── Individual card ─────────────────────────────────────────────────────── */
.wwd-card {
  position: relative;
  background-color: var(--bg-100);
  border-radius: var(--radius-card);
  overflow: visible;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition:
    background-color 0.4s ease,
    box-shadow 0.4s ease;
}

.wwd-card:hover {
  background-color: var(--bg-600);
  box-shadow: var(--shadow-card-hover);
}

/* ── Card top ────────────────────────────────────────────────────────────── */
.wwd-card-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-lg);
  position: relative;
  z-index: 1;
}

/* ── Icon ────────────────────────────────────────────────────────────────── */
.wwd-card-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue);
  transition: color 0.4s ease;
}

.wwd-card:hover .wwd-card-icon {
  color: var(--white);
}

.wwd-card-icon img,
.wwd-card-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Title ───────────────────────────────────────────────────────────────── */
.wwd-card-title {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  letter-spacing: var(--ls-heading);
  color: var(--text-600);
  line-height: 1.1;
  transition: color 0.4s ease;
}

.wwd-card:hover .wwd-card-title {
  color: var(--white);
}

/* ── Description ─────────────────────────────────────────────────────────── */
.wwd-card-desc {
  font-size: var(--fs-body-sm);
  color: var(--text-700);
  line-height: var(--lh-body);
  max-width: none;
  transition: color 0.4s ease;
}

.wwd-card:hover .wwd-card-desc {
  color: rgba(255, 255, 255, 0.75);
}

/* ── View Details link ───────────────────────────────────────────────────── */
.wwd-view-details {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-heading);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  letter-spacing: var(--ls-heading);
  color: var(--text-100);
  text-decoration: none;
  text-transform: uppercase;
  margin-top: var(--space-xs);
  transition: color 0.4s ease;
}

.wwd-card:hover .wwd-view-details {
  color: var(--white);
}

/* ── View details overlay on image ───────────────────────────────────────── */
/* Position the button absolute inside wwd-card-img */
.wwd-card-img {
  position: relative;
}

.wwd-card-img .wwd-view-details {
  position: absolute;
  top: 1rem;
  left: .6rem;
  margin-top: 0;
  z-index: 2;
  padding: 0.4rem 0.75rem;
  border-radius: 99px;
}

/* ── Circle arrow icon ───────────────────────────────────────────────────── */
.wwd-view-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background-color: var(--bg-600);
  color: var(--white);
  flex-shrink: 0;
  transition:
    background-color 0.4s ease,
    transform 0.4s ease;
}

.wwd-card:hover .wwd-view-icon {
  transform: translate(2px, -2px);
}

.wwd-view-icon svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* ── Card image ──────────────────────────────────────────────────────────── */
.wwd-card-img {
  position: relative;
  width: 100%;
  line-height: 0;
  margin-top: auto;
}

/* PNG images have shape baked in — display naturally, no cropping */
.wwd-card-img picture,
.wwd-card-img img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: unset;
  padding: .5rem;
}


/* =============================================================================
   03 — BEFORE & AFTER SECTION
============================================================================= */

#before-after {
  background-color: var(--bg-100);
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.ba-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.ba-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--blue);
}

.ba-eyebrow span {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: var(--blue);
  flex-shrink: 0;
}

.ba-subtext {
  font-size: var(--fs-body);
  color: var(--text-700);
  max-width: none;
}

/* ── Filter tabs — scrollable on mobile, centered on desktop ─────────────── */
.ba-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-xs);
  scrollbar-width: none;
}

.ba-tabs::-webkit-scrollbar {
  display: none;
}

@media (min-width: 1025px) {
  .ba-tabs {
    justify-content: center;
    overflow-x: visible;
    flex-wrap: wrap;
  }
}

.ba-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.125rem;
  border-radius: 20px;
  border: 1.5px solid rgba(0, 0, 0, 0.15);
  background-color: var(--bg-300);
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: 500;
  color: var(--text-600);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base);
}

.ba-tab:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.ba-tab.active {
  background-color: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  font-weight: 600;
}

/* ── Grid — mobile: 1 col, tablet+: 2 col ───────────────────────────────── */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .ba-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }
}

/* Single result — JS adds this class when only 1 item is visible */
.ba-grid.single-result {
  grid-template-columns: 1fr;
  max-width: 620px;
  margin-inline: auto;
}

/* Hidden items */
.ba-item.hidden {
  display: none;
}

/* ── Before/After card ───────────────────────────────────────────────────── */
.ba-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
  background-color: var(--bg-100);
  box-shadow: var(--shadow-card);
}

/* ── Slider container ────────────────────────────────────────────────────── */
.ba-slider {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

@media (min-width: 768px) {
  .ba-slider {
    height: 320px;
  }
}

/* ── Before image ────────────────────────────────────────────────────────── */
.ba-before {
  position: absolute;
  inset: 0;
}

.ba-before picture,
.ba-before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background-color: var(--bg-300);
}

/* ── After image — clipped by JS ─────────────────────────────────────────── */
.ba-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

.ba-after picture,
.ba-after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  background-color: var(--bg-300);
}

/* ── Labels ──────────────────────────────────────────────────────────────── */
.ba-label {
  position: absolute;
  top: var(--space-md);
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 700;
  color: var(--white);
  background-color: rgba(0, 0, 0, 0.55);
  padding: 0.25rem 0.625rem;
  border-radius: 20px;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.ba-label-before {
  left: var(--space-md);
}

.ba-label-after {
  right: var(--space-md);
}

/* ── Drag handle ─────────────────────────────────────────────────────────── */
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

.ba-handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--white);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

.ba-handle-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background-color: var(--blue);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.ba-handle-btn svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--white);
  flex-shrink: 0;
}

/* ── Card info ───────────────────────────────────────────────────────────── */
.ba-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-md) var(--space-lg) var(--space-lg);
}

.ba-title {
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: 700;
  color: var(--text-100);
  letter-spacing: 0;
  line-height: 1.3;
}

.ba-desc {
  font-size: var(--fs-caption);
  color: var(--text-700);
  max-width: none;
}




/* =============================================================================
   04 — WHY RENOVATE SECTION
============================================================================= */

#why-renovate {
  background-color: var(--bg-400);
  padding: 0; /* section handles its own padding via children */
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* Background image */
.why-renovate-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.why-renovate-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Dark overlay so text stays readable */
#why-renovate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(9, 22, 45, 0.90) 0%,
    rgba(9, 22, 45, 0.80) 100%
  );
  z-index: -1;
}

/* ── Stat bar — top strip ────────────────────────────────────────────────── */
.wr-stat-bar {
  background-color: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: var(--space-2xl);
}

.wr-stat-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
}

@media (min-width: 768px) {
  .wr-stat-inner {
    flex-direction: row;
    justify-content: space-between;
    gap: var(--space-lg);
  }
}

/* Individual stat */
.wr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
  flex: 1;
}

.wr-stat-num {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--white);
  letter-spacing: var(--ls-heading);
  line-height: 1;
  max-width: none;
}

.wr-stat-label {
  font-size: var(--fs-caption);
  font-weight: 500;
  color: var(--text-500);
  max-width: 16ch;
  text-align: center;
  line-height: 1.4;
}

/* Vertical divider between stats */
.wr-stat-divider {
  display: none;
}

@media (min-width: 768px) {
  .wr-stat-divider {
    display: block;
    width: 1px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
  }
}

/* ── Main content — 2 col on desktop ─────────────────────────────────────── */
.wr-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3xl);
  padding-block: var(--space-4xl);
  align-items: start;
}

@media (min-width: 1025px) {
  .wr-main {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
  }
}

/* ── Left — heading + body + CTA ─────────────────────────────────────────── */
.wr-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  min-width: 0;
}

.wr-heading {
  color: var(--white);
}

.wr-body {
  font-size: var(--fs-body);
  color: var(--text-500);
  line-height: var(--lh-body);
  max-width: 48ch;
}

@media (min-width: 768px) {
  .wr-body {
    font-size: var(--fs-body-lg);
  }
}

/* ── Right — stacked reasons ─────────────────────────────────────────────── */
.wr-right {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

/* Thin divider between reasons */
.wr-divider {
  width: 100%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.08);
}

/* Individual reason row */
.wr-reason {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
  padding-block: var(--space-lg);
}

/* Left side — number + icon */
.wr-reason-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  flex-shrink: 0;
  min-width: 3rem;
}

/* Step number */
.wr-reason-num {
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  color: var(--blue);
  letter-spacing: var(--ls-heading);
  line-height: 1;
  max-width: none;
}

/* Icon slot */
.wr-reason-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
}

.wr-reason-icon img,
.wr-reason-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Text — title + body */
.wr-reason-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
  padding-top: var(--space-xs);
}

.wr-reason-text h4 {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0;
  line-height: 1.3;
}

.wr-reason-text p {
  font-size: var(--fs-body-sm);
  color: var(--text-500);
  line-height: var(--lh-body);
  max-width: none;
}