/* ====================================================================
   WAZAA AFRICA — Animation & Motion Styles
   ==================================================================== */

/* ============================================================
   NEWS TICKER
   ============================================================ */
.news-ticker-wrap {
  background: var(--color-ink);
  overflow: hidden;
  position: relative;
  border-bottom: 3px solid var(--color-primary);
}
.news-ticker-inner { display: flex; align-items: center; }
.ticker-label {
  display: flex; align-items: center; gap: 8px;
  background: var(--color-primary);
  color: white;
  font-family: var(--font-display);
  font-weight: 800; font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 10px 16px; white-space: nowrap; flex-shrink: 0; z-index: 2;
}
.ticker-live-dot {
  width: 7px; height: 7px; border-radius: 50%; background: white;
  animation: ticker-blink 1.2s ease-in-out infinite;
}
@keyframes ticker-blink { 0%,100%{opacity:1} 50%{opacity:0.2} }
.ticker-scroll { overflow: hidden; flex: 1; padding: 0 16px; }
.ticker-track {
  display: flex; align-items: center;
  white-space: nowrap; will-change: transform;
}
.ticker-item {
  display: inline-flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-display); font-weight: 600; font-size: 13.5px;
  padding: 10px 0; margin-right: 48px; text-decoration: none;
  transition: color 0.15s ease;
}
.ticker-item:hover { color: var(--color-primary-light); }
.ticker-item::before { content: '●'; color: var(--color-primary); font-size: 8px; }

/* ============================================================
   HERO CAROUSEL
   ============================================================ */
.hero-carousel-section {
  position: relative; width: 100%; overflow: hidden;
  background: var(--color-ink);
  height: clamp(420px, 58vw, 620px);
  /* Ensure it breaks out of any container padding */
  margin-left: 0; margin-right: 0;
}
.hero-carousel-track {
  display: flex; height: 100%;
  transition: transform 0.65s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
  /* Prevent any gap between slides */
  gap: 0;
}
.hero-slide {
  flex: 0 0 100%; width: 100%; min-width: 100%; height: 100%;
  position: relative; display: block; overflow: hidden;
  text-decoration: none;
}
.hero-slide-bg { position: absolute; inset: 0; overflow: hidden; }
.hero-slide-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 6s ease; transform: scale(1.06);
}
.hero-slide.active .hero-slide-bg img { transform: scale(1); }
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.45) 45%, rgba(0,0,0,0.10) 100%);
}
.hero-slide-content {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 40px 48px; z-index: 2;
  transform: translateY(12px); opacity: 0;
  transition: transform 0.55s ease 0.2s, opacity 0.55s ease 0.2s;
}
.hero-slide.active .hero-slide-content { transform: translateY(0); opacity: 1; }
.hero-slide-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(20px, 3.5vw, 40px);
  color: white; line-height: 1.15; margin: 12px 0 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4); max-width: 720px;
}
.hero-slide-meta { color: rgba(255,255,255,0.75); font-size: 14px; }
.hero-carousel-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.hero-carousel-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,0.45); border: none; cursor: pointer; padding: 0;
  transition: width 0.3s ease, background 0.2s ease;
}
.hero-carousel-dot.active { width: 28px; background: var(--color-primary); }
.hero-carousel-progress {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 3px; background: rgba(255,255,255,0.15); z-index: 10;
}
.hero-carousel-progress-bar { height: 100%; background: var(--color-primary); width: 0%; }

/* ============================================================
   ORIGINALS CAROUSEL
   ============================================================ */
.carousel-wrap { position: relative; overflow: hidden; }
.carousel-track {
  display: flex; gap: 22px;
  cursor: grab; user-select: none; -webkit-user-select: none;
  will-change: transform;
}
.carousel-track:active { cursor: grabbing; }
.carousel-track .post-card { flex: 0 0 calc(33.333% - 15px); min-width: 280px; }
.carousel-controls {
  display: flex; align-items: center; justify-content: space-between; margin-top: 20px;
}
.carousel-dots { display: flex; gap: 8px; justify-content: center; flex: 1; }
.carousel-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-border); border: none; cursor: pointer; padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.carousel-dot.active { background: var(--color-primary); transform: scale(1.35); }
.carousel-prev, .carousel-next {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--color-border); background: white;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--color-ink); transition: all 0.15s ease; flex-shrink: 0;
}
.carousel-prev:hover, .carousel-next:hover {
  border-color: var(--color-primary); background: var(--color-primary); color: white;
}

