/* css/ticker.css — top announcement ticker above the navbar */
:root{--ticker-h:40px;}

.ticker-bar{
  position:fixed;top:0;left:0;right:0;z-index:1002;height:var(--ticker-h);
  display:flex;align-items:center;
  background:linear-gradient(90deg,var(--primary),color-mix(in srgb,var(--primary) 72%,black));
  color:#fff;overflow:hidden;box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.ticker-label{
  display:flex;align-items:center;gap:8px;flex-shrink:0;height:100%;
  padding:0 16px;background:var(--accent);color:#0d3b18;
  font-size:.74rem;font-weight:800;letter-spacing:1px;text-transform:uppercase;
}
.ticker-dot{width:8px;height:8px;border-radius:50%;background:#0d3b18;animation:tickerpulse 1.4s ease-in-out infinite;}
@keyframes tickerpulse{0%,100%{opacity:.4;transform:scale(.8)}50%{opacity:1;transform:scale(1.2)}}

.ticker-viewport{flex:1;overflow:hidden;position:relative;height:100%;display:flex;align-items:center;}
.ticker-track{display:inline-flex;align-items:center;white-space:nowrap;will-change:transform;animation:tickerscroll 30s linear infinite;}
.ticker-item{font-size:.9rem;font-weight:600;padding:0 4px;}
.ticker-sep{padding:0 22px;color:var(--accent);font-weight:800;}
.ticker-bar:hover .ticker-track{animation-play-state:paused;}
@keyframes tickerscroll{from{transform:translateX(0)}to{transform:translateX(-50%)}}

/* push navbar + page down by ticker height when ticker is present */
body:has(.ticker-bar) .navbar{top:var(--ticker-h);}
body:has(.ticker-bar) .hero-slider,
body:has(.ticker-bar) .pg-banner{margin-top:calc(72px + var(--ticker-h));}

/* fallback for browsers without :has() — JS adds this class */
body.has-ticker .navbar{top:var(--ticker-h);}
body.has-ticker .hero-slider,
body.has-ticker .pg-banner{margin-top:calc(72px + var(--ticker-h));}

@media (max-width:640px){
  :root{--ticker-h:36px;}
  .ticker-label{padding:0 10px;font-size:.66rem;}
  .ticker-item{font-size:.82rem;}
  .ticker-sep{padding:0 14px;}
  .ticker-track{animation-duration:20s;}
}
@media (prefers-reduced-motion:reduce){
  .ticker-track{animation:none;}
  .ticker-viewport{overflow-x:auto;}
}
