/* Ridgeline — What We Treat. rem-only. */

.rl-wt {
  background: var(--rl-white, #ffffff);
  padding-top:    var(--wt-pt, 4.5rem);
  padding-bottom: var(--wt-pb, 4.5rem);
  margin-top:     var(--wt-mt, 0rem);
  margin-bottom:  var(--wt-mb, 0rem);
  /* Full-bleed */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.rl-wt__inner {
  max-width: 85rem;
  margin-inline: auto;
  padding-inline: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.rl-wt__intro {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rl-wt__heading {
  font-family: var(--rl-font-heading);
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--rl-navy);
  margin: 0rem;
}

.rl-wt__body {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.75rem;
  color: var(--rl-navy);
  margin: 0rem;
  max-width: 50rem;
}

/* ── Featured row: navy card + photo ── */
.rl-wt__featured {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.rl-wt__featured-card {
  position: relative;
  flex: 0 0 52.8125rem;
  max-width: 52.8125rem;
  aspect-ratio: 845 / 462;
  border-radius: 1rem;
  overflow: hidden;
}

.rl-wt__featured-bg {
  position: absolute;
  inset: 0rem;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.rl-wt__featured-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.rl-wt__featured-title {
  font-family: var(--rl-font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--rl-white, #ffffff);
  margin: 0rem;
  max-width: 40rem;
}

.rl-wt__featured-desc {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.61;
  color: var(--rl-white, #ffffff);
  margin: 0rem;
  max-width: 43.5rem;
}

.rl-wt__featured-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  align-self: flex-start;
  background: #fab529;
  color: var(--rl-navy);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.75rem 1.75rem;
  border-radius: 2.6875rem;
  text-decoration: none;
  margin-top: 0.5rem;
}

.rl-wt__featured-btn:hover,
.rl-wt__featured-btn:focus-visible { background: #000000; color: var(--rl-white, #ffffff); }

.rl-wt__featured-btn-arrow {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.rl-wt__featured-photo {
  flex: 1;
  min-width: 0rem;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 410 / 462;
}

.rl-wt__featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1rem;
}

/* ── 6-card specialty grid ── */
.rl-wt__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.rl-wt__card {
  background: #f4f4f4;
  border-radius: 1rem;
  padding: 2rem 1.8125rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ── Cards that link to a condition page ── */
.rl-wt__card--link {
  text-decoration: none;
  color: inherit;
  transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.rl-wt__card--link:hover {
  background: #eceef6;
  transform: translateY(-0.1875rem);
  box-shadow: 0rem 0.5rem 1.5rem rgba(14, 19, 68, 0.1);
}

.rl-wt__card--link:focus-visible {
  outline: 0.1875rem solid var(--rl-gold, #fab529);
  outline-offset: 0.125rem;
}

.rl-wt__card-more {
  margin-top: auto;
  padding-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: #182e96;
}

/* Arrow drawn in CSS — no extra image request, and it nudges on hover. */
.rl-wt__card-arrow {
  width: 0.4375rem;
  height: 0.4375rem;
  border-top: 0.125rem solid currentColor;
  border-right: 0.125rem solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s;
}

.rl-wt__card--link:hover .rl-wt__card-arrow { transform: rotate(45deg) translate(0.125rem, -0.125rem); }

@media (prefers-reduced-motion: reduce) {
  .rl-wt__card--link,
  .rl-wt__card-arrow { transition: none; }
  .rl-wt__card--link:hover { transform: none; }
}

.rl-wt__card-title {
  font-family: var(--rl-font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--rl-navy-deep);
  margin: 0rem;
}

.rl-wt__card-desc {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.61;
  color: var(--rl-navy);
  margin: 0rem;
}

/* ── Closing CTA ── */
.rl-wt__cta:hover { background: #000000; color: var(--rl-white, #ffffff); }

.rl-wt__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  align-self: center;
  background: #182e96;
  color: var(--rl-white, #ffffff);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.75rem 1.75rem;
  border-radius: 2.6875rem;
  text-decoration: none;
}

.rl-wt__cta-arrow {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

/* ── Tablet (≤1200px): stack featured card, then the specialty grid,
   then the photo last. The photo lives inside .rl-wt__featured (a sibling
   of .rl-wt__grid, not the same flex context), so .rl-wt__featured is
   unboxed via display:contents — this promotes the card and photo to be
   direct flex items of .rl-wt__inner, alongside the grid, so `order` can
   reorder all three together regardless of their original nesting. ── */
@media (max-width: 75rem) {
  .rl-wt__heading        { font-size: 2.75rem; }
  .rl-wt__intro          { order: 1; }
  .rl-wt__featured       { display: contents; }
  .rl-wt__featured-card  { order: 2; flex: 0 0 auto; max-width: 100%; width: 100%; }
  .rl-wt__grid           { order: 3; grid-template-columns: 1fr 1fr; }
  .rl-wt__featured-photo { order: 4; flex: 0 0 auto; width: 100%; aspect-ratio: 16 / 9; }
  .rl-wt__cta            { order: 5; }
}

/* ── Guaranteed single column at 767px and below (px-based,
   !important -- bypasses any ambiguity with the 75rem tablet rule) ── */
@media (max-width: 767px) {
  .rl-wt__grid { grid-template-columns: 1fr !important; }
}

/* ── Mobile (≤768px) ── */
@media (max-width: 48rem) {
  /* Block-to-block inside a section: site-wide 1.5rem mobile value. */
  .rl-wt .rl-wt__inner { row-gap: 1.5rem; }

  /* Mobile title->text rhythm, site-wide values. */
  .rl-wt .rl-wt__intro { row-gap: 1.25rem; }   /* heading -> body (was 1.5rem) */
  .rl-wt .rl-wt__featured-content { row-gap: 0.75rem; }   /* featured title -> desc (was 1rem) */

  .rl-wt__cta-arrow { display: none; }
  .rl-wt__featured-photo { aspect-ratio: 4 / 5; }
  .rl-wt__featured-btn { text-align: center; justify-content: center; }
  .rl-wt__featured-btn-arrow { display: none; }
  .rl-wt {
    padding-top:    var(--wt-pt-m, var(--wt-pt, 1.40625rem));
    padding-bottom: var(--wt-pb-m, var(--wt-pb, 1.40625rem));
    margin-top:     var(--wt-mt-m, var(--wt-mt, 0rem));
    margin-bottom:  var(--wt-mb-m, var(--wt-mb, 0rem));
  }
  .rl-wt__inner        { padding-inline: 1.25rem; gap: 2rem; }
  .rl-wt__heading      { font-size: 2.25rem; }
  .rl-wt__featured-title { font-size: 2rem; }
  .rl-wt__grid         { grid-template-columns: 1fr; }
  .rl-wt__cta          { width: 100%; }
  .rl-wt__featured-btn { width: 100%; }
  .rl-wt__featured-card { aspect-ratio: auto; }
}

/* ── 320px ── */
@media (max-width: 20rem) {
  .rl-wt__inner   { padding-inline: 0.75rem; }
  .rl-wt__heading { font-size: 1.75rem; }
}
