/* ============================================================
   Cleanbios homepage hero carousel
   Full-bleed slide imagery + left copy with gradient scrims and panel.
   ============================================================ */

/* --- 1. Carousel container: fixed height, contained frame --- */

.u-block-54bc-1 {
  height: 640px;
  overflow: hidden;
  position: relative;
  background: #001f3f;
}

.u-block-54bc-1 .u-carousel-inner {
  height: 640px;
  overflow: hidden;
  position: relative;
}

.u-block-54bc-1 .u-carousel-item {
  height: 640px;
  overflow: hidden;
}

/* --- 2. Slide: base + full-bleed photo layer --- */

.hero-slide {
  position: relative;
  background-color: #001f3f;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(0, 31, 63, 0.9) 0%,
    rgba(0, 31, 63, 0.8) 28%,
    rgba(0, 31, 63, 0.56) 52%,
    rgba(0, 31, 63, 0.2) 74%,
    rgba(0, 31, 63, 0.08) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Full-bleed image fills the slide; copy stays left with scrims for contrast */
.hero-slide-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-slide-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-slide--fullbleed {
  background-color: #001f3f;
}

/* Layer 1: strong navy wash on the left (where type sits), opening up toward the right */
.hero-slide--fullbleed::before {
  background: linear-gradient(
    90deg,
    rgba(0, 31, 63, 0.96) 0%,
    rgba(0, 31, 63, 0.92) 18%,
    rgba(0, 31, 63, 0.74) 42%,
    rgba(0, 31, 63, 0.38) 63%,
    rgba(0, 31, 63, 0.14) 80%,
    rgba(0, 31, 63, 0.04) 100%
  );
}

/* Layer 2: slight top shadow so bright skies do not flatten headline contrast */
.hero-slide--fullbleed::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    transparent 42%
  );
}

