/* ============================================================
   home-promo.css  —  Plotrixx Promotion Zone
   ─────────────────────────────────────────────────────────────
   Drop this file in /css/ and link it in Home.html AFTER home.css.
   All class names are prefixed .promo-* to avoid collisions.
   ============================================================ */

/* ─── SECTION WRAPPER ───────────────────────────────────────── */
.promo-zone {
  padding: 0 40px 36px;
}

.promo-zone-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.promo-zone-header {
  margin-bottom: 14px;
}

.promo-zone-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink3);
}


/* ─── CAROUSEL VIEWPORT ─────────────────────────────────────── */
.promo-carousel {
  position: relative;
  border-radius: 20px;
  overflow: hidden;          /* clips the sliding track */
  /* height driven by slides; min set so empty state doesn't collapse */
  min-height: 380px;
}

/* The sliding strip that holds all slides side-by-side */
.promo-track {
  display: flex;
  width: 100%;
  /* translateX is driven by JS */
  transition: transform 0.65s cubic-bezier(0.77, 0, 0.175, 1);
  will-change: transform;
}


/* ─── INDIVIDUAL SLIDE ──────────────────────────────────────── */
.promo-slide {
  position: relative;
  flex: 0 0 100%;          /* each slide = full viewport width */
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid var(--border, rgba(255,255,255,0.07));
  cursor: pointer;
  /* background-image set inline via --promo-bg CSS var from JS */
  background-image: var(--promo-bg, none);
  background-size: cover;
  background-position: center;
}

/* Dark gradient overlay so text is always readable */
.promo-media-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      160deg,
      rgba(13,13,16,0)    0%,
      rgba(13,13,16,0.15) 35%,
      rgba(13,13,16,0.90) 100%
    );
  pointer-events: none;
}

/* Fallback gradient when no image is provided (e.g. placeholder) */
.promo-slide:not([style*="url"]) {
  background: linear-gradient(120deg, #1a0a2e 0%, #2d0b3c 25%, #5c0e3e 50%, #b3173c 75%, #e84e1b 100%);
}


/* ─── TYPE BADGE (top-left) ─────────────────────────────────── */
.promo-type-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(0,0,0,0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 30px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink1, #f0ede8);
  pointer-events: none;
  z-index: 2;
}

/* Pulsing live dot */
.promo-dot-live {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crimson, #e8395e);
  flex-shrink: 0;
  animation: promo-pulse-dot 1.6s ease-in-out infinite;
}

@keyframes promo-pulse-dot {
  0%, 100% { transform: scale(1);   opacity: 1;  }
  50%       { transform: scale(1.5); opacity: 0.5; }
}


/* ─── SCHEDULED BADGE (top-right) ───────────────────────────── */
.promo-sched-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(245,200,66,0.14);
  border: 1px solid rgba(245,200,66,0.32);
  border-radius: 8px;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--gold, #f5c842);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 2;
}


/* ─── CONTENT OVERLAY (bottom) ──────────────────────────────── */
.promo-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  z-index: 2;
}

.promo-content-left {
  flex: 1;
  min-width: 0;
}

/* Pill tag */
.promo-tag {
  display: inline-block;
  background: rgba(245,200,66,0.16);
  border: 1px solid rgba(245,200,66,0.35);
  border-radius: 20px;
  padding: 4px 12px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold, #f5c842);
  text-transform: uppercase;
  margin-bottom: 12px;
}

/* Title */
.promo-title {
  font-family: var(--serif, 'Playfair Display', serif);
  font-size: clamp(22px, 3.2vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  margin-bottom: 10px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.55);
}

.promo-title em {
  color: var(--gold, #f5c842);
  font-style: italic;
}

/* Caption — clamped to 3 lines */
.promo-caption {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  max-width: 540px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Meta row */
.promo-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}

.promo-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: rgba(255,255,255,0.52);
}

/* CTA buttons column */
.promo-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.promo-btn-pri,
.promo-btn-sec {
  min-width: 148px;
  text-align: center;
}


/* ─── DOT PAGINATION ────────────────────────────────────────── */
.promo-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}

.promo-dot-btn {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border, rgba(255,255,255,0.12));
  border: none;
  padding: 0;
  cursor: pointer;
  transition: width 0.35s ease, background 0.35s ease, border-radius 0.35s ease;
  outline: none;
}

.promo-dot-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Active dot stretches into a pill */
.promo-dot-btn.active {
  width: 24px;
  border-radius: 4px;
  background: var(--gold, #f5c842);
}

/* Progress fill inside active dot — driven by a CSS animation */
.promo-dot-btn.active::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,0.45);
  border-radius: 4px;
  animation: promo-dot-progress var(--promo-interval, 5s) linear forwards;
}

@keyframes promo-dot-progress {
  from { width: 0%; }
  to   { width: 100%; }
}


/* ─── PROGRESS BAR (thin line at bottom of card) ────────────── */
.promo-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--gold, #f5c842);
  border-radius: 0 2px 2px 0;
  animation: promo-bar-fill var(--promo-interval, 5s) linear forwards;
  z-index: 3;
  pointer-events: none;
}

@keyframes promo-bar-fill {
  from { width: 0%;   opacity: 1; }
  to   { width: 100%; opacity: 1; }
}


/* ─── HOVER — pause visual cue ──────────────────────────────── */
.promo-carousel:hover .promo-progress-bar,
.promo-carousel:hover .promo-dot-btn.active::after {
  animation-play-state: paused;
}


/* ─── TRANSITIONS between slides ────────────────────────────── */
/* Slide entering from right gets a subtle fade-up as extra polish */
.promo-slide {
  opacity: 1;
  transition: opacity 0.3s ease;
}


/* ─── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .promo-zone {
    padding: 0 16px 28px;
  }

  .promo-slide {
    height: 500px;
  }

  .promo-content {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 20px 24px;
    gap: 16px;
  }

  .promo-cta {
    flex-direction: row;
    width: 100%;
  }

  .promo-btn-pri,
  .promo-btn-sec {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    padding: 11px 16px;
  }

  .promo-caption {
    -webkit-line-clamp: 2;
    max-width: 100%;
  }

  .promo-title {
    font-size: clamp(20px, 5vw, 28px);
  }
}

@media (max-width: 480px) {
  .promo-slide {
    height: 480px;
    border-radius: 14px;
  }

  .promo-carousel {
    border-radius: 14px;
  }

  .promo-title {
    font-size: 20px;
  }

  .promo-caption {
    font-size: 13px;
  }
}