/* Wende FM — mobile-first fixes + fixed SIKILIZA bar (load last in <head>) */
:root{--wende-bar-h:52px;--wende-green:#00723e;--wende-red:#d3161b;--wende-dark:#071f18}
html{-webkit-text-size-adjust:100%;scroll-padding-top:132px;overflow-x:hidden;overflow-x:clip}
img,video,iframe{max-width:100%;height:auto}
*,*::before,*::after{box-sizing:border-box}
body{-webkit-tap-highlight-color:transparent;overflow-x:hidden;overflow-x:clip;max-width:100vw;width:100%}
.wende-ico{display:inline-block;vertical-align:-2px;flex:0 0 auto;pointer-events:none}

/* Prevent any element from exceeding viewport.
   NOTE: .team-grid must NOT be in this list — the carousel track needs
   overflow visible so cards beyond page 1 can slide into view; .team-viewport clips instead. */
.container,.layout,.content,.main,.sidebar,.hero,.section,.editorial,.shows,.newsgrid,.newslist,.team-viewport,.schedule,.video-screen{overflow-x:hidden;max-width:100%}
.section{scroll-margin-top:132px}

/* Team carousel: let the JS transform carousel handle mobile (2 cards/view).
   Do NOT switch to native overflow-x scroll here — it fights the JS transform. */
@media(max-width:790px){
  .team-viewport{overflow:hidden;padding-bottom:10px}
  .team-grid{flex-wrap:nowrap}
  .team-card{min-width:0}
}

/* show schedule time pill on programme cards */
.showtime{
  display:block;margin-top:5px;max-width:100%;
  font-size:9px;line-height:1.3;font-weight:800;letter-spacing:.3px;
  color:#fff;background:rgba(211,22,27,.92);
  border-radius:4px;padding:2px 7px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}

/* schedule sidebar was hidden on mobile — restore it stacked below content */
.sidebar{display:block}

/* inline player button label sits next to the svg icon */
a[data-wende-listen]{display:inline-flex;align-items:center;gap:8px}
a[data-wende-listen] .wende-btn-label{white-space:nowrap}
a[data-wende-listen] .wende-ico{align-self:center}

/* blocked autoplay -> invite the first tap/scroll that will start playback */
[data-wende-listen][data-state="blocked"]{animation:wendeTapPulse 1.8s ease-in-out infinite}
.wende-listenbar[data-state="blocked"] .wende-bar-btn{animation:wendeTapPulse 1.8s ease-in-out infinite}
@keyframes wendeTapPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}

/* ---------- fixed listen bar (mobile only) — docked at the BOTTOM ----------
   Single shared <Audio> element (wende-radio.js) drives this bar, so it can
   never stack/duplicate the live stream. */
