/* =============================================================
   RDS Construction Group — Interior Page Styles
   Supplements styles.css (which handles global tokens + homepage)
   ============================================================= */

/* ------------------------------------------------------------------
   PAGE HERO — Split panel design
   Left: maroon panel with breadcrumb, H1, sub, actions
   Right: full photo at natural size — hero height follows the photo,
          no cropping, no object-fit cover.
   ------------------------------------------------------------------ */

.page-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  position: relative;
  align-items: stretch;
}

/* Left: maroon text panel — stretches to match photo height */
.page-hero-panel {
  background: var(--color-primary);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(5.5rem, 8vw, 8rem) clamp(var(--space-8), 5vw, var(--space-16)) clamp(var(--space-10), 6vw, var(--space-16));
  position: relative;
  z-index: 1;
  /* Ensure panel is at least tall enough for header clearance */
  min-height: clamp(380px, 50vh, 580px);
}

/* Ghost brand mark in left panel */
.page-hero-panel::before {
  content: '';
  position: absolute;
  top: -5%;
  right: -10%;
  width: 55%;
  aspect-ratio: 1;
  background: url('../assets/logos/rds-mark-white.png') center/contain no-repeat;
  opacity: 0.055;
  pointer-events: none;
}

.page-hero-eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  margin-bottom: var(--space-5);
}

.page-hero-eyebrow a {
  color: inherit;
  transition: color var(--transition-fast);
}

.page-hero-eyebrow a:hover { color: rgba(255,255,255,0.7); }

.page-hero-eyebrow .sep {
  margin-inline: var(--space-2);
  opacity: 0.35;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.5vw, 3.2rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--color-white);
  max-width: 20ch;
  margin-bottom: var(--space-5);
}

.page-hero-sub {
  font-size: var(--text-base);
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 44ch;
  margin-bottom: var(--space-8);
}

.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Right: photo — always visible in full, drives the row height */
.page-hero-photo {
  background: var(--color-primary);
  display: block;
  overflow: hidden;
  position: relative;
}

/* Thin maroon bleed so panels merge cleanly */
.page-hero-photo::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 32px;
  height: 100%;
  background: linear-gradient(to right, var(--color-primary), transparent);
  z-index: 1;
  pointer-events: none;
}

.page-hero-photo img {
  width: 100%;
  height: auto;       /* natural height — full photo visible */
  display: block;
  /* If panel is taller than photo, stretch to fill rather than leaving a gap */
  min-height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* No-photo fallback: full-width maroon */
.page-hero.page-hero-no-photo {
  grid-template-columns: 1fr;
}

.page-hero.page-hero-no-photo .page-hero-panel {
  min-height: auto;
  padding-top: clamp(5.5rem, 8vw, 8rem);
}

.page-hero.page-hero-no-photo .page-hero-panel::before {
  right: 5%;
  width: 300px;
  opacity: 0.08;
}

/* Responsive */
@media (max-width: 860px) {
  .page-hero {
    grid-template-columns: 1fr;
  }
  .page-hero-panel {
    min-height: auto;
    padding-top: clamp(5rem, 10vw, 7rem);
    padding-bottom: clamp(var(--space-8), 5vw, var(--space-12));
    justify-content: flex-end;
  }
  .page-hero-panel::before { display: none; }
  /* photo above text on mobile, constrained so it doesn't go enormous */
  .page-hero-photo {
    order: -1;
    max-height: 65vw;
    overflow: hidden;
  }
  .page-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
  }
  .page-hero-photo::before { display: none; }
}

/* ------------------------------------------------------------------
   BREADCRUMB
   ------------------------------------------------------------------ */
.breadcrumb {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-neutral);
  padding-block: var(--space-3);
}

.breadcrumb-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.breadcrumb-item {
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.03em;
}

.breadcrumb-item a {
  color: var(--color-accent);
  transition: color var(--transition-fast);
}

.breadcrumb-item a:hover { color: var(--color-primary); }

.breadcrumb-sep {
  font-size: var(--text-xs);
  color: var(--color-neutral-dark);
}

/* ------------------------------------------------------------------
   INTERIOR CONTENT LAYOUT
   ------------------------------------------------------------------ */
.interior-body {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-block: clamp(var(--space-12), 7vw, var(--space-20));
}

/* Two-column: content + sidebar */
.interior-cols {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: clamp(var(--space-10), 5vw, var(--space-16));
  align-items: start;
}

.interior-content h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
}

.interior-content h2:first-child { margin-top: 0; }

