.cw-page-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--cw-dark-evergreen);
  color: var(--cw-white);
}

.cw-page-hero--slider {
  height: calc(100svh - var(--cw-site-header-height, 145px));
  min-height: 520px;
}

.cw-page-hero--static {
  height: clamp(320px, 32.3vw, 620px);
}

.cw-page-hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

.cw-page-hero__slide.is-active {
  z-index: 1;
  opacity: 1;
  pointer-events: auto;
}

.cw-page-hero__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cw-page-hero__shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 20, 12, 0.17);
}

.cw-page-hero__content {
  position: absolute;
  z-index: 2;
  inset: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 48px 96px;
  text-align: center;
}

.cw-page-hero__content h1 {
  width: 100%;
  max-width: min(1080px, calc(100vw - 120px));
  margin: 0;
  color: var(--cw-white);
  font-family: var(--font-heading);
  font-size: clamp(44px, 4.3vw, 70px);
  font-weight: 300;
  line-height: 1.05;
  overflow-wrap: anywhere;
  white-space: normal;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.3);
}

.cw-page-hero__arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 58px;
  height: 70px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.cw-page-hero__arrow--prev { left: 28px; }
.cw-page-hero__arrow--next { right: 28px; }
.cw-page-hero__arrow span {
  display: block;
  width: 26px;
  height: 26px;
  margin: auto;
  border-top: 2px solid var(--cw-white);
  border-right: 2px solid var(--cw-white);
}
.cw-page-hero__arrow--prev span { transform: rotate(-135deg); }
.cw-page-hero__arrow--next span { transform: rotate(45deg); }

.cw-page-hero__dots {
  position: absolute;
  z-index: 3;
  bottom: 24px;
  left: 50%;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.cw-page-hero__dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.cw-page-hero__dots button.is-active { background: var(--cw-white); }

@media (max-width: 960px) {
  .cw-page-hero--slider { min-height: 430px; }
  .cw-page-hero--static { height: clamp(280px, 48vw, 460px); }
}

@media (max-width: 560px) {
  .cw-page-hero--slider { min-height: 360px; }
  .cw-page-hero--static { height: 270px; }
  .cw-page-hero__content { padding: 40px 60px; }
  .cw-page-hero__content h1 {
    max-width: min(250px, calc(100vw - 120px));
    font-size: clamp(27px, 8vw, 32px);
    word-break: break-word;
  }
  .cw-page-hero__arrow { width: 40px; }
  .cw-page-hero__arrow--prev { left: 4px; }
  .cw-page-hero__arrow--next { right: 4px; }
  .cw-page-hero__arrow span { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .cw-page-hero__slide { transition-duration: 1ms; }
}

/* Keep every page hero caption typographically identical to the Home hero. */
.cw-page-hero__content {
  padding: 48px;
}

.cw-page-hero__content h1 {
  width: auto;
  max-width: 820px;
  font-family: var(--font-heading);
  font-size: 64px;
  font-weight: 400;
  line-height: 1.18;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

@media (max-width: 1439px) {
  .cw-page-hero__content h1 {
    max-width: 760px;
    font-size: 56px;
  }
}

@media (max-width: 1199px) {
  .cw-page-hero__content h1 {
    font-size: 48px;
  }
}

@media (max-width: 767px) {
  .cw-page-hero__content {
    padding: 34px 54px;
  }

  .cw-page-hero__content h1 {
    max-width: min(620px, calc(100vw - 108px));
    font-size: 34px;
    line-height: 1.15;
  }
}

@media (max-width: 480px) {
  .cw-page-hero__content {
    padding-inline: 46px;
  }

  .cw-page-hero__content h1 {
    max-width: min(298px, calc(100vw - 92px));
    font-size: 29px;
  }
}

@media (max-width: 380px) {
  .cw-page-hero__content h1 {
    font-size: 26px;
  }
}

/* Approved caption typography for every shared hero slider. */
.cw-page-hero--slider .cw-page-hero__content {
  padding-inline: 90px;
}

.cw-page-hero--slider .cw-page-hero__content h1 {
  width: 100%;
  max-width: 1400px;
  font-family: var(--font-heading);
  font-size: clamp(58px, 5vw, 96px);
  font-weight: 700;
  line-height: 1.04;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.36);
}

@media (min-width: 1025px) {
  .cw-page-hero--slider .cw-page-hero__content h1 {
    font-size: clamp(46px, 4vw, 77px);
  }
}

@media (max-width: 767px) {
  .cw-page-hero--slider .cw-page-hero__content {
    padding-inline: 44px;
  }

  .cw-page-hero--slider .cw-page-hero__content h1 {
    max-width: 640px;
    font-size: clamp(34px, 9vw, 46px);
    line-height: 1.08;
  }
}

@media (max-width: 480px) {
  .cw-page-hero--slider .cw-page-hero__content h1 {
    max-width: calc(100vw - 76px);
    font-size: clamp(30px, 9vw, 38px);
  }
}
