/* ============================================================
   Legacy Plumbing — Water Heaters Page Stylesheet
   Depends on homepage.css (tokens + base) and inner-pages.css
   (page-hero, breadcrumb, shared utilities).
============================================================ */

/* Real images in water heater type cards.
   Photos are mostly portrait, so show the whole picture (contain)
   over a blurred, darkened copy of itself — nothing gets cropped. */
.wh-type-card__photo-slot {
  position: relative;
  overflow: hidden;
  background: var(--blue-deep);
}

.wh-type-card__photo-slot::before {
  content: '';
  position: absolute;
  inset: -20px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(18px) brightness(.7);
}

/* Backdrop image per card (paths are relative to /css) */
#gas-tank-water-heaters .wh-type-card__photo-slot::before      { background-image: url('../images/wh-bradford-gas-tank-legacy-sticker.png'); }
#electric-tank-water-heaters .wh-type-card__photo-slot::before { background-image: url('../images/wh-indirect-tank-copper.png'); }
#tankless-water-heaters .wh-type-card__photo-slot::before      { background-image: url('../images/wh-navien-tankless-legacy-sticker.png'); }
#high-efficiency-water-heaters .wh-type-card__photo-slot::before { background-image: url('../images/wh-bradford-power-vent-legacy-sticker.png'); }

.wh-type-card__photo-slot img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ============================================================
   INTRO SECTION
============================================================ */
.wh-intro {
  padding: 56px 0 48px;
  background: #fff;
}

.wh-intro p {
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.85;
}

/* ============================================================
   SERVICE BLOCKS (Repair / Replacement / Tankless Upgrades)
   Light gray background, icon + copy side by side
============================================================ */
.wh-services-section {
  padding: 0 0 64px;
  background: #fff;
}

.wh-service-block {
  border-bottom: 1px solid var(--gray-mid);
  padding: 40px 0;
}

.wh-service-block:last-child {
  border-bottom: none;
}

.wh-service-block__content {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

/* Coloured icon circle */
.wh-service-block__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue-mid));
  box-shadow: 0 4px 14px rgba(30,58,79,.22);
  margin-top: 4px;
}

.wh-service-block__icon--teal {
  background: linear-gradient(135deg, var(--teal), var(--blue-bright));
  box-shadow: 0 4px 14px rgba(78,205,196,.25);
}

.wh-service-block__icon--orange {
  background: linear-gradient(135deg, var(--orange), var(--orange-warm));
  box-shadow: 0 4px 14px rgba(247,106,26,.25);
}

.wh-service-block__heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.375rem;
  font-weight: 800;
  color: var(--blue-deep);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--orange);
  display: inline-block;
}

.wh-service-block__text p {
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.82;
  margin-bottom: 16px;
}

.wh-service-block__text p:last-child {
  margin-bottom: 0;
}

/* Photo below the paragraph(s) inside each service block */
.wh-service-block__photo {
  margin-top: 28px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30,58,79,.12);
  max-height: 380px;
}

.wh-service-block__photo img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
  transition: transform .4s ease;
}

.wh-service-block__photo img:hover {
  transform: scale(1.02);
}

/* Two portrait job photos side by side inside a service block */
.wh-photo-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.wh-photo-pair figure {
  position: relative;
  margin: 0;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(30,58,79,.14);
  background: var(--blue-deep);
}

.wh-photo-pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}

.wh-photo-pair figure:hover img { transform: scale(1.03); }

.wh-photo-pair figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px 14px 11px;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(to top, rgba(9,26,38,.85), rgba(9,26,38,0));
}

/* ============================================================
   TYPES OF WATER HEATERS — section intro
============================================================ */
.wh-types-section {
  padding: 64px 0 72px;
  background: var(--gray-soft);
}

.wh-types-intro {
  margin-bottom: 48px;
  max-width: 860px;
}

.wh-types-intro__heading {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--blue-deep);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--orange);
  display: inline-block;
}

.wh-types-intro__body {
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.82;
  margin-top: 16px;
}

/* ============================================================
   TYPE CARDS GRID
   4 cards with photos (2-col desktop)
   centered full-width
============================================================ */
.wh-types-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ============================================================
   INDIVIDUAL TYPE CARD
============================================================ */
.wh-type-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--gray-mid);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  transition: border-color .22s, transform .22s, box-shadow .22s;
}

.wh-type-card:hover {
  border-color: var(--blue-mid);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(30,58,79,.13);
}

/* Photo slot at top of card */
.wh-type-card__photo-slot {
  height: 360px;
  flex-shrink: 0;
}

.wh-type-card__photo-slot .photo-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(145deg, #091a26 0%, var(--blue-deep) 50%, var(--blue-mid) 100%);
  color: rgba(255,255,255,.5);
  font-size: .9375rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* Card body */
.wh-type-card__body {
  padding: 28px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

/* Small icon badge inside card body */
.wh-type-card__icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.15);
  flex-shrink: 0;
  margin-bottom: 4px;
}

