/* ==========================================================================
   Carousel Redesign – Platzhirsch-Style Fullwidth Carousel
   Full-width slides, crossfade transition, text fades in from left
   ========================================================================== */

/* ── CAROUSEL WRAPPER (Container width) ──────────────────────────────────── */
.ph-carousel {
  position: relative;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  height: 520px;
  overflow: hidden;
  background: #1a1a1a;
}

@media screen and (min-width: 40em) {
  .ph-carousel { height: 620px; }
}

@media screen and (min-width: 64em) {
  .ph-carousel { height: 750px; }
}

/* ── VIEWPORT (stacks slides absolutely) ────────────────────────────────── */
.ph-carousel__viewport {
  position: relative;
  width: 100%;
  height: 100%;
}

/* ── SINGLE SLIDE ───────────────────────────────────────────────────────── */
.ph-carousel__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;         /* portrait-friendly: fill without letterbox */
  background-position: 50% 30%;  /* default focus point higher for faces */
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
  z-index: 0;
}

.ph-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

/* Background position & zoom are controlled via inline style from WP backend.
   Defaults are set here and overridden per-slide. */

/* ── DARK OVERLAY for text readability (bottom-to-top, portrait-style) ─── */
.ph-carousel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.82) 0%,
    rgba(0, 0, 0, 0.55) 25%,
    rgba(0, 0, 0, 0.20) 55%,
    transparent 80%
  );
  z-index: 1;
}

/* ── TEXT CONTENT (left-aligned, fades in from left) ────────────────────── */
.ph-carousel__content {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2rem;
  z-index: 2;
  color: #ffffff;
}

@media screen and (min-width: 40em) {
  .ph-carousel__content {
    width: 45%;
    padding: 3rem 3rem 3rem 5rem;
  }
}

@media screen and (min-width: 64em) {
  .ph-carousel__content {
    width: 42%;
    padding: 4rem 4.5rem 4rem 6rem;
  }
}

/* ── Fade-in-from-left for content children ─────────────────────────────── */
.ph-carousel__title,
.ph-carousel__desc {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.ph-carousel__slide.is-active .ph-carousel__title {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.2s;
}

.ph-carousel__slide.is-active .ph-carousel__desc {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.5s;
}

/* ── Title ──────────────────────────────────────────────────────────────── */
.ph-carousel__title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #00a285;
  margin: 0 0 0.8rem 0;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

@media screen and (min-width: 40em) {
  .ph-carousel__title { font-size: 2.2rem; }
}

@media screen and (min-width: 64em) {
  .ph-carousel__title { font-size: 2.8rem; margin-bottom: 1.2rem; }
}

/* ── Description (RichText) ─────────────────────────────────────────────── */
.ph-carousel__desc {
  font-size: 0.95rem;
  color: #d5d5d5;
  max-width: 100%;
}

@media screen and (min-width: 40em) {
  .ph-carousel__desc { font-size: 1.05rem; }
}

@media screen and (min-width: 64em) {
  .ph-carousel__desc { font-size: 1.15rem; }
}

.ph-carousel__desc p {
  margin: 0 0 0.6rem 0;
}

.ph-carousel__desc p:last-child {
  margin-bottom: 0;
}

.ph-carousel__desc strong {
  color: #ffffff;
  font-weight: 700;
}

.ph-carousel__desc a {
  color: #00d4a8;
  text-decoration: none;
  border-bottom: 2px solid #00d4a8;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ph-carousel__desc a:hover {
  color: #ffffff;
  border-color: #ffffff;
}

/* ── CAPTION (Headline + Subline – bottom-left) ────────────────────────── */
.ph-carousel__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  padding: 1.5rem 2rem 2.5rem;
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ph-carousel__slide.is-active .ph-carousel__caption {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

.ph-carousel__headline {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.ph-carousel__subline {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 0.2rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

@media screen and (min-width: 40em) {
  .ph-carousel__caption {
    padding: 2rem 3rem 3rem 5rem;
  }
  .ph-carousel__headline { font-size: 2rem; }
  .ph-carousel__subline  { font-size: 1.1rem; }
}

@media screen and (min-width: 64em) {
  .ph-carousel__caption {
    padding: 2.5rem 4.5rem 3rem 6rem;
  }
  .ph-carousel__headline { font-size: 2.4rem; }
  .ph-carousel__subline  { font-size: 1.2rem; }
}

/* ── NAVIGATION ARROWS ──────────────────────────────────────────────────── */
.ph-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  background: rgba(0, 0, 0, 0.35);
  color: #ffffff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.ph-carousel__arrow:hover {
  background: rgba(0, 162, 133, 0.7);
  transform: translateY(-50%) scale(1.1);
}

.ph-carousel__arrow--prev { left: 1rem; }
.ph-carousel__arrow--next { right: 1rem; }

@media screen and (min-width: 40em) {
  .ph-carousel__arrow {
    display: flex;
  }
}

@media screen and (min-width: 64em) {
  .ph-carousel__arrow {
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
  }
  .ph-carousel__arrow--prev { left: 2rem; }
  .ph-carousel__arrow--next { right: 2rem; }
}

/* ── DOT INDICATORS ─────────────────────────────────────────────────────── */
.ph-carousel__dots {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 0.6rem;
}

.ph-carousel__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.ph-carousel__dot:hover {
  border-color: #ffffff;
  transform: scale(1.2);
}

.ph-carousel__dot.is-active {
  background: #00a285;
  border-color: #00a285;
  transform: scale(1.15);
}

/* ── MOBILE adjustments ─────────────────────────────────────────────────── */
@media screen and (max-width: 39.9375em) {
  .ph-carousel__content {
    width: 85%;
    padding: 2rem 1.5rem;
  }

  .ph-carousel__overlay {
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.88) 0%,
      rgba(0, 0, 0, 0.60) 30%,
      rgba(0, 0, 0, 0.25) 60%,
      transparent 85%
    );
  }
}

/* ── PROGRESS BAR (optional autoplay indicator) ─────────────────────────── */
.ph-carousel__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #00a285;
  z-index: 6;
  width: 0;
  transition: width linear;
}

.ph-carousel.is-playing .ph-carousel__progress {
  width: 100%;
}

/* ── ACCESSIBILITY: Prefers Reduced Motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .ph-carousel__slide {
    transition: none !important;
  }

  .ph-carousel__slide.is-active {
    animation: none !important;
  }

  .ph-carousel__logo,
  .ph-carousel__title,
  .ph-carousel__desc {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