.wende-listenbar{display:none}
@media(max-width:790px){
  body{padding-bottom:calc(var(--wende-bar-h) + env(safe-area-inset-bottom,0px))}
  .wende-listenbar{
    display:flex;align-items:center;justify-content:space-between;gap:10px;
    position:fixed;left:0;right:0;bottom:0;top:auto;z-index:9999;
    height:calc(var(--wende-bar-h) + env(safe-area-inset-bottom,0px));
    padding:0 10px env(safe-area-inset-bottom,0px) 14px;
    background:var(--wende-green);
    background:linear-gradient(180deg,#00844a,#006b3b);
    color:#fff;box-shadow:0 -4px 18px rgba(0,0,0,.25);
    touch-action:manipulation;
  }
  .wende-listenbar .wende-bar-brand{display:flex;align-items:center;gap:7px;font:800 12px Manrope,'DM Sans',Arial,sans-serif;letter-spacing:.4px;min-width:0}
  .wende-listenbar .wende-bar-brand span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .wende-listenbar .wende-bar-live{display:flex;align-items:center;gap:5px;font-size:9px;font-weight:800;letter-spacing:1px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.35);border-radius:20px;padding:3px 8px;flex:0 0 auto}
  .wende-listenbar .wende-bar-dot{width:7px;height:7px;border-radius:50%;background:#ff4d4d;box-shadow:0 0 8px #ff4d4d;animation:wendePulse 1.4s infinite}
  .wende-listenbar .wende-bar-btn{
    display:flex;align-items:center;justify-content:center;gap:7px;
    min-height:38px;padding:0 15px;border:0;border-radius:30px;cursor:pointer;
    background:var(--wende-red);color:#fff;font:800 11px Manrope,'DM Sans',Arial,sans-serif;letter-spacing:.5px;
    box-shadow:0 5px 16px rgba(0,0,0,.3);flex:0 0 auto;
  }
  .wende-listenbar .wende-bar-btn:active{transform:scale(.97)}

  /* site header returns to the very top now that the player lives at the
     bottom. z-index must sit ABOVE the nav scrim (9990) so the open menu is
     visible and tappable instead of being covered by the overlay. */
  .topbar{top:0;backdrop-filter:none;-webkit-backdrop-filter:none;z-index:9999}
  .top{top:0;z-index:9999}
  .wende-menubtn{position:relative;z-index:9996}
  .station-strip{display:none}
  .topbar .listen{display:none}

  /* hamburger */
  .navright{display:none}
  .wende-menubtn{
    display:grid;place-items:center;width:44px;height:44px;margin-right:-6px;margin-left:auto;
    border:0;background:none;color:inherit;cursor:pointer;border-radius:50%;
    transition:transform .3s cubic-bezier(.22,.61,.36,1),background .2s ease;
  }
  .wende-menubtn:active{background:rgba(0,0,0,.06)}
  body.wende-nav-open .wende-menubtn{transform:rotate(90deg)}
  .wende-nav-scrim{
    display:block;position:fixed;inset:0;z-index:9990;background:rgba(7,31,24,.5);
    backdrop-filter:blur(2px);
    opacity:0;visibility:hidden;pointer-events:none;
    transition:opacity .3s ease,visibility .3s ease;
  }
  body.wende-nav-open .wende-nav-scrim{opacity:1;visibility:visible;pointer-events:auto}
  body.wende-nav-open{overflow:hidden}

  .topbar .nav,.top nav{
    display:flex;position:absolute;top:100%;left:0;right:0;z-index:9995;
    flex-direction:column;align-items:stretch;gap:0;margin:0;padding:8px 0 14px;
    background:#fff;border-bottom:1px solid #e2e8e4;
    box-shadow:0 22px 40px rgba(6,38,25,.18);
    max-height:calc(100vh - var(--wende-bar-h) - 120px);overflow-y:auto;
    opacity:0;visibility:hidden;pointer-events:none;
    transform:translateY(-12px);transform-origin:top center;
    transition:opacity .3s ease,transform .3s cubic-bezier(.22,.61,.36,1),visibility .3s ease;
    will-change:opacity,transform;
  }
  body.wende-nav-open .topbar .nav,body.wende-nav-open .top nav{
    opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0);
  }
  .topbar .nav a,.top nav a{
    display:flex;align-items:center;min-height:48px;padding:0 22px;
    font-size:13px;font-weight:800;letter-spacing:.6px;color:#17452d;
    border-bottom:1px solid #eef3f0;
    opacity:0;transform:translateY(-8px);
    transition:opacity .3s ease,transform .3s ease,background .2s ease;
  }
  body.wende-nav-open .topbar .nav a,body.wende-nav-open .top nav a{opacity:1;transform:translateY(0)}
  body.wende-nav-open .topbar .nav a:nth-child(1),body.wende-nav-open .top nav a:nth-child(1){transition-delay:.03s}
  body.wende-nav-open .topbar .nav a:nth-child(2),body.wende-nav-open .top nav a:nth-child(2){transition-delay:.06s}
  body.wende-nav-open .topbar .nav a:nth-child(3),body.wende-nav-open .top nav a:nth-child(3){transition-delay:.09s}
  body.wende-nav-open .topbar .nav a:nth-child(4),body.wende-nav-open .top nav a:nth-child(4){transition-delay:.12s}
  body.wende-nav-open .topbar .nav a:nth-child(5),body.wende-nav-open .top nav a:nth-child(5){transition-delay:.15s}
  body.wende-nav-open .topbar .nav a:nth-child(6),body.wende-nav-open .top nav a:nth-child(6){transition-delay:.18s}
  body.wende-nav-open .topbar .nav a:nth-child(7),body.wende-nav-open .top nav a:nth-child(7){transition-delay:.21s}
  body.wende-nav-open .topbar .nav a:nth-child(8),body.wende-nav-open .top nav a:nth-child(8){transition-delay:.24s}
  .topbar .nav a:last-child,.top nav a:last-child{border-bottom:0}
  .topbar .nav a:active,.top nav a:active{background:#f0f6f2}
  .topbar .nav a.active:after{content:none}
  .topbar .nav a.active{color:var(--wende-red)}

  /* tap targets */
  .iconbtn,.slide-toggle,.news-filter,.circleplay,.videoplay{min-width:44px;min-height:44px}
  .team-carousel-controls>button{width:34px;height:34px;min-width:34px;min-height:34px;font-size:16px;line-height:1}
  .team-carousel-controls .team-pause{font-size:16px}
  .team-carousel-dots button{min-width:10px;min-height:10px;width:10px;height:10px}
  .actions{flex-wrap:wrap}
  .actions .primary,.actions .outline{min-height:46px;display:inline-flex;align-items:center;justify-content:center}

  /* Fix layout grid for mobile */
  .layout{display:block}
  .sidebar{width:100%;border-left:none;border-top:1px solid #dce6df}
  .hero{min-height:300px}
  .hero .desc{max-width:100%}
  .shows{grid-template-columns:1fr}
  .newsgrid{grid-template-columns:1fr}
  .team-grid{flex-wrap:nowrap}
}

/* ---------- small phones ---------- */
@media(max-width:460px){
  h1{letter-spacing:-2px;font-size:clamp(34px,10vw,50px);line-height:.95}
  .herotxt{padding:32px 6% 40px}
  .brand-logo{width:54px;height:42px;flex-basis:54px}
  .topbar{padding:0 12px}
  .wende-listenbar .wende-bar-live{display:none}
}

/* ---------- desktop: hide injected mobile chrome ---------- */
@media(min-width:791px){
  .wende-listenbar,.wende-menubtn,.wende-nav-scrim{display:none!important}
}
@media(prefers-reduced-motion:reduce){
  .wende-listenbar .wende-bar-dot{animation:none}
  html{scroll-behavior:auto}
  .wende-nav-scrim,.wende-menubtn,.topbar .nav,.top nav,
  .topbar .nav a,.top nav a{transition:none!important}
}
@keyframes wendePulse{0%,100%{opacity:1}50%{opacity:.35}}

/* ---------- legacy duplicate bottom bar ----------
   The single radio player is now the green .wende-listenbar docked at the
   BOTTOM on mobile. Any leftover red .wende-bottom-player markup stays hidden
   so a second player can never appear (and never stack audio). */
.wende-bottom-player{display:none}
