.rlv-gallery {
  padding-block: clamp(2rem, 3vw, 2.5rem) 1rem;
  background: #f3f6ef;
}

body:has(.project-hero__logo img[src="/images/rede-lagoas-vivas-logo.png"]) .rlv-gallery + .project-detail {
  padding-top: clamp(1.5rem, 3vw, 2rem);
}

.rlv-gallery__carousel {
  width: min(100%, 66rem);
  margin-inline: auto;
}

.rlv-gallery__stage {
  position: relative;
  display: grid;
  height: auto;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  touch-action: pan-y;
}

.rlv-gallery__slide {
  position: absolute;
  inset: 0;
  display: grid;
  margin: 0;
  padding: 0;
  place-items: center;
  animation: rlv-gallery-appear 420ms ease both;
}

.rlv-gallery__slide[hidden] {
  display: none;
}

.rlv-gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  object-fit: contain !important;
  object-position: center !important;
}

.rlv-gallery__controls {
  display: grid;
  grid-template-columns: auto minmax(5rem, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 1.15rem 0.25rem 0;
}

.rlv-gallery__navigation {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rlv-gallery__button {
  display: inline-grid;
  width: 2.85rem;
  height: 2.85rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(17, 44, 71, 0.14);
  border-radius: 50%;
  color: #173d3c;
  background: #fff;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.rlv-gallery__button:hover {
  transform: translateY(-1px);
  border-color: #8fc24c;
  color: #112c47;
  background: #eaf3dc;
}

.rlv-gallery__button:focus-visible {
  outline: 3px solid #006be0;
  outline-offset: 3px;
}

.rlv-gallery__button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.rlv-gallery__count {
  min-width: 4.1rem;
  color: #173d3c;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.rlv-gallery__count span:last-child {
  color: #718277;
  font-weight: 500;
}

.rlv-gallery__progress {
  height: 0.3rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 44, 71, 0.12);
}

.rlv-gallery__progress span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #8fc24c, #59b9dd);
  transform: scaleX(0.045);
  transform-origin: left center;
  transition: transform 280ms ease;
}

.rlv-gallery__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.rlv-video-section {
  padding-block: 2rem;
  background: #f3f6ef;
}

body:has(.project-hero__logo img[src="/images/rede-lagoas-vivas-logo.png"]) .project-detail {
  padding-bottom: 2rem;
}

body:has(.rlv-video-section) .rlv-video-section + .site-footer {
  padding-top: 2rem;
}

.rlv-video-section .container {
  display: grid;
  gap: 2rem;
}

.rlv-video-copy {
  display: grid;
  align-content: center;
  gap: 1rem;
  max-width: 42rem;
}

.rlv-video-copy__eyebrow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #527448;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rlv-video-copy__eyebrow::before {
  width: 1.7rem;
  height: 2px;
  border-radius: 999px;
  background: #8fc24c;
  content: "";
}

.rlv-video-copy h2 {
  max-width: 16ch;
  color: #234125;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.rlv-video-copy p {
  max-width: 38rem;
  color: rgba(35, 65, 37, 0.78);
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.7;
}

.rlv-video {
  display: block;
  justify-self: center;
  width: min(100%, 28rem, 43.875vh);
  max-height: 78vh;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(17, 44, 71, 0.14);
  border-radius: 0;
  background: #102d43;
  box-shadow: 0 1.25rem 3.5rem rgba(17, 44, 71, 0.12);
  object-fit: contain;
}

@media (min-width: 52rem) {
  .rlv-video-section .container {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 28rem);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 6rem);
  }
}

@keyframes rlv-gallery-appear {
  from { opacity: 0.65; }
  to { opacity: 1; }
}

@media (max-width: 42rem) {
  .rlv-gallery {
    padding-top: 1.25rem;
    padding-bottom: 1rem;
  }

  .rlv-gallery__stage {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .rlv-gallery__controls {
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 0.85rem;
    padding-top: 1rem;
  }

  .rlv-gallery__navigation {
    justify-content: center;
  }

  .rlv-gallery__button {
    width: 2.75rem;
    height: 2.75rem;
  }

  .rlv-gallery__progress {
    grid-row: 1;
  }

  .rlv-video-section {
    padding-block: 1.25rem;
  }

  body:has(.project-hero__logo img[src="/images/rede-lagoas-vivas-logo.png"]) .project-detail {
    padding-bottom: 1.25rem;
  }

  body:has(.rlv-video-section) .rlv-video-section + .site-footer {
    padding-top: 1.25rem;
  }

  .rlv-video {
    width: min(100%, 43.875vh);
    max-height: 78vh;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rlv-gallery__slide {
    animation: none;
  }

  .rlv-gallery__button,
  .rlv-gallery__progress span {
    transition: none;
  }
}

.rlv-image-band {
  height: clamp(12rem, 39vw, 42rem);
  margin: 0;
  overflow: hidden;
}

.rlv-image-band img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 42rem) {
  .rlv-image-band {
    height: clamp(13rem, 58vw, 18rem);
  }

  .rlv-image-band img {
    object-position: 52% center;
  }
}

.rlv-detail-image-band {
  width: 100%;
  height: clamp(12rem, 39vw, 42rem);
  margin-block: clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}

.rlv-detail-image-band img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 42rem) {
  .rlv-detail-image-band {
    height: clamp(13rem, 58vw, 18rem);
  }

  .rlv-detail-image-band img {
    object-position: 52% center;
  }
}