/* ============================================================
   CARD HOVER LIFTS
   ============================================================ */
.post-card { transition: transform 0.22s ease, box-shadow 0.22s ease; }
.post-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: 0 16px 40px rgba(26,24,21,0.16); }
.post-card-image { overflow: hidden; }
.post-card-image img { transition: transform 0.4s ease; }
.post-card:hover .post-card-image img { transform: scale(1.04); }
.topic-card { transition: transform 0.2s ease, box-shadow 0.2s ease, border-left 0.2s ease; border-left: 4px solid transparent; }
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(26,24,21,0.12); border-left-color: var(--color-primary); }
.short-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.short-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(26,24,21,0.14); }
.category-pill { transition: all 0.18s cubic-bezier(0.34,1.56,0.64,1); }
.category-pill:hover { transform: translateY(-2px) scale(1.04); background: var(--color-ink); color: var(--color-white); }

/* ============================================================
   SECTION PULSE & RADIO GLOW
   ============================================================ */
@keyframes waza-dot-pulse { 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.5);opacity:.65} }
.section-header .accent-dot { animation: waza-dot-pulse 2.4s ease-in-out infinite; }
@keyframes radio-glow { 0%,100%{box-shadow:0 0 0 0 rgba(212,87,15,.4)} 50%{box-shadow:0 0 0 12px rgba(212,87,15,0)} }
.radio-block-icon { animation: radio-glow 3s ease-in-out infinite; }

/* ============================================================
   HEADER — remove subscribe on mobile, clean search
   ============================================================ */
@media (max-width: 880px) {
  /* Make search toggle more prominent */
  .search-toggle {
    width: 44px; height: 44px;
    border: none;
    background: var(--color-cream-dim);
    border-radius: 999px;
  }

  /* Full-width search panel on mobile */
  .search-panel.open {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    padding: 12px 16px;
    background: var(--color-ink);
  }
  .search-panel.open form { display: flex; gap: 8px; }
  .search-panel.open input {
    flex: 1; border-radius: 999px; padding: 14px 18px;
    font-size: 16px; border: none;
  }
  .search-panel.open button {
    border-radius: 999px; padding: 14px 20px;
    background: var(--color-primary); color: white;
    border: none; font-weight: 700; font-size: 15px;
  }
}

/* ============================================================
   MOBILE HERO CAROUSEL
   ============================================================ */
@media (max-width: 600px) {
  .hero-carousel-section {
    height: 88vw; min-height: 300px; max-height: 480px;
  }
  .hero-slide-content { padding: 20px 16px; }
  .hero-slide-title { font-size: clamp(17px, 5vw, 24px); }
  .hero-carousel-dots { bottom: 12px; }
}

/* ============================================================
   CAROUSEL RESPONSIVE
   ============================================================ */
@media (max-width: 880px) {
  .carousel-track .post-card { flex: 0 0 calc(50% - 11px); min-width: 240px; }
}
@media (max-width: 560px) {
  .carousel-track .post-card { flex: 0 0 calc(85vw - 32px); min-width: 0; }
  .ticker-label { padding: 10px 12px; font-size: 11px; }
  .ticker-item { font-size: 12.5px; margin-right: 32px; }
}

/* ============================================================
   MOBILE EDGE SPACING
   ============================================================ */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-carousel-section { margin-bottom: 0; }
  .section-block { padding: 24px 0; }
  .newsletter-block { padding: 28px 16px; border-radius: 14px; }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input, .newsletter-form button { width: 100%; min-width: unset; }
  .radio-block { padding: 22px 16px; border-radius: 14px; flex-direction: column; text-align: center; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
}

/* ============================================================
   MOBILE HEADER — ensure hamburger and subscribe are visible
   Overrides any conflicting rules from previous builds
   ============================================================ */
