/* ==========================================================================
   Slider — Edge Pharma
   Generic Swiper.js carousel mechanics: the container shell and the
   pagination-dot styling, reusable by any future Swiper instance (not
   just the homepage Hero). The Hero section's own content design
   (grid, typography, image, decorative shapes) lives in css/pages/home.css.

   Swiper's own required structural classes (.swiper, .swiper-wrapper,
   .swiper-slide, .swiper-pagination, .swiper-pagination-bullet) are used
   as-is rather than renamed to BEM, since the library depends on them.
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-background);
}

.hero__swiper,
.hero__swiper .swiper-wrapper,
.hero__swiper .swiper-slide {
  height: 100%;
}

.hero__swiper .swiper-slide {
  overflow: hidden;
}

/* ---------------------------------------------------------------------
   Pagination — dots only, no arrows
   --------------------------------------------------------------------- */

.hero__swiper .swiper-pagination {
  position: absolute;
  bottom: var(--space-7);
  left: 50%;
  transform: translateX(-50%);
  width: auto;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: 3;
}

.hero__swiper .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0 !important; /* overrides Swiper's own higher-specificity margin rule */
  border-radius: var(--radius-full);
  background-color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.8);
  opacity: 1;
  transition: width var(--duration-base) var(--ease-default),
              background-color var(--duration-base) var(--ease-default);
}

.hero__swiper .swiper-pagination-bullet-active {
  width: 32px;
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.hero__swiper .swiper-pagination-bullet:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------------
   Arrows — circular buttons pinned to the hero's edges
   --------------------------------------------------------------------- */

.hero__nav {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: var(--radius-full);
  background-color: var(--color-white);
  color: var(--color-text-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
  transition: background-color var(--duration-fast) var(--ease-default),
              color var(--duration-fast) var(--ease-default),
              box-shadow var(--duration-fast) var(--ease-default);
}

.hero__nav:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
  box-shadow: var(--shadow-lg);
}

.hero__nav:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

.hero__nav--prev {
  left: var(--space-5);
}

.hero__nav--next {
  right: var(--space-5);
}

@media (min-width: 768px) {
  .hero__nav {
    display: inline-flex;
  }
}

@media (min-width: 992px) {
  .hero__nav--prev {
    left: var(--space-7);
  }

  .hero__nav--next {
    right: var(--space-7);
  }
}

/* ---------------------------------------------------------------------
   Lazy-load preloader
   --------------------------------------------------------------------- */

.hero__swiper .swiper-lazy-preloader {
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: var(--color-white);
}

/* ---------------------------------------------------------------------
   Reduced motion — Swiper's own fade/translate transitions
   --------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .hero__swiper .swiper-wrapper {
    transition-duration: 0ms !important;
  }

  .hero__swiper .swiper-pagination-bullet {
    transition: none;
  }
}
