/* =============================================================================
   RIDGELINE POOLS — renovations.css
   Remodeling & Renovation page: "what we remodel" grid, before/after sliders,
   closing CTA band. Loads after global.css + nav-hero.css. Mobile-first.
============================================================================= */

/* =============================================================================
   RENOVATION TYPES — "What We Remodel"
============================================================================= */
.reno-types-header {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.reno-types-header .eyebrow { justify-content: center; }
.reno-types-header h2 { margin-bottom: 1rem; }
.reno-types-header p { color: var(--text-body); max-width: 60ch; margin: 0 auto; }

.reno-types-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 600px) { .reno-types-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reno-types-grid { grid-template-columns: repeat(3, 1fr); } }

.reno-type {
  position: relative;
  border: 1px solid var(--grey-200);
  border-radius: 0;
  overflow: hidden;
  background: var(--white);
  transition: transform var(--transition), box-shadow var(--transition);
}
.reno-type:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.08); }

.reno-type-img {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--grey-200);
}
.reno-type-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.reno-type:hover .reno-type-img img { transform: scale(1.06); }

.reno-type-num {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  width: 2rem; height: 2rem;
  display: grid; place-items: center;
  background: var(--maroon);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 0;
}

.reno-type-body { padding: 1.25rem 1.35rem 1.5rem; }
.reno-type-body h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}
.reno-type-body p { font-size: 0.92rem; color: var(--text-body); line-height: 1.6; }

/* =============================================================================
   BEFORE & AFTER
============================================================================= */
#before-after { background: var(--grey-50); }

.ba-header {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
}
.ba-header .eyebrow { justify-content: center; }
.ba-header h2 { margin-bottom: 0.85rem; }
.ba-header p {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.ba-header p svg { width: 1.1rem; height: 1.1rem; color: var(--maroon); }

/* ── Filter pills ─────────────────────────────────────────────────────── */
.ba-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}
.ba-filter {
  padding: 0.5rem 1.1rem;
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  border-radius: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-body);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
              color var(--transition), transform var(--transition);
}
.ba-filter:hover { border-color: var(--maroon-lt); transform: translateY(-1px); }
.ba-filter.is-active { background: var(--maroon); border-color: var(--maroon); color: var(--white); }

/* ── Slider grid ──────────────────────────────────────────────────────── */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
}
@media (min-width: 900px) { .ba-grid { grid-template-columns: repeat(2, 1fr); } }

.ba-card {
  background: var(--white);
  border: 1px solid var(--grey-200);
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.ba-card.is-hidden { display: none; }

/* ── The slider itself ────────────────────────────────────────────────── */
.ba-slider {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;            /* allow vertical page scroll, capture horizontal drag */
  background: var(--grey-200);
  outline: none;
}
.ba-slider:focus-visible { box-shadow: inset 0 0 0 3px var(--maroon-lt); }

.ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}
/* Before sits on top, clipped from the right by JS (starts at 50%) */
.ba-before { clip-path: inset(0 50% 0 0); z-index: 2; }
.ba-after  { z-index: 1; }

/* Corner labels */
.ba-tag {
  position: absolute;
  bottom: 0.85rem;
  z-index: 3;
  padding: 0.28rem 0.7rem;
  border-radius: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(10,10,10,0.6);
  backdrop-filter: blur(2px);
  pointer-events: none;
}
.ba-tag-before { left: 0.85rem; }
.ba-tag-after  { right: 0.85rem; background: var(--maroon); }

/* Divider line + handle */
.ba-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--white);
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}
.ba-handle {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--maroon);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.ba-handle svg { width: 0.9rem; height: 0.9rem; }

/* Caption under the slider */
.ba-cap { padding: 1.15rem 1.35rem 1.4rem; }
.ba-cap h3 { font-size: 1.25rem; margin-bottom: 0.3rem; }
.ba-cap p  { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }
.ba-cap .ba-cap-tag {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--maroon-lt);
}

/* =============================================================================
   CLOSING CTA BAND
============================================================================= */
.reno-cta {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  isolation: isolate;
}
.reno-cta-bg { position: absolute; inset: 0; z-index: -2; }
.reno-cta-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reno-cta::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(100deg, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.55) 55%, rgba(139,0,0,0.55) 100%);
}
.reno-cta-inner {
  padding: 3.5rem 1.5rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}
@media (min-width: 768px) { .reno-cta-inner { padding: 5rem 2rem; } }

.reno-cta-inner .eyebrow { justify-content: center; color: var(--maroon-lt); }
.reno-cta-inner h2 { color: var(--white); margin-bottom: 1rem; }
.reno-cta-inner p { color: rgba(255,255,255,0.85); margin: 0 auto 2rem; max-width: 52ch; }
.reno-cta-btns { display: flex; flex-wrap: wrap; gap: 0.85rem; justify-content: center; }
