/* =====================================================================
   style.css - Portal Web Rádio Premium
   Design: Dark mode premium, glassmorphism sutil, gradientes suaves
   ===================================================================== */

:root {
  --color-primary: #6c63ff;
  --color-primary-light: #8b83ff;
  --color-secondary: #0f0f1a;
  --color-bg: #0a0a12;
  --color-surface: #14141f;
  --color-surface-2: #1c1c2b;
  --color-border: #2a2a3d;
  --color-text: #f2f2f7;
  --color-text-muted: #9a9ab0;
  --color-accent: #ff6b6b;
  --color-success: #4ecdc4;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-glow: 0 8px 32px rgba(108, 99, 255, 0.25);
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(circle at top, #171727 0%, var(--color-bg) 60%);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

a { color: var(--color-primary-light); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--color-primary); }

::selection { background: var(--color-primary); color: #fff; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-surface-2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ---------- Header / Navbar ---------- */
.site-header {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(10, 10, 18, 0.86);
  backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: box-shadow .3s ease;
}
.site-header.is-scrolled { box-shadow: 0 4px 24px rgba(0,0,0,.35); }

.site-header .navbar-brand { display: flex; align-items: center; gap: .75rem; }
.site-header .navbar-brand img { height: 42px; width: 42px; max-width: 42px; max-height: 42px; object-fit: contain; border-radius: 10px; flex-shrink: 0; }

.site-header .nav-link {
  color: var(--color-text) !important;
  font-weight: 500;
  font-size: .92rem;
  padding: .5rem 1rem !important;
  position: relative;
}
.site-header .nav-link::after {
  content: '';
  position: absolute;
  left: 1rem; right: 1rem; bottom: .1rem;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.site-header .nav-link:hover::after { transform: scaleX(1); }

/* ---------- Player ---------- */
.player-bar {
  background: linear-gradient(115deg, rgba(28,28,43,.96), rgba(18,18,28,.98));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.35rem;
  display: flex;
  align-items: center;
  gap: 1.1rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  overflow: hidden;
}
.player-bar::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(108,99,255,.08), transparent 40%);
  pointer-events: none;
}
.player-bar.player-fixed-bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 999;
  border-radius: 0;
  border-left: none; border-right: none; border-bottom: none;
  padding: .75rem 1.35rem;
}

