/* =========================
   TOKENS / BASE
   ========================= */
:root{
  --bg:#0b1220; --bg-soft:#121a2c; --card:#0f172a; --text:#e5e7eb; --muted:#94a3b8;
  --brand:#22d3ee; --brand-strong:#06b6d4; --ok:#10b981;
  --radius:0; --maxw:1200px;

  /* Glass */
  --glass-tint: rgba(3,105,161,.10);
  --glass-line: rgba(3,105,161,.28);
  --glass-shadow: 0 10px 30px rgba(3,105,161,.20);
  --glass-bg: var(--glass-tint);
  --glass-border: var(--glass-line);

  /* Hero / Cards */
  --hero-h: clamp(220px, 30vw, 360px);
  --media-h-min:170px; --media-h-max:260px;
  --card-w-max:480px; --card-w-tab:420px;

  /* Scrollbar */
  --scrollbar-bg: color-mix(in srgb, var(--bg-soft) 60%, transparent);
  --scrollbar-thumb: color-mix(in srgb, var(--muted) 35%, transparent);

  /* Header mais sólido */
  --glass-tint-strong: rgba(6,182,212,.20);
  --glass-line-strong: rgba(6,182,212,.40);
}
@media (prefers-color-scheme: light){
  :root{
    --bg:#f6f7fb; --bg-soft:#fff; --card:#fff; --text:#0f172a; --muted:#475569;
    --glass-tint: rgba(3,105,161,.06);
    --glass-line: rgba(3,105,161,.18);
    --glass-shadow: 0 8px 20px rgba(3,105,161,.12);
  }
}

/* =========================
   RESET / TIPOGRAFIA
   ========================= */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0; line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  font-family:'Inter',ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: radial-gradient(1200px 600px at 80% -10%, rgba(34,211,238,.08), transparent 60%), var(--bg);
}
a{ color:inherit; text-decoration:none; }
.container{ width:min(100%,var(--maxw)); margin:0 auto; padding:0 20px; }
.visually-hidden{ position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }
img,video{ display:block; max-width:100%; border-radius:0 !important; }

/* Utilitário Glass */
.glass{
  background:var(--glass-bg);
  border:1px solid var(--glass-border);
  backdrop-filter:blur(10px) saturate(140%);
  -webkit-backdrop-filter:blur(10px) saturate(140%);
  box-shadow:var(--glass-shadow);
}

/* =========================
   HEADER / MENU / BUSCA
   ========================= */
header.topbar{
  position:sticky; top:0; z-index:50;
  background:var(--glass-tint-strong);
  border-bottom:1px solid var(--glass-line-strong);
  backdrop-filter:blur(14px) saturate(160%);
  -webkit-backdrop-filter:blur(14px) saturate(160%);
  box-shadow:0 10px 24px rgba(6,182,212,.20);
}
.nav{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:18px; min-height:60px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; letter-spacing:.2px; }

.nav-menu{ display:flex; justify-content:center; flex-wrap:wrap; gap:8px; }
.nav-menu .link{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 14px; font-weight:600; font-size:.95rem;
  background:var(--glass-bg); border:1px solid var(--glass-border);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  color:var(--text); box-shadow:var(--glass-shadow);
  transition:background .15s ease,color .15s ease, transform .08s ease;
}
.nav-menu .link:hover{
  background:linear-gradient(135deg,var(--brand),var(--brand-strong));
  color:#0b1220; transform:translateY(-1px);
}

.nav-actions{ display:flex; align-items:center; gap:10px; }
.nav-actions .btn{
  border:0; padding:8px 16px; font-weight:600;
  background:linear-gradient(135deg,var(--brand),var(--brand-strong)); color:#0b1220;
  box-shadow:var(--glass-shadow); transition:transform .08s, filter .2s;
}
.nav-actions .btn:hover{ filter:brightness(1.05); }
.nav-actions .btn:active{ transform:translateY(1px); }

/* Busca estreita */
.search.small{ position:relative; }
.search.small input{
  width:140px; padding:6px 26px 6px 10px;
  background:var(--glass-bg); border:1px solid color-mix(in srgb,var(--muted) 25%, transparent);
  color:var(--text); backdrop-filter:blur(8px); transition:.15s;
}
.search.small input:focus{
  outline:none; border-color:var(--brand-strong);
  background:color-mix(in srgb, var(--brand) 20%, var(--glass-bg));
}
.search.small svg{ position:absolute; right:8px; top:50%; transform:translateY(-50%); opacity:.7; pointer-events:none; }

