/* ==========================================================================
   FULL-WIDTH IMAGE AD BANNER (under hero)
========================================================================== */

.img-ad {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  overflow: hidden;
  background: none;
  isolation: isolate;
  padding: 2rem 0;
}

/* ---------- Track / slide ---------- */
.img-ad__track {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 200;         /* desktop default */
  max-height: 200px;
}

.img-ad__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .6s ease, visibility .6s ease;
}

.img-ad__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.img-ad__slide picture,
.img-ad__slide img {
  width: 100%;
  height: 100%;
  display: block;
}

.img-ad__slide img {
  object-fit: cover;
  object-position: center;
  transition: transform 8s ease-out;
  border-radius: 16px;
}

.img-ad__slide.is-active img {
  transform: scale(1.03);
}

/* ---------- Clickable full-slide wrapper ---------- */
.img-ad__clickable {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

/* ---------- Overlay ---------- */
.img-ad__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, calc(var(--overlay-opacity, 40%) / 100)) 0%,
    rgba(0, 0, 0, calc(var(--overlay-opacity, 40%) / 100 * 0.4)) 45%,
    transparent 75%
  );
  pointer-events: none;
}

/* Reverse gradient direction when caption is on the right */
.img-ad__slide:has(.img-ad__caption--right) .img-ad__overlay {
  background: linear-gradient(
    260deg,
    rgba(0, 0, 0, calc(var(--overlay-opacity, 40%) / 100)) 0%,
    rgba(0, 0, 0, calc(var(--overlay-opacity, 40%) / 100 * 0.4)) 45%,
    transparent 75%
  );
}

/* Neutral overlay when caption is centered */
.img-ad__slide:has(.img-ad__caption--center) .img-ad__overlay {
  background: rgba(0, 0, 0, calc(var(--overlay-opacity, 40%) / 100));
}

/* ---------- Caption ---------- */
.img-ad__caption {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
  z-index: 2;
  color: var(--text-color, #fff);
}

.img-ad__caption-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 620px;
  pointer-events: auto;
  animation: img-ad-in .7s cubic-bezier(.34,1.3,.64,1) both;
}

@keyframes img-ad-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.img-ad__caption--left   .img-ad__caption-inner { margin-right: auto; text-align: left; }
.img-ad__caption--right  .img-ad__caption-inner { margin-left: auto;  text-align: right; align-items: flex-end; }
.img-ad__caption--center .img-ad__caption-inner { margin-inline: auto; text-align: center; align-items: center; }

.img-ad__title {
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0;
  color: inherit;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.img-ad__subtitle {
  font-size: clamp(.9rem, 1.3vw, 1.05rem);
  line-height: 1.55;
  margin: 0;
  color: inherit;
  opacity: .92;
  max-width: 48ch;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .35);
}

.img-ad__cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  margin-top: 6px;
  border-radius: 999px;
  background: #ff6b1a;
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 10px 24px -10px rgba(255, 107, 26, .8);
  transition: background .16s, transform .16s, box-shadow .16s;
}

.img-ad__cta:hover {
  background: #e85d10;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -10px rgba(255, 107, 26, .9);
}

.img-ad__cta i { font-size: .75em; transition: transform .16s; }
.img-ad__cta:hover i { transform: translateX(3px); }

/* ---------- Controls ---------- */
.img-ad__controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
}

.img-ad__nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  backdrop-filter: blur(6px);
  transition: background .16s;
}

.img-ad__nav:hover {
  background: rgba(255, 255, 255, .4);
}

.img-ad__dots {
  display: flex;
  gap: 8px;
}

.img-ad__dot {
  width: 30px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .4);
  transition: width .16s, background .16s;
}

.img-ad__dot:hover { background: rgba(255, 255, 255, .7); }

.img-ad__dot.is-active {
  width: 48px;
  background: #ff6b1a;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .img-ad__track { aspect-ratio: 1200 / 500; max-height: 380px; }
}

@media (max-width: 640px) {
  .img-ad__track { aspect-ratio: 4 / 3; max-height: 460px; }
  .img-ad__caption { padding: 0 8px; }
  .img-ad__caption-inner { gap: 8px; }
  .img-ad__title { font-size: 1.15rem; }
  .img-ad__subtitle { font-size: .82rem; }
  .img-ad__cta { padding: 10px 18px; font-size: .82rem; }
  .img-ad__controls { bottom: 10px; }
  .img-ad__nav { width: 30px; height: 30px; }
  .img-ad__dot { width: 22px; }
  .img-ad__dot.is-active { width: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .img-ad__slide,
  .img-ad__slide img,
  .img-ad__caption-inner {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}