/* ============================================================
   ENQUETE — Design System
   Editorial esportivo · Dark mode · Mobile-first
   Fontes: Barlow Condensed (display) + DM Sans (corpo)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,400;0,600;0,700;0,800;0,900;1,700&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── Tokens ──────────────────────────────────────────────── */
:root {
  /* Superfícies */
  --bg:          #090910;
  --surface:     #111118;
  --surface-2:   #1a1a24;
  --surface-3:   #222230;
  --border:      rgba(255,255,255,.07);
  --border-soft: rgba(255,255,255,.04);

  /* Texto */
  --text:        #f0f0f8;
  --text-muted:  #8888a0;
  --text-dim:    #55556a;

  /* Tema (sobreescrito por .theme-*) */
  --accent:      #2563EB;
  --accent-2:    #1d4ed8;
  --accent-glow: rgba(37,99,235,.35);
  --accent-text: #93c5fd;
  --gold:        #f59e0b;

  /* Tipografia */
  --font-display: 'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Espaçamento */
  --gap:   1rem;
  --gap-2: 2rem;
  --r:     .75rem;
  --r-sm:  .4rem;

  /* Animações */
  --ease: cubic-bezier(.16,1,.3,1);
}

/* Temas por programa */
.theme-blue   { --accent:#2563EB; --accent-2:#1d4ed8; --accent-glow:rgba(37,99,235,.35); --accent-text:#93c5fd; }
.theme-orange { --accent:#ea580c; --accent-2:#c2410c; --accent-glow:rgba(234,88,12,.35);  --accent-text:#fdba74; }
.theme-green  { --accent:#16a34a; --accent-2:#15803d; --accent-glow:rgba(22,163,74,.35);  --accent-text:#86efac; }
.theme-pink   { --accent:#c026d3; --accent-2:#a21caf; --accent-glow:rgba(192,38,211,.35); --accent-text:#f0abfc; }
.theme-red    { --accent:#dc2626; --accent-2:#b91c1c; --accent-glow:rgba(220,38,38,.35);  --accent-text:#fca5a5; }
.theme-teal   { --accent:#0891b2; --accent-2:#0e7490; --accent-glow:rgba(8,145,178,.35);  --accent-text:#67e8f9; }

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

img { max-width:100%; height:auto; display:block; }
a { color:inherit; text-decoration:none; }
button { cursor:pointer; border:none; background:none; font:inherit; }
ul, ol { list-style:none; }

/* ── Tipografia ───────────────────────────────────────────── */
h1,h2,h3,h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.01em;
  text-transform: uppercase;
}

h1 { font-size: clamp(2.2rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }
h4 { font-size: 1.1rem; }

.eyebrow {
  font-family: var(--font-display);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-2);
}

@media (min-width: 900px) {
  .grid-main { grid-template-columns: 1fr 320px; }
}

/* ── Cabeçalho ────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,16,.85);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 56px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: .9rem;
  color: #fff;
  letter-spacing: -.03em;
  box-shadow: 0 0 16px var(--accent-glow);
  transition: box-shadow .3s;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  text-transform: uppercase;
  line-height: 1;
}

.logo-text span { color: var(--accent-text); }

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-nav::-webkit-scrollbar { display:none; }

.nav-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .4rem .75rem;
  border-radius: var(--r-sm);
  color: var(--text-muted);
  white-space: nowrap;
  transition: color .2s, background .2s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.cta {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 12px var(--accent-glow);
}

.nav-link.cta:hover { background: var(--accent-2); }

/* ── Hero da enquete ──────────────────────────────────────── */
.poll-hero {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 2rem 1.5rem;
}

/* Fundo decorativo */
.poll-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, var(--accent-glow), transparent),
    radial-gradient(ellipse 40% 40% at 90% 110%, rgba(255,255,255,.03), transparent);
  pointer-events: none;
}

.poll-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .25rem .75rem;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.live-dot {
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  animation: pulse-dot 1.4s ease infinite;
}

@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(.7); }
}

.poll-hero-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin-bottom: .5rem;
}

.poll-hero-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 2rem;
}

/* ── Opções de votação ────────────────────────────────────── */
.poll-options { display:flex; flex-direction:column; gap:.75rem; }

.poll-option {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .25s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}

.poll-option:hover { border-color: var(--accent); transform: translateX(2px); }
.poll-option.voted  { border-color: var(--accent); background: var(--surface-3); }
.poll-option.leader { border-color: var(--gold); }

/* Barra de progresso por trás */
.poll-option-bar {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--accent-glow), transparent);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 1.2s var(--ease);
  pointer-events: none;
}

.poll-option.leader .poll-option-bar {
  background: linear-gradient(90deg, rgba(245,158,11,.15), transparent);
}

/* Foto do participante */
.option-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-3);
  border: 2px solid var(--border);
  transition: border-color .25s;
  flex-shrink: 0;
}

.poll-option.leader .option-photo { border-color: var(--gold); }

.option-photo-placeholder {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface-3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--accent-text);
  flex-shrink: 0;
}

.option-info { min-width: 0; }

.option-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-sub {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

.option-pct {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.6rem;
  letter-spacing: -.03em;
  color: var(--text-muted);
  transition: color .3s;
  white-space: nowrap;
}

.poll-option.leader .option-pct { color: var(--gold); }
.poll-option.voted  .option-pct { color: var(--accent-text); }

/* Coroa do líder */
.leader-crown {
  position: absolute;
  top: .5rem;
  right: .75rem;
  font-size: .85rem;
  opacity: .8;
}

/* ── Botão de votar ───────────────────────────────────────── */
.btn-vote {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--r);
  text-align: center;
  box-shadow: 0 0 24px var(--accent-glow);
  transition: background .2s, transform .15s, box-shadow .2s;
}

