/* =============================================================
   Residential page styles
   Loaded AFTER css/modern.css. All `.r-*` classes are scoped
   to residential.html.
   ============================================================= */


/* ─── Split (image | copy, copy | image) ─── */
.r-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.r-split--reverse > :first-child { order: 2; }
.r-split__copy { display: flex; flex-direction: column; gap: 20px; }
/* Header inside .r-split__copy: remove margin-bottom so the parent's
   20px gap controls spacing between header and lede (cleaner rhythm). */
.r-split__copy .m-section__header { margin-bottom: 0; }
.r-split__divider {
  width: 56px;
  height: 3px;
  background: var(--m-primary);
  border: 0;
  margin: 0;
}
.r-split__lede {
  font-size: 17px;
  line-height: 1.6;
  color: var(--m-text-muted);
  margin: 0;
}
.r-split__media img {
  width: 100%;
  height: auto;
  border-radius: var(--m-radius-md);
  box-shadow: var(--m-shadow-md);
  display: block;
}

/* ─── Materials (3-up cards) ─── */
.r-materials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.r-material {
  background: var(--m-bg);
  border: 0;
  border-radius: var(--m-radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.r-material__icon {
  width: 56px;
  height: 56px;
  background: var(--m-bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.r-material__icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.r-material__icon i {
  font-size: 22px;
  color: var(--m-primary);
}
.r-material__title {
  font-family: var(--m-font-heading);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: -0.3px;
  color: var(--m-text);
  margin: 0;
  line-height: 1.2;
}
.r-material__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--m-text-muted);
  margin: 0;
}

/* ─── Process (8 steps, 4×2 grid) ─── */
.r-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.r-step {
  background: var(--m-bg);
  border: 0;
  border-radius: var(--m-radius-md);
  padding: 32px 24px;
  position: relative;
}
.r-step__num {
  font-family: var(--m-font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--m-primary);
  opacity: 0.4;
  margin-bottom: 12px;
}
.r-step__title {
  font-family: var(--m-font-heading);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.2px;
  color: var(--m-text);
  margin: 0 0 8px;
  line-height: 1.2;
}
.r-step__desc {
  font-size: 13px;
  line-height: 1.5;
  color: var(--m-text-muted);
  margin: 0;
}

/* ─── CTA strip (dark green, conversion band) ─── */
.r-cta-strip {
  background: var(--m-text);
  color: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}
/* Fallback: when Elementor widget emits r-cta-strip__inner without
   the r-cta-strip wrapper, apply the dark background directly. */
.r-cta-strip__inner:not(.r-cta-strip .r-cta-strip__inner) {
  background: var(--m-text);
  color: #fff;
  padding: 80px 32px 0;
  border-radius: var(--m-radius-lg);
  text-align: center;
}
.r-cta-strip__inner {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.r-cta-strip__lede {
  font-size: 18px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  max-width: 540px;
}
.r-cta-strip__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
.m-cta--ghost-light {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}
.m-cta--ghost-light:hover {
  background: #fff;
  color: var(--m-text);
  border-color: #fff;
}
.r-cta-strip__perks {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  justify-content: center;
}
.r-cta-strip__perks li {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: var(--m-radius-md);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.r-cta-strip__perks li::before {
  content: "→";
  color: var(--m-accent);
  margin-right: 6px;
  font-weight: 700;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .r-split,
  .r-split--reverse {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .r-split--reverse > :first-child { order: 0; }
  .r-materials { grid-template-columns: 1fr; }
  .r-process { grid-template-columns: repeat(2, 1fr); }
  .r-cta-strip__perks {
    flex-wrap: wrap;
    max-width: 420px;
  }
}
@media (max-width: 500px) {
  .r-process { grid-template-columns: 1fr; }
}

/* Process section (bfe0f143, dark) — gradient bg + dark cards + white text.
   Matches Home review/testimonials dark band with radial green accent.
   Anchored to the section's stable data-id because Elementor doesn't
   always render `css_classes` to the DOM. */
.elementor-element-bfe0f143 {
  background:
    radial-gradient(ellipse at top right, rgba(26, 122, 62, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at bottom left, rgba(201, 169, 110, 0.10) 0%, transparent 60%),
    #0E1410 !important;
}
.elementor-element-bfe0f143 .r-step {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-sizing: border-box !important;
  padding: 32px 24px !important;
}
.elementor-element-bfe0f143 .r-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--m-shadow-md);
  border-color: transparent !important;
}
.elementor-element-bfe0f143 .r-step__title {
  color: #fff !important;
}
.elementor-element-bfe0f143 .r-step__desc {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ============================================================================
   Responsive — section vertical padding + e-con-inner horizontal padding
   Mirrors home page pattern. Elementor emits inline --padding-top/bottom
   and inline padding on the inner container; CSS vars + !important win.
   ============================================================================ */

/* Section vertical padding 50px on mobile (was 100px). Covers all 7
   container sections of the residential page (intro, storm, cta-strip,
   materials, cta-mid, process, faq). The gallery section (rb80000)
   keeps 100px top because it leads into the photo grid edge-to-edge. */
@media (max-width: 767px) {
  .elementor-element-rb20000,
  .elementor-element-rb30000,
  .elementor-element-rb40000,
  .elementor-element-rb50000,
  .elementor-element-rb60000,
  .elementor-element-rb70000,
  .elementor-element-rb90000 {
    --padding-top: 50px;
    --padding-bottom: 50px;
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }
  /* e-con-inner horizontal padding 24px on mobile (flush headings) */
  .elementor-element-rb20000 .e-con-inner,
  .elementor-element-rb30000 .e-con-inner,
  .elementor-element-rb40000 .e-con-inner,
  .elementor-element-rb50000 .e-con-inner,
  .elementor-element-rb60000 .e-con-inner,
  .elementor-element-rb70000 .e-con-inner,
  .elementor-element-rb90000 .e-con-inner {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  /* Gallery section: only the e-con-inner padding (top still 100px for
     the photo band). Gallery cell grid handles its own edge-to-edge. */
  .elementor-element-rb80000 {
    --padding-top: 50px;
    --padding-bottom: 0;
    padding-top: 50px !important;
    padding-bottom: 0 !important;
  }
  .elementor-element-rb80000 .e-con-inner {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

/* Desktop: e-con-inner padding 40px on ≥1024px viewports (matches home) */
@media (min-width: 1024px) {
  .elementor-element-rb20000 .e-con-inner,
  .elementor-element-rb30000 .e-con-inner,
  .elementor-element-rb40000 .e-con-inner,
  .elementor-element-rb50000 .e-con-inner,
  .elementor-element-rb60000 .e-con-inner,
  .elementor-element-rb70000 .e-con-inner,
  .elementor-element-rb80000 .e-con-inner,
  .elementor-element-rb90000 .e-con-inner {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

/* Gallery: 1 col on mobile (≤500px) — 8 cells in single column.
   Mirror of home's rule in modern.css; explicit here so style.css's
   earlier 767→2col doesn't win the cascade. */
@media (max-width: 500px) {
  .m-gallery {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    row-gap: 0 !important;
  }
  .m-gallery__cell { margin: 0 !important; }
}
