/*
 * Alf Theme — Product Design: Dedicated Engineering Facility
 * Figma node: 629:4008 (desktop) / 631:4551 (mobile)
 *
 * Image carousel with centred heading + subtitle above a full-width
 * slide image. Prev/next arrows + pagination dots overlay the image.
 * Background: var(--color-beige, #F0F0E3).
 *
 * Loaded only on the Product Design page template.
 */

/* ═══════════════════════════════════════════════════════════════════
   SECTION
   ═══════════════════════════════════════════════════════════════════ */

.pd-facility {
  background: var(--color-beige, #F0F0E3);
  padding-block: 160px;
}

.pd-facility__wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100% !important;
  max-width: 1380px !important;
  gap: 48px;
}

/* ── Header ───────────────────────────────────────────────────────── */

.pd-facility__header {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: var(--header-max-width, 896px);
  text-align: center;
  padding-inline: 32px;
}

.pd-facility__title {
  font-size: var(--font-size-h2, 36px);
  font-weight: var(--font-weight-semibold, 600);
  line-height: 1;
  color: var(--color-dark, #252525);
  margin: 0;
}

.pd-facility__subtitle {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: var(--font-size-h4, 20px);
  font-weight: var(--font-weight-regular, 400);
  line-height: 1;
  color: var(--color-dark, #252525);
  margin: 0;
}

/* ── Carousel wrapper (positioned parent for arrows) ─────────────── */

.pd-facility__carousel {
  position: relative;
  width: 100%;
}

/* ── Track — clips the image ─────────────────────────────────────── */

.pd-facility__track {
  overflow: hidden;
  width: 100%;
}

/* ── Slides ───────────────────────────────────────────────────────── */

.pd-facility__slide {
  display: none;
}

.pd-facility__slide.is-active {
  display: block;
}

.pd-facility__img {
  display: block;
  width: 100%;
  aspect-ratio: 1380 / 604;
  object-fit: cover;
  object-position: center center;
}

/* ── Arrows ───────────────────────────────────────────────────────── */

.pd-facility__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.42);
  border: none;
  width: 54px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 14px;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.pd-facility__arrow:hover,
.pd-facility__arrow:focus-visible {
  background: rgba(0, 0, 0, 0.65);
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: -2px;
}

/* Flip the right-pointing icon for the Prev arrow */
.pd-facility__arrow--prev img {
  transform: rotate(180deg);
}

/* Desktop: arrows sit outside the image in the 120px side-padding zone */
.pd-facility__arrow--prev {
  left: 25px;
}

.pd-facility__arrow--next {
  right: 25px;
}

/* ── Pagination dots ──────────────────────────────────────────────── */

.pd-facility__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  align-items: center;
}

.pd-facility__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.pd-facility__dot.is-active {
  background: #ffffff;
  transform: scale(1.3);
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

/* Tablet landscape — bring arrows slightly inside the padding */
@media (max-width: 1280px) {
  .pd-facility {
    padding-block: 120px;
  }

  .pd-facility__arrow--prev {
    left: -40px;
  }

  .pd-facility__arrow--next {
    right: -40px;
  }
}

/* Tablet portrait — arrows move inside the image */
@media (max-width: 900px) {
  .pd-facility {
    padding-block: 100px;
  }

  .pd-facility__arrow--prev {
    left: 12px;
  }

  .pd-facility__arrow--next {
    right: 12px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .pd-facility {
    padding-block: 120px;
  }

  .pd-facility__wrap {
    gap: 32px;
  }

  .pd-facility__title {
    font-size: 32px;
  }

  .pd-facility__subtitle {
    font-weight: 300;
    font-size: 20px;
  }

  /* Mobile aspect ratio from Figma (343 × 173) */
  .pd-facility__img {
    aspect-ratio: 343 / 173;
  }

  .pd-facility__arrow--prev {
    left: 12px;
  }

  .pd-facility__arrow--next {
    right: 12px;
  }
}