.player-cover-wrap {
  position: relative;
  flex-shrink: 0;
  width: 60px; height: 60px;
}
.player-cover {
  width: 60px; height: 60px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--color-surface-2);
  box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.player-cover-wrap .live-ring {
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  border: 2px solid var(--color-success);
  opacity: .6;
  animation: ring-pulse 2s infinite ease-out;
  pointer-events: none;
}
@keyframes ring-pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.14); opacity: 0; }
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.player-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #524ad1);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(108,99,255,.45);
}
.player-btn:hover { transform: scale(1.07); box-shadow: 0 8px 26px rgba(108,99,255,.6); }
.player-btn:active { transform: scale(.96); }
.player-btn.is-loading i { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.player-meta { min-width: 0; flex: 1 1 auto; }
.player-onair {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em;
  color: var(--color-success);
  text-transform: uppercase;
  margin-bottom: .15rem;
}
.player-onair .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-success); animation: pulse 1.6s infinite; }
.player-onair.is-offline { color: var(--color-text-muted); }
.player-onair.is-offline .dot { background: var(--color-text-muted); animation: none; }
.player-meta .track-title { font-weight: 700; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta .track-artist { font-size: .82rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Equalizador animado (barrinhas estilo "tocando agora") */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-right: .4rem;
  flex-shrink: 0;
}
.eq-bars span {
  width: 3px;
  background: var(--color-success);
  border-radius: 2px;
  animation: eq-bounce 1s ease-in-out infinite;
}
.eq-bars span:nth-child(1) { height: 40%; animation-delay: -0.9s; }
.eq-bars span:nth-child(2) { height: 100%; animation-delay: -0.5s; }
.eq-bars span:nth-child(3) { height: 65%; animation-delay: -0.7s; }
.eq-bars span:nth-child(4) { height: 85%; animation-delay: -0.2s; }
.eq-bars.is-paused span { animation-play-state: paused; height: 25% !important; opacity: .4; }
@keyframes eq-bounce {
  0%, 100% { height: 25%; }
  50% { height: 100%; }
}

.player-listeners {
  font-size: .78rem;
  color: var(--color-text-muted);
  display: flex; align-items: center; gap: .35rem;
  white-space: nowrap;
}
.player-listeners i { color: var(--color-success); }

.player-actions { display: flex; align-items: center; gap: .5rem; }
.player-actions button {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .2s ease;
}
.player-actions button:hover, .player-actions button.active { color: #fff; border-color: var(--color-primary); background: var(--color-primary); }

.player-volume { width: 90px; accent-color: var(--color-primary); }

/* Banner do Canal — imagem de destaque no topo da Web TV, 100% responsiva,
   ocupa toda a largura do site de ponta a ponta e é exibida por inteiro
   (sem cortar nem deformar) em qualquer tela: celular, tablet ou PC. */
.channel-banner-section {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}
.channel-banner-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* Bloco compacto com o nome/logo da emissora — fica acima do Player Principal de TV */
.station-brand-bar {
  padding: .5rem 0 0;
}
.station-brand-block {
  display: flex;
  align-items: center;
  gap: .65rem;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  background: var(--color-surface, rgba(255,255,255,.04));
  border: 1px solid var(--color-border);
  backdrop-filter: blur(6px);
}
.station-brand-block img {
  height: 34px;
  width: 34px;
  max-height: 34px;
  max-width: 34px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}
.station-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.station-brand-name { font-family: var(--font-heading); font-weight: 700; font-size: .95rem; }
.station-brand-slogan { font-size: .7rem; color: var(--color-text-muted); }
@media (max-width: 767px) {
  .station-brand-bar { padding-top: .5rem; }
  .station-brand-name { font-size: .85rem; }
  .station-brand-slogan { font-size: .65rem; }
}

/* Player principal de TV/Câmera — em destaque, logo abaixo do menu */
.tv-player-main {
  padding: .5rem 0 0;
  position: relative;
}
.tv-player-frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #000;
  box-shadow: var(--shadow-glow), 0 20px 50px rgba(0,0,0,.5);
  max-width: 1100px;
  margin: 0 auto;
}
.tv-player-frame .ratio { background: #000; }
.tv-player-frame iframe,
.tv-player-frame video,
.tv-player-frame embed {
  width: 100%;
  height: 100%;
  border: 0;
}
@media (max-width: 767px) {
  .tv-player-main { padding-top: .5rem; }
  .tv-player-frame { border-radius: 14px; }
}

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; position: relative; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: .5rem; }
.section-subtitle { color: var(--color-text-muted); margin-bottom: 2.5rem; }
.section-badge {
  display: inline-block;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--color-primary-light);
  background: rgba(108,99,255,0.12);
  border: 1px solid rgba(108,99,255,0.35);
  padding: .3rem .8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ---------- Hero ---------- */
.hero {
  display: flex;
  align-items: center;
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
@media (max-width: 767px) {
  .hero { padding: 2.5rem 0 2rem; }
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%; right: -10%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(108,99,255,0.25), transparent 70%);
  filter: blur(60px);
  z-index: 0;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -25%; left: -15%;
  width: 50%; height: 50%;
  background: radial-gradient(circle, rgba(78,205,196,0.14), transparent 70%);
  filter: blur(70px);
  z-index: 0;
}
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 1rem; }
.hero p.lead { color: var(--color-text-muted); font-size: 1.15rem; max-width: 560px; }

/* ---------- Cards ---------- */
.card-glass {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card-glass:hover { transform: translateY(-6px); border-color: var(--color-primary); box-shadow: var(--shadow-glow); }

/* Programação */
.program-card { overflow: hidden; }
.program-card img { height: 200px; width: 100%; object-fit: cover; }
.program-card .badge-time { font-size: .75rem; }
.program-card.is-live { border-color: var(--color-success); box-shadow: 0 0 0 1px var(--color-success); }
.program-card .live-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--color-success); color: #06231f;
  font-size: .68rem; font-weight: 700; letter-spacing: .05em;
  padding: .25rem .6rem; border-radius: 999px;
}

/* Publicidade */
.ad-banner { border-radius: var(--radius-md); overflow: hidden; display: block; }
.ad-banner img { width: 100%; display: block; }