/* =========================
   TICKER
   ========================= */
.top-ticker{
  position:sticky; top:64px; z-index:40;
  background:var(--glass-tint-strong);
  border-top:1px solid var(--glass-line-strong);
  border-bottom:1px solid var(--glass-line-strong);
  backdrop-filter:blur(14px) saturate(160%);
  -webkit-backdrop-filter:blur(14px) saturate(160%);
  box-shadow:0 10px 24px rgba(6,182,212,.18);
}
.top-ticker .inner{ display:flex; align-items:center; gap:12px; min-height:40px; overflow:hidden; }
.top-ticker .dot{ width:7px; height:7px; border-radius:999px; background:var(--ok); box-shadow:0 0 10px var(--ok); }
#topTickerList{
  display:flex; gap:36px; margin:0; padding:0; list-style:none; white-space:nowrap;
  color:#0f172a; opacity:.95; font-size:.95rem; animation:ticker-run 26s linear infinite;
}
#topTickerList:hover{ animation-play-state:paused; }
@keyframes ticker-run{ from{transform:translateX(0)} to{transform:translateX(-50%)} }
@media (max-width:640px){ #topTickerList{ gap:20px; font-size:.9rem; } }

/* =========================
   HERO (Destaque + Patrocinado)
   ========================= */
.hero{ padding:28px 0 10px; }
.hero-grid{ display:grid; grid-template-columns:1.2fr .8fr; gap:22px; align-items:flex-start; }

.hero-carousel{ position:relative; }
.hero-carousel .viewport{ height:var(--hero-h); overflow:hidden; background:#000; }
.hero-carousel .track{ display:flex; will-change:transform; transition:transform .5s ease; }
.hero-carousel .slide{ flex:0 0 100%; position:relative; height:100%; }
.hero-carousel figure{ margin:0; height:100%; width:100%; background:#000; overflow:hidden; position:relative; }
.hero-carousel img,.hero-carousel video{ width:100%; height:100%; object-fit:cover; }

#sponsorTrack .viewport{ overflow:hidden; }
#sponsorTrack .track{ display:flex; width:100%; transition:transform .35s ease; will-change:transform; }
#sponsorTrack .slide{ flex:0 0 100%; }
#sponsorTrack figure{ margin:0; width:100%; height:var(--hero-h); background:#000; overflow:hidden; position:relative; }
#sponsorTrack img,#sponsorTrack video{ width:100%; height:100%; object-fit:cover; }

.badge{
  position:absolute; top:10px; right:10px; z-index:2; font-size:.78rem; font-weight:700;
  padding:4px 10px; background:#ffffffd9; color:#0f172a;
  backdrop-filter:blur(4px); border:1px solid rgba(0,0,0,.08);
}

/* =========================
   TÍTULOS DE SEÇÃO
   ========================= */
.section-title{
  width:100%; background:var(--brand); color:#0b1220;
  text-align:left; padding:10px 30px; margin:40px 0 20px;
  box-shadow:0 2px 6px rgba(0,0,0,.1);
}
.section-title h2{
  margin:0; font-size:clamp(1.3rem,1rem + 1vw,1.6rem);
  font-weight:700; letter-spacing:.5px;
}

/* =========================
   CARDS
   ========================= */
.card{
  background: transparent !important; border: 0 !important; box-shadow:none !important;
  padding:12px 0; display:flex; flex-direction:column; gap:10px;
  transition:transform .15s ease;
}
.card:hover{ transform:translateY(-2px); }

.media-box{ width:100%; height:clamp(var(--media-h-min),28vw,var(--media-h-max)); overflow:hidden; background:#000; position:relative; }
.media-box>img,.media-box>video{ width:100%; height:100%; object-fit:cover; }

.card-body{ position:relative; padding-bottom:0; }
.card-kicker{ display:none !important; }

/* faixa no título */
.card-title{
  margin: 10px 0 0; padding: 8px 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  color: #0b1220; font-family:'Poppins','Inter',ui-sans-serif;
  font-weight:900; letter-spacing:.5px; text-transform:uppercase;
  display:block;
}
.card-title::before{ content:none; }

.card-excerpt{ display:none !important; }
.card-date{ display:none !important; }

.sharebar{ display:flex; gap:8px; margin:8px 0 0; }
.sharebar--sm{ gap:6px; margin-top:4px; }
.btn-share{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; padding:0; border:none; cursor:pointer;
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color:#0b1220; transition: transform .08s ease, filter .2s ease, background .2s ease;
}
.btn-share:hover{ background: linear-gradient(135deg, var(--brand), var(--brand-strong)); filter: brightness(1.05); }
.sharebar--sm .btn-share{ width:28px; height:28px; }

.media-date{
  position:absolute;right:12px;top:10px;background:transparent!important;border:none!important;
  padding:0!important;color:#fff;opacity:.9;font-weight:700;font-size:.9rem;mix-blend-mode:normal
}

/* =========================
   CARROSSEL HORIZONTAL (cards)
   ========================= */
.carousel{ display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; width:100%; max-width:1200px; margin:0 auto 14px; }
.carousel-viewport{ overflow:hidden; background:var(--glass-bg); border:1px solid var(--glass-border); box-shadow:var(--glass-shadow); }
.carousel-track{ display:flex; transition:transform .35s ease; will-change:transform; }
.carousel .slide{ flex:0 0 calc(100%/3); padding:10px; display:flex; justify-content:center; }
.carousel .card{ width:100%; max-width:var(--card-w-max); margin:0 auto; }
.carousel-btn{
  width:40px; height:40px; font-size:22px; cursor:pointer;
  background:var(--glass-bg); border:1px solid var(--glass-border); box-shadow:var(--glass-shadow); color:var(--text);
}

/* =========================
   LISTA COMPACTA
   ========================= */
.news-list{ list-style:none; margin:18px 0 40px; padding:0; border-top:1px solid color-mix(in srgb,var(--muted) 20%, transparent); }
.news-row{ border-bottom:1px solid color-mix(in srgb,var(--muted) 20%, transparent); }
.news-row .row-link{
  width:100%; display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:12px 6px; border:0; background:transparent; cursor:pointer; text-align:left; color:var(--text);
}
.news-row .row-title{ font-weight:600; }
.news-row .row-date{ color:var(--muted); font-size:.92rem; }
.news-row .row-link:hover{ background:color-mix(in srgb,var(--bg-soft) 50%, transparent); }

/* =========================
   MODAL — AJUSTE AO CONTEÚDO
   ========================= */
#newsModal{ position:fixed; inset:0; z-index:9999; display:none; }
#newsModal.is-open{ display:block; }
.news-modal__backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.48); backdrop-filter:blur(2px); }

.news-modal__dialog{
  position:fixed; inset:28px 10px; left:0; right:0; margin:auto; max-width:1024px;
  max-height:92vh;           /* limite pelo viewport */
  height:auto;               /* altura se ajusta ao conteúdo */
  background:var(--bg); color:var(--text);
  border:1px solid var(--glass-border); box-shadow:var(--glass-shadow);
  display:grid; grid-template-rows:auto 1fr; overflow:hidden; padding:0;
}

/* Faixa do título centralizada com botão dentro */
.news-modal__head{
  position:relative; z-index:1;
  display:flex; align-items:center; justify-content:center;
  padding:0 56px; /* espaço pro X */
  min-height:48px; border-bottom:1px solid var(--glass-border);
  overflow:hidden; text-align:center;
}
.news-modal__head::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(0,160,255,.55), rgba(0,220,255,.30));
  backdrop-filter:blur(10px) saturate(160%); -webkit-backdrop-filter:blur(10px) saturate(160%);
}
.news-modal__title{
  position:relative; z-index:1; margin:0; padding:10px 12px;
  font-weight:800; font-size:1.05rem; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.35);
}
.news-modal__meta{ display:none !important; }