.wh-type-card__title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--blue-deep);
  line-height: 1.3;
}

.wh-type-card__body p {
  font-size: .9625rem;
  color: #374151;
  line-height: 1.75;
  margin: 0;
}

/* Legacy fallback — no longer used now all cards have photos */
.wh-type-card--no-photo {
  grid-column: auto;
  max-width: none;
  margin: 0;
  width: auto;
}

/* ============================================================
   WHICH WATER HEATER IS RIGHT FOR YOUR HOME?
============================================================ */
.wh-right-choice-section {
  padding: 64px 0;
  background: #fff;
}

.wh-right-choice-section__heading {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.35rem, 2.8vw, 1.875rem);
  font-weight: 900;
  color: var(--blue-deep);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--orange);
  display: inline-block;
}

.wh-right-choice-section p {
  font-size: 1.0625rem;
  color: #374151;
  line-height: 1.85;
  margin-top: 16px;
}

/* ============================================================
   BOTTOM CTA SECTION
============================================================ */
.wh-cta-section {
  background: linear-gradient(135deg, #091a26 0%, var(--blue-deep) 55%, var(--blue-mid) 100%);
  padding: 64px 0;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.wh-cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.wh-cta-section .container { position: relative; z-index: 1; }

.wh-cta-section__text {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.25rem, 2.6vw, 1.875rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.45;
  margin-bottom: 36px;
}

.wh-cta-section__phone {
  color: var(--orange-warm);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color .2s;
}

.wh-cta-section__phone:hover { color: #fff; }

.wh-cta-section__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============================================================
   HOW WATER HEATERS WORK — INFOGRAPHIC SECTION
============================================================ */
.wh-infographic-section {
  padding: 72px 0 80px;
  background: var(--gray-soft, #f4f6f9);
}

.wh-infographic-header {
  text-align: center;
  margin-bottom: 48px;
}

.wh-infographic__heading {
  font-family: 'Montserrat', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue-deep, #1a4fa0);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}

.wh-infographic__sub {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #4b5563;
  max-width: 600px;
  margin: 0 auto;
}

.wh-infographic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.wh-infographic-card {
  margin: 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(26, 79, 160, 0.10);
  border: 2px solid var(--gray-mid, #e2e8f0);
  transition: box-shadow 0.25s, transform 0.25s;
}

.wh-infographic-card:hover {
  box-shadow: 0 12px 40px rgba(26, 79, 160, 0.16);
  transform: translateY(-3px);
}

.wh-infographic-card img {
  width: 100%;
  height: auto;
  display: block;
}

.wh-infographic-card__caption {
  display: block;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--blue-deep, #1a4fa0);
  padding: 14px 16px 16px;
  background: #fff;
  border-top: 2px solid var(--gray-mid, #e2e8f0);
  letter-spacing: 0.01em;
}

/* ============================================================
   RESPONSIVE
============================================================ */

/* Tablet */
@media (max-width: 900px) {
  .wh-types-section { padding: 48px 0 56px; }
  .wh-types-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .wh-type-card__photo-slot { height: 320px; }
  .wh-type-card__body { padding: 20px 18px 18px; }
  .wh-service-block { padding: 32px 0; }
  .wh-service-block__icon { width: 52px; height: 52px; }
  .wh-infographic-section { padding: 56px 0 64px; }
  .wh-infographic__heading { font-size: 1.75rem; }
  .wh-infographic-grid { gap: 24px; }
}

/* Mobile — single column */
@media (max-width: 640px) {
  .wh-intro { padding: 40px 0 36px; }
  .wh-services-section { padding: 0 0 48px; }
  .wh-types-section { padding: 40px 0 48px; }
  .wh-infographic-section { padding: 44px 0 52px; }
  .wh-infographic__heading { font-size: 1.5rem; }
  .wh-infographic__sub { font-size: 0.9375rem; }
  .wh-infographic-grid { grid-template-columns: 1fr; gap: 20px; }
  .wh-right-choice-section { padding: 48px 0; }
  .wh-cta-section { padding: 48px 0; }

  .wh-service-block__content {
    flex-direction: column;
    gap: 16px;
  }

  .wh-service-block__icon {
    width: 48px; height: 48px;
    margin-top: 0;
  }

  .wh-types-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .wh-type-card--no-photo {
    max-width: 100%;
  }

  .wh-type-card__photo-slot { height: 340px; }
  .wh-photo-pair { gap: 12px; }

  .wh-cta-section__text { font-size: 1.125rem; }
  .wh-cta-section__actions { flex-direction: column; align-items: center; }
}

@media (max-width: 480px) {
  .wh-intro p,
  .wh-service-block__text p,
  .wh-types-intro__body,
  .wh-right-choice-section p { font-size: 1rem; }

  .wh-service-block__heading { font-size: 1.2rem; }
  .wh-type-card__title { font-size: 1rem; }
}