/* Parceiros — carrossel contínuo, 4 logos visíveis por vez, rotação direita -> esquerda */
.partners-carousel {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.partners-track {
  display: flex;
  align-items: stretch;
  gap: 1.5rem;
  width: max-content;
  animation: partners-scroll calc(var(--partners-count, 8) * 3.2s) linear infinite;
}
.partners-carousel:hover .partners-track,
.partners-carousel:focus-within .partners-track {
  animation-play-state: paused;
}
.partner-card {
  flex: 0 0 auto;
  width: clamp(190px, 22vw, 260px);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.5rem;
  min-height: 140px;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.partner-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}
.partner-card img {
  max-height: 90px;
  width: 100%;
  object-fit: contain;
}
/* A trilha é duplicada no HTML (mesmos itens 2x); ao deslocar exatamente
   metade da largura o loop fica perfeitamente contínuo e sem espaços. */
@keyframes partners-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (max-width: 991px) {
  .partner-card { width: clamp(160px, 34vw, 220px); }
}
@media (max-width: 767px) {
  .partner-card { min-height: 110px; padding: 1.25rem 1rem; width: clamp(140px, 46vw, 190px); }
  .partner-card img { max-height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .partners-track { animation: none; }
}

/* Espaçamento quando o player fica fixo no rodapé (evita cobrir o footer) */
body.has-bottom-player { padding-bottom: 88px; }
body.has-bottom-player .whatsapp-float { bottom: 104px; }
@media (max-width: 767px) {
  body.has-bottom-player { padding-bottom: 78px; }
  body.has-bottom-player .whatsapp-float { bottom: 92px; }
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 60px; height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem;
  box-shadow: 0 8px 24px rgba(37,211,102,0.45);
  z-index: 998;
  transition: transform .2s ease, bottom .2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* Footer */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 3.5rem 0 1.5rem; }
.social-icons a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-text);
  margin-right: .5rem;
  transition: all .2s ease;
}
.social-icons a:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---------- Página interna (galeria, vídeos, podcasts, eventos, equipe) ---------- */
.page-hero {
  padding: 3.5rem 0 2.5rem;
  text-align: center;
  background: radial-gradient(circle at top, rgba(108,99,255,.12), transparent 65%);
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero p { color: var(--color-text-muted); max-width: 600px; margin: 0 auto; }

/* Galeria */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.gallery-item {
  position: relative; border-radius: var(--radius-md); overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
  border: 1px solid var(--color-border);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gallery-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .75rem .9rem;
  background: linear-gradient(0deg, rgba(0,0,0,.75), transparent);
  font-size: .8rem; opacity: 0; transition: opacity .25s ease;
}
.gallery-item:hover .gallery-caption { opacity: 1; }
.album-filter-btn {
  border: 1px solid var(--color-border); background: transparent; color: var(--color-text-muted);
  padding: .4rem 1rem; border-radius: 999px; font-size: .82rem; transition: all .2s ease;
}
.album-filter-btn.active, .album-filter-btn:hover { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* Vídeos */
.video-card { overflow: hidden; }
.video-card .video-thumb { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.video-card .video-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-card .play-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,18,.35); opacity: 0; transition: opacity .2s ease;
}
.video-card:hover .play-overlay { opacity: 1; }
.video-card .play-overlay i { font-size: 3rem; color: #fff; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }

/* Podcasts */
.podcast-card { display: flex; gap: 1rem; align-items: center; padding: 1rem; }
.podcast-card img { width: 76px; height: 76px; border-radius: 14px; object-fit: cover; flex-shrink: 0; }
.podcast-card .ep-badge { font-size: .7rem; color: var(--color-primary-light); }

/* Eventos */
.event-card { display: flex; gap: 1rem; overflow: hidden; }
.event-card .event-date {
  flex-shrink: 0; width: 74px; background: var(--color-primary); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.event-card .event-date .day { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.event-card .event-date .month { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }

/* Equipe */
.team-card { text-align: center; padding: 1.5rem 1rem; }
.team-card img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 3px solid var(--color-border); }

/* Responsivo */
@media (max-width: 767px) {
  .player-meta .track-artist { display: none; }
  .player-bar { flex-wrap: wrap; }
  .section { padding: 3.5rem 0; }
}

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
