/*
   Hero Slider — styles for the home banner carousel.
   Markup is SSR (PHP-rendered .banner-slide elements inside
   .banner > .banner-track > .banner-slider), wired by Slider.initFromDOM()
   in slider.js. Arrows are injected by the JS; dots are SSR.

   The outer .banner (size / full-bleed) is styled in pages/home.css; this file
   only adds the reel, slides, dots and arrows.
*/

.banner-track {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.banner-slider {
  display: flex;
  height: 100%;
  will-change: transform;
}

.banner-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.banner-slide .banner-link {
  display: block;
  width: 100%;
  height: 100%;
}

/* Mouse drag (wired by _bindDrag in slider.js).
   Deliberately no resting `cursor: grab` — that would mask the pointer on a
   linked slide and make a working link look undraggable/unclickable. The grab
   cursor appears only while a drag is actually in progress. */
.banner-slider {
  user-select: none;
  -webkit-user-select: none;
}

.banner-track.is-dragging,
.banner-track.is-dragging .banner-slider,
.banner-track.is-dragging .banner-link {
  cursor: grabbing;
}

.banner-slide .banner-img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* .banner-img sizing (object-fit cover, 100% w/h) lives in pages/home.css */
.banner-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}

/* Dots */
.banner-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  display: flex;
  gap: 8px;
  justify-content: center;
}

.banner-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease, border-radius 0.2s ease;
}

.banner-dot.is-active {
  width: 22px;
  border-radius: 5px;
  background: #f5c518;
}

/* Prev / next arrows (injected by slider.js) */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.banner:hover .banner-arrow {
  opacity: 1;
}

.banner-arrow:hover {
  background: rgba(0, 0, 0, 0.6);
}

.banner-arrow--prev { left: 16px; }
.banner-arrow--next { right: 16px; }

/* Touch devices: keep arrows visible (no hover) and a touch larger tap area */
@media (hover: none) {
  .banner-arrow { opacity: 0.85; }
}

@media (max-width: 640px) {
  .banner-arrow { width: 32px; height: 32px; font-size: 1.1rem; }
  .banner-arrow--prev { left: 8px; }
  .banner-arrow--next { right: 8px; }
  .banner-dots { bottom: 8px; }
}