.interior-content h3 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.interior-content p {
  color: var(--color-ink-light);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.interior-content ul,
.interior-content ol {
  list-style: none;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.interior-content ul li,
.interior-content ol li {
  font-size: var(--text-base);
  color: var(--color-ink-light);
  line-height: 1.7;
  padding-left: var(--space-6);
  position: relative;
}

.interior-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 14px;
  height: 1px;
  background: var(--color-primary);
}

.interior-content ol {
  counter-reset: ol-counter;
}

.interior-content ol li {
  counter-increment: ol-counter;
}

.interior-content ol li::before {
  content: counter(ol-counter, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

/* ------------------------------------------------------------------
   SIDEBAR
   ------------------------------------------------------------------ */
.sidebar {
  position: sticky;
  top: calc(72px + var(--space-8));
}

.sidebar-card {
  background: var(--color-ink);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
}

.sidebar-card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.sidebar-card-body {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--space-6);
}

.sidebar-card .btn { width: 100%; justify-content: center; }

.sidebar-services-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--color-neutral);
}

.sidebar-services-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  font-size: var(--text-sm);
  color: var(--color-ink);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-services-list a:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

.sidebar-services-list a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.sidebar-services-list a::after {
  content: '→';
  font-size: var(--text-xs);
  opacity: 0.4;
}

.sidebar-services-list a.active::after { opacity: 0.7; }

/* ------------------------------------------------------------------
   SERVICE FEATURES GRID (used on service pages)
   ------------------------------------------------------------------ */
.service-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--color-neutral);
  margin-block: var(--space-10);
}

.service-feature {
  background: var(--color-white);
  padding: var(--space-6);
}

.service-feature-icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.service-feature-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-ink);
  margin-bottom: var(--space-2);
}

.service-feature-text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-ink-light);
}

/* ------------------------------------------------------------------
   BEFORE / AFTER SLIDER
   ------------------------------------------------------------------ */
.before-after-wrap {
  position: relative;
  overflow: hidden;
  user-select: none;
  cursor: col-resize;
}

.before-after-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.ba-after-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 50%;
}

.ba-after-img img {
  position: absolute;
  left: 0;
  top: 0;
  width: auto;
  height: 100%;
  min-width: 200%;
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--color-white);
  transform: translateX(-50%);
  z-index: 3;
}

.ba-handle-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  color: var(--color-ink);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: -1px;
}

.ba-label {
  position: absolute;
  bottom: var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-white);
  background: rgba(0,0,0,0.4);
  padding: var(--space-1) var(--space-3);
}

.ba-label-before { left: var(--space-4); }
.ba-label-after  { right: var(--space-4); }

/* ------------------------------------------------------------------
   LOCATION PAGE SPECIFICS
   ------------------------------------------------------------------ */
.location-intro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  padding-block: clamp(var(--space-12), 6vw, var(--space-20));
}

.location-map-embed {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}

.location-map-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(60%);
}

.location-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--color-neutral);
  margin-top: var(--space-8);
}

.location-service-item {
  background: var(--color-white);
  padding: var(--space-5) var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-ink);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.location-service-item:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

.location-service-item::before {
  content: '';
  width: 14px;
  height: 1px;
  background: var(--color-primary);
  flex-shrink: 0;
  transition: background var(--transition-fast);
}

.location-service-item:hover::before { background: rgba(255,255,255,0.5); }

/* ------------------------------------------------------------------
   CONTACT PAGE
   ------------------------------------------------------------------ */
.contact-split {
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: clamp(var(--space-10), 6vw, var(--space-20));
  align-items: start;
  padding-block: clamp(var(--space-12), 7vw, var(--space-20));
}

.contact-form-placeholder {
  border: 2px dashed var(--color-neutral);
  padding: var(--space-12);
  text-align: center;
}

.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.contact-info-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.contact-info-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-ink);
  line-height: 1.3;
}

.contact-info-value a {
  transition: color var(--transition-fast);
}

.contact-info-value a:hover { color: var(--color-primary); }

.contact-hours-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-1) var(--space-8);
}

.contact-hours-day {
  font-size: var(--text-sm);
  color: var(--color-ink-light);
}

.contact-hours-time {
  font-size: var(--text-sm);
  color: var(--color-ink);
  font-weight: 500;
  text-align: right;
}

/* ------------------------------------------------------------------
   ABOUT PAGE
   ------------------------------------------------------------------ */
.about-intro-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-10), 6vw, var(--space-16));
  align-items: center;
}

.about-photo-stack {
  position: relative;
  height: 520px;
}

.about-photo-main {
  position: absolute;
  top: 0;
  left: 0;
  width: 80%;
  height: 85%;
  overflow: hidden;
}

.about-photo-accent {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  height: 55%;
  overflow: hidden;
  border: 6px solid var(--color-white);
}

.about-photo-main img,
.about-photo-accent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-value-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.about-value-item {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-4);
  align-items: start;
}

.about-value-num {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  padding-top: 3px;
}

.about-value-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-ink);
  margin-bottom: var(--space-1);
}

.about-value-text {
  font-size: var(--text-sm);
  line-height: 1.75;
  color: var(--color-ink-light);
}

/* ------------------------------------------------------------------
   PROCESS PAGE
   ------------------------------------------------------------------ */
.process-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-timeline-step {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--space-8);
  padding-block: var(--space-10);
  border-top: 1px solid var(--color-neutral);
  position: relative;
}