@media (max-width: 880px) {
  .menu-toggle {
    display: flex !important;
  }
  .btn-subscribe {
    display: inline-flex !important;
  }
}

/* ============================================================
   MOBILE FRAME PADDING — breathing room from screen edges
   ============================================================ */
@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }
  .post-card-body {
    padding: 14px 16px 18px;
  }
  .hero-slide-content {
    padding: 24px 20px;
  }
  .newsletter-block {
    padding: 32px 20px;
  }
  .radio-block {
    padding: 28px 20px;
  }
  .topic-card {
    padding: 18px 20px;
  }
  .page-hero {
    padding: 30px 0 20px;
  }
  .footer-grid {
    padding: 0 4px;
  }
  .section-header {
    margin-bottom: 18px;
  }
}

/* ============================================================
   MOBILE SECTION SPACING
   Each section needs clear visual separation from what's above it.
   The problem: sections use padding-top only, but when a card grid
   ends flush and the next section header starts immediately, it
   feels cramped. We add explicit margin-top on mobile.
   ============================================================ */
@media (max-width: 880px) {

  /* Core section spacing — generous gap between every section */
  .section-block {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  .section-block-tight {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
  }

  /* Extra space specifically ABOVE section headers so they
     breathe away from the content before them */
  .section-header {
    margin-bottom: 20px;
    padding-top: 8px;
  }

  /* Gap between hero carousel and the first section below it */
  .hero-carousel-section {
    margin-bottom: 8px;
  }

  /* Gap between card grids and the next section */
  .card-grid {
    margin-bottom: 8px;
  }

  /* Extra space above radio block */
  .radio-block {
    margin-top: 8px;
  }

  /* Space between category cloud and newsletter */
  .category-cloud {
    margin-bottom: 8px;
  }

  /* Newsletter block — space above */
  .newsletter-block {
    margin-top: 8px;
  }

  /* Carousel controls — extra space below */
  .carousel-controls {
    margin-bottom: 8px;
  }
}

/* ============================================================
   RADIO EMBED PLAYER
   ============================================================ */
.radio-embed-container {
  margin-top: 20px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.05);
}
.radio-embed-iframe {
  width: 100%;
  height: 120px;
  border: none;
  display: block;
  border-radius: 12px;
}
@media (max-width: 600px) {
  .radio-embed-iframe {
    height: 140px;
  }
}

/* ============================================================
   WAZAA RADIO — Custom HTML5 Player
   ============================================================ */
.wazaa-radio-player {
  background: var(--color-ink);
  border-radius: 16px;
  padding: 20px 24px;
  margin-top: 20px;
}
.wazaa-radio-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.wazaa-radio-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary);
  color: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.15s ease;
}
.wazaa-radio-btn:hover { background: var(--color-primary-dark); transform: scale(1.06); }
.wazaa-radio-info { flex: 1; min-width: 0; }
.wazaa-radio-label {
  display: flex; align-items: center; gap: 7px;
  font-family: 'Poppins', sans-serif;
  font-weight: 700; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(251,247,240,0.6);
  margin-bottom: 4px;
}
.wazaa-radio-live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--color-primary);
  animation: ticker-blink 1.2s ease-in-out infinite;
}
.wazaa-radio-status {
  font-family: 'Inter', sans-serif;
  font-size: 14px; color: rgba(251,247,240,0.85);
}
.wazaa-radio-volume {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.wazaa-radio-mute {
  background: none; border: none;
  color: rgba(251,247,240,0.6);
  cursor: pointer; padding: 4px;
  display: flex; align-items: center;
}
.wazaa-radio-mute:hover { color: white; }
.wazaa-radio-vol-slider {
  -webkit-appearance: none; appearance: none;
  width: 80px; height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,0.2);
  outline: none; cursor: pointer;
}
.wazaa-radio-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--color-primary); cursor: pointer;
}
.wazaa-radio-vol-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--color-primary); cursor: pointer; border: none;
}
@media (max-width: 480px) {
  .wazaa-radio-vol-slider { width: 60px; }
  .wazaa-radio-player { padding: 16px 18px; }
}