/* botão dentro da faixa, à direita */
.news-modal__close{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  z-index:2; width:36px; height:36px; border-radius:8px;
  border:1px solid color-mix(in srgb, var(--brand) 40%, #fff);
  background:rgba(255,255,255,.95); color:#0b1220; font-size:20px; line-height:1;
  box-shadow:0 6px 16px rgba(0,0,0,.25); cursor:pointer;
}
.news-modal__close:hover{ filter:brightness(1.03); }
.news-modal__close:focus{ outline:3px solid var(--brand-strong); outline-offset:2px; }

/* Conteúdo com altura automática */
.news-carousel{
  position:relative;
  max-height:calc(92vh - 56px); /* 56px ~ cabeçalho */
  overflow:auto;
}
.news-carousel__track{ display:flex; flex-direction:column; gap:0; }
.news-carousel__slide{ height:auto; }                 /* <<< sem 100% */
.news-slide__media{
  display:flex; align-items:center; justify-content:center; background:#000;
  max-height:calc(92vh - 140px);                      /* mídia cabe no viewport */
}
.news-slide__media img,.news-slide__media video{
  width:100%; height:auto; max-height:inherit; object-fit:contain; /* <<< sem corte e sem faixa */
}
.news-slide__body{
  max-height:calc(92vh - 200px);
  overflow:auto; padding:18px; line-height:1.6;
}

.news-dots{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  display:flex; flex-direction:column; gap:6px; pointer-events:none;
}
.news-dot{ width:8px; height:8px; border-radius:999px; background:rgba(148,163,184,.6); }
.news-dot.is-active{ background:#06b6d4; }

/* quando houver apenas um slide, esconde os dots */
#newsModal.single .news-dots{ display:none; }

/* =========================
   RODAPÉ
   ========================= */
.footer-main{
  background:var(--bg-soft);
  border-top:1px solid color-mix(in srgb,var(--muted) 20%, transparent);
  padding:40px 20px; color:var(--muted); text-align:center;
}
.footer-container{ max-width:900px; margin:0 auto; display:flex; flex-direction:column; align-items:center; gap:26px; }
.footer-brand{ display:flex; align-items:center; gap:16px; justify-content:center; text-align:left; }
.footer-brand img{ width:60px; height:60px; box-shadow:0 0 10px rgba(0,0,0,.2); }
.footer-brand h3{ margin:0; font-weight:800; color:var(--text); font-size:1.2rem; }
.footer-brand p{ margin:4px 0 0; font-size:.95rem; color:var(--muted); }
.footer-links{ display:flex; flex-wrap:wrap; gap:14px; justify-content:center; font-weight:500; }
.footer-links a{ color:var(--text); padding:6px 10px; transition:.2s; }
.footer-links a:hover{ background:var(--brand); color:#fff; }

.footer-credit{
  display:flex; align-items:center; justify-content:center; gap:12px;
  background:color-mix(in srgb,var(--bg) 80%, transparent);
  border:1px solid color-mix(in srgb,var(--muted) 25%, transparent);
  padding:12px 18px; box-shadow:0 8px 20px rgba(0,0,0,.15); max-width:fit-content; margin-top:10px;
}
.footer-credit img{ width:54px; height:54px; object-fit:cover; box-shadow:0 0 8px rgba(0,0,0,.25); }
.footer-credit strong{ color:var(--text); font-weight:700; }
.footer-credit span{ font-size:.9rem; color:var(--muted); }

@media (max-width:640px){
  .footer-brand{ flex-direction:column; text-align:center; }
  .footer-credit{ flex-direction:column; gap:6px; }
}

/* =========================
   SCROLLBAR / ACESSIBILIDADE
   ========================= */
*::-webkit-scrollbar{ height:10px; width:10px; }
*::-webkit-scrollbar-track{ background:var(--scrollbar-bg); }
*::-webkit-scrollbar-thumb{ background:var(--scrollbar-thumb); border-radius:10px; }
*{ scrollbar-color:var(--scrollbar-thumb) var(--scrollbar-bg); scrollbar-width:thin; }
@media (prefers-reduced-motion: reduce){
  *{ animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}

/* =========================
   RESPONSIVO
   ========================= */
@media (max-width:1024px){ .carousel .card{ max-width:var(--card-w-tab); } }
@media (max-width:960px){
  .hero-grid{ grid-template-columns:1fr; }
  .carousel .slide{ flex:0 0 50%; }
  .nav{ grid-template-columns:auto 1fr auto; }
}
@media (max-width:640px){
  .carousel .slide{ flex:0 0 100%; }
  .search.small{ display:none; }
  .news-modal__dialog{ inset:8px 6px; max-height:calc(100vh - 14px); }
  .news-modal__title{ font-size:1rem; }
  .news-modal__close{ width:40px; height:40px; font-size:22px; }
}

.carousel .media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Busca padrão unificada */
.search{position:relative;max-width:260px}
.search input[type="search"]{
  width:100%;padding:9px 36px 9px 12px;
  border-radius:10px;
  border:1px solid color-mix(in srgb,var(--muted) 22%, transparent);
  background:var(--bg-soft);color:var(--text);
}
.search input[type="search"]:focus{
  outline:none;border-color:var(--brand-strong);
  background:color-mix(in srgb,var(--brand) 12%, var(--bg-soft));
}
.search svg{
  position:absolute;right:10px;top:50%;transform:translateY(-50%);
  width:18px;height:18px;opacity:.7;pointer-events:none;
}
