.pool-repair-hub h1,
.pool-repair-hub h2,
.pool-repair-hub h3 {
  color: var(--bs-primary-text-emphasis);
  text-wrap: balance;
}

.pool-repair-hero h1,
.pool-repair-hero .pool-repair-intro,
.pool-repair-hub > section > h2,
.pool-repair-option h3 {
  text-align: center;
}

.pool-repair-hero-copy > .d-flex {
  justify-content: center;
}

.pool-repair-hub h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

/* Match the navy/photo product hero used by the maintained Pool Dome pages.
   Keep these repair-hub rules local instead of loading unrelated product CSS. */
.pool-repair-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--american-flag-blue);
  border-radius: 8px;
  background: var(--american-flag-blue);
  color: #fff;
}

.pool-repair-hero-copy {
  min-width: 0;
  padding: clamp(1.25rem, 2vw, 1.5rem);
  text-align: center;
}

.pool-repair-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 3vw, 2.65rem);
  font-weight: 800;
  line-height: 1.12;
  margin-bottom: 1rem;
}

.pool-repair-hero .pool-repair-intro {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
}

.pool-repair-hero .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  white-space: normal;
}

.pool-repair-hero-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pool-repair-hero-picture,
.pool-repair-picture {
  display: block;
  min-width: 0;
}

.pool-repair-hub .pool-repair-hero a:focus-visible {
  outline-color: #fff;
}

.pool-repair-hub {
  scroll-margin-top: 6rem;
  overflow-wrap: break-word;
}

.pool-repair-topics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: 1.5rem 0 2rem;
}

.pool-repair-topics a {
  justify-content: center;
  padding: .75rem;
  border: 1px solid #b8d1ef;
  border-radius: 6px;
  background: #e8f2ff;
  color: #0b4c93;
  text-align: center;
  text-decoration: none;
}

.pool-repair-topics a:hover {
  background: #d9eaff;
  color: #083f7c;
}

.pool-repair-topics a,
.pool-repair-next {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-block: .5rem;
  font-weight: 700;
  max-width: 100%;
  touch-action: manipulation;
}

.pool-repair-hub > section {
  margin-block: 1.5rem;
  scroll-margin-top: 6rem;
}

.pool-repair-hub > section > h2 {
  padding-bottom: .65rem;
  border-bottom: 3px solid #0f7f72;
  font-size: clamp(1.5rem, 2.25vw, 1.85rem);
  font-weight: 800;
}

.pool-repair-hub > section > p {
  max-width: 75ch;
  margin-inline: auto;
  text-align: center;
}

.pool-repair-option {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem;
  background: var(--bs-body-bg);
  border: 1px solid #b8d1ef;
  border-radius: .5rem;
  box-shadow: 0 2px 8px rgb(20 52 91 / 8%);
}

.pool-repair-option h3 {
  margin: -1rem -1rem 1rem;
  padding: 1rem;
  border-bottom: 1px solid #b8d1ef;
  border-radius: .5rem .5rem 0 0;
  background: #e8f2ff;
}

.pool-repair-body {
  /* Contain the photo while allowing description and fit text to wrap beneath it. */
  display: flow-root;
}

.pool-repair-body > .pool-repair-picture,
.pool-repair-media {
  float: right;
  width: min(46%, 280px);
  margin: 0 0 1rem 1rem;
}

.pool-repair-photo {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  padding: .375rem;
  border: 1px solid #b8d1ef;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 2px 6px rgb(20 52 91 / 10%);
}

.pool-repair-media {
  min-width: 0;
  text-align: center;
}

.pool-repair-media .pool-repair-photo {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
}

/* The original receiver-profile image is only 210px wide; do not enlarge it. */
.pool-repair-media .pool-repair-photo[width="210"] {
  max-width: 224px;
}

.pool-repair-media figcaption {
  margin-top: .375rem;
  font-size: .85rem;
  line-height: 1.35;
  color: var(--bs-primary-text-emphasis);
}

.pool-repair-option > .pool-repair-next {
  align-self: center;
  justify-content: center;
  text-align: center;
  margin-top: auto;
  margin-bottom: .5rem;
  padding: .65rem 1rem;
  border: 1px solid var(--american-flag-blue);
  border-radius: 6px;
  color: var(--american-flag-blue);
  text-decoration: none;
}

.pool-repair-option > .pool-repair-next:hover {
  background: var(--american-flag-blue);
  color: #fff;
}

.pool-repair-option dd {
  margin: .25rem 0 .75rem;
}

.pool-repair-hub a:focus-visible {
  outline: 3px solid var(--bs-primary);
  outline-offset: 3px;
}

@media (min-width: 992px) {
  /* Let the copy set the hero height, not the photo's intrinsic aspect ratio. */
  .pool-repair-hero-picture {
    position: relative;
  }

  .pool-repair-hero-photo {
    position: absolute;
    inset: 0;
  }
}

@media (max-width: 991.98px) {
  .pool-repair-hero {
    grid-template-columns: 1fr;
  }

  .pool-repair-hero-photo {
    height: auto;
    max-height: 320px;
  }

  .pool-repair-topics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .pool-repair-body {
    text-align: center;
  }

  .pool-repair-hero-photo {
    max-height: 240px;
  }

  .pool-repair-body > .pool-repair-picture,
  .pool-repair-media {
    float: none;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1rem;
  }
}