.process-timeline-step:first-child { border-top: none; }

.process-timeline-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--color-neutral);
  line-height: 1;
  font-weight: 400;
}

.process-timeline-content h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.process-timeline-content p {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--color-ink-light);
  max-width: 56ch;
}

/* ------------------------------------------------------------------
   CASE STUDY
   ------------------------------------------------------------------ */
.case-study-hero-photo {
  width: 100%;
  aspect-ratio: 16/7;
  overflow: hidden;
  position: relative;
}

.case-study-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.case-study-meta-bar {
  background: var(--color-ink);
  padding-block: var(--space-8);
}

.case-study-meta-inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.case-study-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.case-study-meta-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

.case-study-meta-value {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-white);
}

.case-study-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-block: var(--space-10);
}

.case-study-photo-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

/* ------------------------------------------------------------------
   INTERIOR RESPONSIVE
   ------------------------------------------------------------------ */
@media (max-width: 960px) {
  .interior-cols { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .about-intro-split { grid-template-columns: 1fr; }
  .about-photo-stack { height: 320px; }
  .contact-split { grid-template-columns: 1fr; }
  .location-intro-split { grid-template-columns: 1fr; }
  .service-features { grid-template-columns: 1fr 1fr; }
  .case-study-photo-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .interior-cols { gap: var(--space-8); }
  .service-features { grid-template-columns: 1fr; }
  .location-services-grid { grid-template-columns: 1fr; }
  .case-study-meta-inner { gap: var(--space-6); }
  .case-study-photo-grid { grid-template-columns: 1fr; }
  .process-timeline-step { grid-template-columns: 48px 1fr; gap: var(--space-5); }
  .process-timeline-num { font-size: 2rem; }
}

/* ================================================================
   COLLAGE HERO VARIANT
   Inspired by editorial collage layouts — photos at varying scales
   on a dark field, headline running through them.
   Used on: kitchen-remodeling, bathroom-remodeling, about
   ================================================================ */

.page-hero-collage {
  background: var(--color-ink);
  position: relative;
  overflow: hidden;
  padding-top: 72px; /* header height */
  min-height: clamp(500px, 75vh, 780px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Photos placed absolutely at different scales and positions */
.phc-photo {
  position: absolute;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

.phc-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Photo A: large left, anchors the layout */
.phc-a {
  top: 0;
  left: 0;
  width: 34%;
  height: 100%;
}

/* Photo B: top-right, smaller portrait */
.phc-b {
  top: 5%;
  right: 3%;
  width: 18%;
  aspect-ratio: 3/4;
}

/* Photo C: mid-right, landscape offset down from B */
.phc-c {
  top: 40%;
  right: 22%;
  width: 24%;
  aspect-ratio: 4/3;
}

/* Photo D: bottom-right corner, portrait */
.phc-d {
  bottom: 0;
  right: 3%;
  width: 15%;
  aspect-ratio: 2/3;
}

/* Dark overlay on photo A so headline is readable over it */
.phc-a::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

/* Content: sits above photos via z-index */
.phc-content {
  position: relative;
  z-index: 5;
  padding: 0 var(--gutter) clamp(var(--space-10), 6vw, var(--space-16));
  max-width: var(--container-wide);
  margin-inline: auto;
  width: 100%;
}

/* Eyebrow */
.phc-eyebrow {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: var(--space-4);
}

.phc-eyebrow a { color: inherit; }
.phc-eyebrow a:hover { color: rgba(255,255,255,0.7); }
.phc-eyebrow .sep { margin-inline: var(--space-2); opacity: 0.4; }

/* Large headline — runs across the dark field */
.phc-headline {
  font-family: var(--font-display);
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--color-white);
  max-width: 14ch;
  margin-bottom: var(--space-6);
}

/* Sub text */
.phc-sub {
  font-size: var(--text-base);
  line-height: 1.7;
  color: rgba(255,255,255,0.5);
  max-width: 44ch;
  margin-bottom: var(--space-8);
}

/* Actions */
.phc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* Small stat/label pills next to the CTAs */
.phc-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255,255,255,0.12);
}

/* Maroon accent bar -- decorative horizontal rule */
.phc-rule {
  position: absolute;
  top: 50%;
  left: 33%;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--color-primary), transparent 60%);
  opacity: 0.6;
  z-index: 2;
  pointer-events: none;
}

/* Collage responsive */
@media (max-width: 900px) {
  .page-hero-collage { min-height: auto; padding-bottom: var(--space-10); }
  .phc-a { width: 45%; }
  .phc-b { display: none; }
  .phc-c { right: 2%; width: 30%; top: 30%; }
  .phc-d { display: none; }
  .phc-headline { font-size: clamp(2.5rem, 8vw, 4rem); }
}

@media (max-width: 600px) {
  .phc-a { display: none; }
  .phc-c { display: none; }
  .page-hero-collage { background: var(--color-primary); }
  .phc-headline { font-size: clamp(2.2rem, 9vw, 3rem); }
}