/* Readable panel: frosted strip behind copy (fallback is solid rgba if blur unsupported) */
.hero-slide--fullbleed .hero-slide-panel {
  position: relative;
  z-index: 2;
  max-width: min(640px, 100%);
  padding: 1.35rem 1.5rem;
  border-radius: 0;
  background: rgba(0, 31, 63, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .hero-slide--fullbleed .hero-slide-panel {
    background: rgba(0, 31, 63, 0.38);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}

.hero-slide--fullbleed .hero-slide-title {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.hero-slide--fullbleed .hero-slide-title .hero-accent {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-slide--fullbleed .hero-slide-text {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
  color: rgba(255, 255, 255, 0.95);
}

/* --- 3. Frame: centered, max-width, holds the panel --- */

.hero-slide-frame {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 40px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

/* --- 4. Panel: single shared content box --- */

.hero-slide-panel {
  width: min(620px, 100%);
}

.hero-slide-eyebrow {
  margin: 0 0 12px;
  font-family: var(--cb-font-display) !important;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5dade2;
}

.hero-slide-title,
.u-block-54bc-1 .hero-slide h1,
.u-block-54bc-1 .hero-slide h2 {
  margin: 0 0 14px;
  font-family: var(--cb-font-display) !important;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.005em;
}

.hero-slide-title .hero-accent {
  color: #5dade2;
  font-weight: 700;
}

.hero-slide-text {
  margin: 0 0 22px;
  font-family: var(--cb-font-body) !important;
  font-size: 1rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
  max-width: 56ch;
}

/* --- 5. CTAs: identical styling across all slides --- */

.hero-slide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-slide-btn {
  display: inline-block;
  padding: 12px 22px;
  font-family: var(--cb-font-body) !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
  transition: background-color 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
  border: 1px solid transparent;
}

.hero-slide-btn-primary {
  background: #3498db;
  border-color: #3498db;
  color: #ffffff;
}

.hero-slide-btn-primary:hover,
.hero-slide-btn-primary:focus {
  background: #5dade2;
  border-color: #5dade2;
  color: #001f3f;
  outline: none;
}

.hero-slide-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
  color: #ffffff;
}

.hero-slide-btn-ghost:hover,
.hero-slide-btn-ghost:focus {
  border-color: #5dade2;
  color: #5dade2;
  outline: none;
}

/* --- 6. Carousel controls: visible on dark imagery --- */

.u-block-54bc-1 .u-carousel-control.u-absolute-vcenter {
  bottom: auto !important;
  top: 50% !important;
  transform: translateY(-50%);
}

.u-block-54bc-1 .u-carousel-control {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background-color 0.2s ease, color 0.2s ease;
  opacity: 1;
}

/* Nicepage uses 100%×100% spans; nested flex centers the chevron inside the circle */
.u-block-54bc-1 .u-carousel-control > span:first-child {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.u-block-54bc-1 .u-carousel-control svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  fill: currentColor;
  vertical-align: middle;
}

.u-block-54bc-1 .u-carousel-control:hover,
.u-block-54bc-1 .u-carousel-control:focus {
  background: rgba(52, 152, 219, 0.92);
  color: #ffffff;
  outline: none;
}

.u-block-54bc-5 {
  left: 16px;
  right: auto;
}

.u-block-54bc-6 {
  right: 16px;
  left: auto;
}

/* --- 7. Indicator dots: visible, accessible --- */

.u-block-54bc-1 .u-carousel-indicators {
  bottom: 18px;
  z-index: 5;
  margin: 0;
}

.u-block-54bc-1 .u-carousel-indicators li {
  width: 10px;
  height: 10px;
  margin: 0 5px;
  border-radius: 0;
  background-color: rgba(255, 255, 255, 0.45);
  border: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.u-block-54bc-1 .u-carousel-indicators li:hover {
  background-color: rgba(255, 255, 255, 0.85);
}

.u-block-54bc-1 .u-carousel-indicators li.u-active {
  background-color: #3498db;
  transform: scale(1.15);
}

/* --- 8. Override leftover Nicepage section rules --- */

.u-section-1-1,
.u-section-1-2,
.u-section-1-3,
.u-section-1-5,
.u-section-1-6 {
  background-image: none !important;
  min-height: 0 !important;
}

.u-section-1-1 .u-sheet-1,
.u-section-1-2 .u-sheet-1,
.u-section-1-3 .u-sheet-1,
.u-section-1-5 .u-sheet-1,
.u-section-1-6 .u-sheet-1,
.u-section-1-1 .u-group-1,
.u-section-1-2 .u-group-1,
.u-section-1-3 .u-group-1,
.u-section-1-5 .u-group-1,
.u-section-1-6 .u-group-1 {
  display: none !important;
}

/* --- 9. Tablet breakpoint: reduced hero height --- */

@media (max-width: 991px) {
  .u-block-54bc-1,
  .u-block-54bc-1 .u-carousel-inner,
  .u-block-54bc-1 .u-carousel-item {
    height: 560px;
  }

  .hero-slide-frame {
    padding: 28px 32px;
  }

  .hero-slide-title {
    font-size: 1.7rem;
  }

  .hero-slide-text {
    font-size: 0.95rem;
  }

  .hero-slide::before {
    background: linear-gradient(
      90deg,
      rgba(0, 31, 63, 0.9) 0%,
      rgba(0, 31, 63, 0.78) 42%,
      rgba(0, 31, 63, 0.5) 70%,
      rgba(0, 31, 63, 0.24) 100%
    );
  }

  /* Narrower viewports: keep text readable with a stronger overall wash */
  .hero-slide--fullbleed::before {
    background: linear-gradient(
      90deg,
      rgba(0, 31, 63, 0.94) 0%,
      rgba(0, 31, 63, 0.88) 34%,
      rgba(0, 31, 63, 0.64) 60%,
      rgba(0, 31, 63, 0.34) 82%,
      rgba(0, 31, 63, 0.12) 100%
    );
  }

  .hero-slide--fullbleed::after {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.38) 0%,
      transparent 48%
    );
  }

  .hero-slide--fullbleed .hero-slide-panel {
    padding: 1.2rem 1.35rem;
    max-width: 100%;
  }
}

/* --- 10. Mobile breakpoint: compact hero height --- */

@media (max-width: 575px) {
  .u-block-54bc-1,
  .u-block-54bc-1 .u-carousel-inner,
  .u-block-54bc-1 .u-carousel-item {
    height: 520px;
  }

  .hero-slide-frame {
    padding: 20px 18px;
    align-items: flex-end;
  }

  /* Copy sits low on small screens: darken bottom + stronger panel */
  .hero-slide--fullbleed::before {
    background: linear-gradient(
      180deg,
      rgba(0, 31, 63, 0.28) 0%,
      rgba(0, 31, 63, 0.66) 46%,
      rgba(0, 31, 63, 0.92) 100%
    );
  }

  .hero-slide--fullbleed::after {
    background: linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.45) 0%,
      transparent 55%
    );
  }

  .hero-slide--fullbleed .hero-slide-panel {
    padding: 1rem 1.15rem;
    background: rgba(0, 31, 63, 0.78);
    border-color: rgba(255, 255, 255, 0.14);
  }

  @supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .hero-slide--fullbleed .hero-slide-panel {
      background: rgba(0, 31, 63, 0.55);
    }
  }

  .hero-slide-panel {
    width: 100%;
  }

  .hero-slide-eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.14em;
  }

  .hero-slide-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .hero-slide-text {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }

  .hero-slide-actions {
    gap: 8px;
  }

  .hero-slide-btn {
    padding: 10px 16px;
    font-size: 0.72rem;
  }

  .hero-slide::before {
    background: linear-gradient(
      180deg,
      rgba(0, 31, 63, 0.34) 0%,
      rgba(0, 31, 63, 0.56) 34%,
      rgba(0, 31, 63, 0.8) 68%,
      rgba(0, 31, 63, 0.94) 100%
    );
  }

  .u-block-54bc-1 .u-carousel-control {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .u-block-54bc-5 {
    left: 8px;
  }

  .u-block-54bc-6 {
    right: 8px;
  }
}

/* --- 11. Reduced motion: skip slide transitions --- */

@media (prefers-reduced-motion: reduce) {
  .u-block-54bc-1 .u-carousel-item {
    transition: none !important;
  }

  .u-block-54bc-1 .u-carousel-indicators li,
  .hero-slide-btn,
  .u-block-54bc-1 .u-carousel-control {
    transition: none !important;
  }
}