.btn-vote:hover:not(:disabled) { background: var(--accent-2); transform: translateY(-1px); }
.btn-vote:active { transform: translateY(0); }
.btn-vote:disabled { opacity:.5; cursor:not-allowed; }

.poll-total {
  text-align: center;
  margin-top: 1rem;
  font-size: .8rem;
  color: var(--text-dim);
}

/* ── Cards de notícias ────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .news-grid { grid-template-columns: repeat(3, 1fr); }
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s, transform .2s;
}

.news-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.news-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-2);
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.news-card:hover .news-card-img img { transform: scale(1.04); }

.news-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.news-card-tag {
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.news-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  line-height: 1.2;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-date {
  font-size: .75rem;
  color: var(--text-dim);
  margin-top: auto;
}

/* Card destaque (ocupa 2 colunas) */
.news-card.featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

@media (min-width: 640px) {
  .news-card.featured .news-card-img { flex: 0 0 55%; aspect-ratio: auto; min-height: 240px; }
  .news-card.featured .news-card-body { padding: 1.5rem; }
  .news-card.featured .news-card-title { font-size: 1.4rem; }
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar { display:flex; flex-direction:column; gap:var(--gap); }

.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
}

.widget-header {
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.widget-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.widget-body { padding: 1rem; }

/* ── Lista de participantes ───────────────────────────────── */
.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}

.participant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  text-align: center;
  transition: border-color .25s, transform .2s;
}

.participant-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.participant-card.eliminated {
  opacity: .5;
  filter: grayscale(.8);
}

.participant-card.eliminated:hover { opacity:.7; }

.participant-photo {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--surface-2);
}

.participant-photo img {
  width:100%; height:100%;
  object-fit: cover;
  transition: transform .4s var(--ease);
}

.participant-card:hover .participant-photo img { transform:scale(1.06); }

.participant-info { padding: .75rem .5rem; }

.participant-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.participant-occ {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.participant-badge {
  display: inline-block;
  font-size: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .15rem .5rem;
  border-radius: 99px;
  margin-top: .4rem;
}

.participant-badge.active { background: var(--accent-glow); color: var(--accent-text); }
.participant-badge.eliminated { background: rgba(255,255,255,.06); color: var(--text-dim); }

/* ── Artigo de notícia ────────────────────────────────────── */
.article-header {
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.article-title { margin-bottom: 1rem; }

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: .8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-cover {
  margin-bottom: 2rem;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16/9;
}

.article-cover img { width:100%; height:100%; object-fit:cover; }

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #d0d0e0;
}

.article-body p { margin-bottom: 1.25rem; }
.article-body h2, .article-body h3 { margin: 2rem 0 .75rem; color: var(--text); }
.article-body a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.article-body img { border-radius: var(--r-sm); margin: 1.5rem 0; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: .75rem 1.25rem;
  background: var(--surface-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--text-muted);
}

/* ── Seção com título ─────────────────────────────────────── */
.section { padding-block: 2rem; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: .02em;
  position: relative;
}

/* Linha decorativa antes do título */
.section-title::before {
  content: '';
  display: inline-block;
  width: .25rem;
  height: 1em;
  background: var(--accent);
  border-radius: 2px;
  margin-right: .6rem;
  vertical-align: middle;
  box-shadow: 0 0 8px var(--accent-glow);
}

.section-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-text);
  white-space: nowrap;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding-block: 2.5rem;
  color: var(--text-dim);
  font-size: .85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
}

.footer-links a { color:var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }

/* ── Badges e Tags ────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .65rem;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.tag.accent { background: var(--accent-glow); color: var(--accent-text); border-color: transparent; }
.tag.live   { background: rgba(220,38,38,.15); color: #fca5a5; border-color: transparent; }

/* ── Paginação ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: 2rem;
}

.page-btn {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all .2s;
}

.page-btn:hover { border-color: var(--accent); color: var(--text); }
.page-btn.active { background: var(--accent); color:#fff; border-color:transparent; }

/* ── Toast de feedback ────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: .75rem 1.5rem;
  border-radius: 99px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: toast-in .4s var(--ease) both, toast-out .4s var(--ease) 3s both;
}

.toast.success { background: #16a34a; color:#fff; }
.toast.error   { background: #dc2626; color:#fff; }
.toast.info    { background: var(--accent); color:#fff; }

@keyframes toast-in  { from { opacity:0; transform:translateY(12px) scale(.95); } }
@keyframes toast-out { to   { opacity:0; transform:translateY(-8px)  scale(.95); } }

/* ── Loading skeleton ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}

@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Utilitários ──────────────────────────────────────────── */
.text-center { text-align:center; }
.text-muted  { color:var(--text-muted); }
.text-accent { color:var(--accent-text); }
.mt-1 { margin-top:.5rem; }
.mt-2 { margin-top:1rem; }
.mt-3 { margin-top:1.5rem; }
.mt-4 { margin-top:2rem; }
.gap-1 { gap:.5rem; }
.flex  { display:flex; }
.items-center { align-items:center; }
.hidden { display:none; }

/* ── Responsividade ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hide-mobile { display:none !important; }
  .poll-option { grid-template-columns: 48px 1fr auto; padding:.875rem 1rem; }
  .option-photo, .option-photo-placeholder { width:48px; height:48px; }
  .option-pct { font-size:1.3rem; }
}

@media (min-width: 641px) {
  .hide-desktop { display:none !important; }
}

/* ── Acessibilidade ───────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
