/* ═══════════════════════════════════════════════════
   Liga Parreto — Public Football Theme
   ═══════════════════════════════════════════════════ */
:root {
  --bg:      #0a0e1a;
  --bg2:     #111827;
  --bg3:     #1a2235;
  --border:  #1e2d45;
  --accent:  #00c4ff;
  --accent2: #00e676;
  --gold:    #ffd700;
  --danger:  #ff4444;
  --text:    #e8f0ff;
  --muted:   #6b7fa3;
  --radius:  10px;
  --green:   #1a3a1a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
a { color: inherit; text-decoration: none; }

/* ── PUBLIC NAV ── */
.pub-nav {
  background: linear-gradient(180deg, #060d1a 0%, #0d1a2e 100%);
  border-bottom: 2px solid var(--accent);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 20px rgba(0,196,255,.15);
}
.pub-nav-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center; gap: 0;
  height: 64px; padding: 0 20px;
}
.pub-nav-logo {
  display: flex; align-items: center; gap: 10px;
  margin-right: 32px; text-decoration: none;
}
.pub-nav-logo img { height: 38px; width: auto; }
.pub-nav-logo span {
  font-size: 18px; font-weight: 900; letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-transform: uppercase;
}
.pub-nav-links { display: flex; align-items: stretch; flex: 1; }
.pub-nav-links a {
  display: flex; align-items: center; padding: 0 16px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .5px;
  transition: all .2s; border-bottom: 3px solid transparent;
  text-decoration: none;
}
.nav-label-short { display: none; }
.nav-label-full  { display: inline; }
.pub-nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.pub-nav-links a.active { color: var(--accent); border-bottom-color: var(--accent); }
.pub-nav-cta {
  margin-left: auto;
  background: linear-gradient(135deg, var(--accent), #0090cc);
  color: #000 !important; font-weight: 700 !important;
  padding: 8px 20px !important; border-radius: 8px !important;
  border-bottom: none !important; font-size: 13px !important;
  transition: opacity .2s !important;
}
.pub-nav-cta:hover { opacity: .85 !important; background: linear-gradient(135deg, var(--accent), #0090cc) !important; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #060d1a 0%, #0d1a2e 50%, #0a1628 100%);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden;
  padding: 60px 20px;
  text-align: center;
}
.hero > * { position: relative; z-index: 1; }
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0,196,255,.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,196,255,.1); border: 1px solid rgba(0,196,255,.3);
  color: var(--accent); font-size: 11px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 1px;
}
.hero h1 {
  font-size: clamp(28px, 6vw, 52px); font-weight: 900;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  margin-bottom: 12px; line-height: 1.1;
}
.hero p { color: var(--muted); font-size: 16px; max-width: 500px; margin: 0 auto; }

/* ── CARDS ── */
.pub-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color .2s;
}
.pub-card:hover { border-color: rgba(0,196,255,.3); }
.pub-card-sm { background:var(--bg2); border:1px solid var(--border); border-radius:8px; padding:12px 14px; }

/* ── SECTION ── */
.pub-section { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.pub-section-title {
  font-size: 22px; font-weight: 800;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.pub-section-title::after {
  content: ''; flex: 1; height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
}

/* ── STANDINGS TABLE ── */
.std-table { width: 100%; border-collapse: collapse; }
.std-table th {
  color: var(--muted); font-size: 10px; text-transform: uppercase;
  letter-spacing: .6px; padding: 8px 10px; text-align: center;
  border-bottom: 1px solid var(--border);
}
.std-table th:nth-child(2), .std-table td:nth-child(2) { text-align: left; }
.std-table td { padding: 10px 10px; border-bottom: 1px solid var(--border); text-align: center; font-size: 13px; }
.std-table tr:last-child td { border-bottom: none; }
.std-table tr:hover td { background: rgba(0,196,255,.04); }
.std-table tr.highlight td { background: rgba(0,196,255,.07); }

/* ── POSITION BADGES ── */
.pos-badge { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.pos-1 { background: rgba(255,215,0,.2); color: var(--gold); }
.pos-2 { background: rgba(192,192,192,.2); color: #c0c0c0; }
.pos-3 { background: rgba(205,127,50,.2); color: #cd7f32; }
.pos-n { background: var(--bg3); color: var(--muted); }

/* ── NEWS CARD ── */
.news-card {
  display: block; background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all .2s;
  text-decoration: none; cursor: pointer;
}
.news-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,196,255,.1); }
.news-card-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: var(--bg3); }
.news-card-body { padding: 16px; }
.news-card-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); margin-bottom: 8px; }
.news-card-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.4; }
.news-card-date { font-size: 11px; color: var(--muted); }
.news-pinned { border-color: var(--gold); }
.news-pinned .news-card-tag { color: var(--gold); }

/* ── TEAM CARD ── */
.team-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  text-align: center; transition: all .2s;
}
.team-card:hover { border-color: rgba(0,196,255,.4); transform: translateY(-2px); }
.team-logo-lg { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; margin: 0 auto 12px; display: block; }
.team-logo-ph { width: 72px; height: 72px; background: var(--bg3); border-radius: 12px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 32px; }
.team-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.team-mgr  { font-size: 12px; color: var(--muted); }
.div-badge { font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 700; margin-top: 8px; display: inline-block; }
.div-primera { background: rgba(0,196,255,.15); color: var(--accent); }
.div-segunda  { background: rgba(0,230,118,.12); color: var(--accent2); }

/* ── HOF ── */
.hof-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; background: var(--bg2);
  border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; transition: border-color .2s;
}
.hof-card:hover { border-color: rgba(255,215,0,.3); }
.hof-trophy { font-size: 28px; flex-shrink: 0; }
.hof-info { flex: 1; min-width: 0; }
.hof-comp { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.hof-winner { font-size: 16px; font-weight: 700; }
.hof-season { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── MATCH ROWS ── */
.match-row { display: flex; align-items: center; padding: 9px 6px; border-bottom: 1px solid var(--border); gap: 8px; }
.match-row:last-child { border-bottom: none; }
.match-home { flex: 1; text-align: right; font-size: 13px; font-weight: 500; }
.match-away { flex: 1; font-size: 13px; font-weight: 500; }
.match-score { min-width: 52px; text-align: center; font-weight: 700; font-size: 15px; color: var(--accent); }
.match-pending { color: var(--muted); font-size: 12px; font-weight: 400; }
.round-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .6px; padding: 10px 0 4px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }

/* ── GRID ── */
.pub-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pub-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pub-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ── COMP TABS ── */
.comp-tabs { display: flex; gap: 4px; background: var(--bg3); border-radius: 10px; padding: 4px; margin-bottom: 20px; overflow-x: auto; }
.comp-tab { flex: 1; text-align: center; padding: 9px 6px; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); border: none; background: none; transition: all .15s; min-width: 90px; white-space: nowrap; }
.comp-tab.active { background: var(--bg2); color: var(--accent); border-bottom: 2px solid var(--accent); }

/* ── FOOTER ── */
.pub-footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  text-align: center; padding: 24px 20px;
  color: var(--muted); font-size: 12px; margin-top: 60px;
}

/* ── BADGES ── */
.badge-live { background: rgba(255,68,68,.15); color: var(--danger); border: 1px solid rgba(255,68,68,.3); padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.badge-finished { background: var(--bg3); color: var(--muted); border: 1px solid var(--border); padding: 2px 8px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.badge-comp { padding: 3px 10px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.badge-primera  { background: rgba(0,196,255,.1);  color: var(--accent); }
.badge-segunda  { background: rgba(0,230,118,.1);  color: var(--accent2); }
.badge-champions{ background: rgba(255,215,0,.1);  color: var(--gold); }
.badge-europa   { background: rgba(255,140,0,.1);  color: #ff8c00; }
.badge-pakiu    { background: rgba(200,100,255,.1); color: #c864ff; }

@media (max-width: 768px) {
  .pub-grid-3, .pub-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .pub-grid-2 { grid-template-columns: 1fr; }
  .pub-nav-logo span { display: none; }
  .std-table .hide-sm { display: none; }
  .pub-nav-inner { padding: 0 12px; }
  .pub-nav-links a { padding: 0 10px; font-size: 11px; }
}
@media (max-width: 480px) {
  .pub-grid-3, .pub-grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 40px 16px; }

  /* Nav en dos filas: logo+CTA arriba, links abajo */
  .pub-nav-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 0;
    gap: 0;
  }
  .pub-nav-logo {
    flex: 1; height: 48px; padding: 0 12px; margin-right: 0;
    display: flex; align-items: center;
  }
  .pub-nav-cta {
    height: 48px !important; padding: 0 16px !important;
    border-radius: 0 !important; font-size: 12px !important;
    display: flex !important; align-items: center !important;
  }
  /* Los links van a la segunda fila */
  .pub-nav-links:not(.pub-nav-cta) {
    order: 3; width: 100%; flex: none;
    height: 38px;
    border-top: 1px solid rgba(255,255,255,.07);
    background: rgba(0,0,0,.2);
  }
  .pub-nav-links a {
    flex: 1; justify-content: center; text-align: center;
    padding: 0 2px; font-size: 10px; height: 38px;
    letter-spacing: 0;
  }
  .nav-label-full  { display: none; }
  .nav-label-short { display: inline; }
}

/* ── EN DIRECTO ─────────────────────────────────────── */
.live-dot {
  display: inline-block;
  width: 10px; height: 10px;
  background: #f04040;
  border-radius: 50%;
  animation: livepulse 1.2s ease-in-out infinite;
}
.live-dot-sm {
  display: inline-block;
  width: 7px; height: 7px;
  background: #f04040;
  border-radius: 50%;
  animation: livepulse 1.2s ease-in-out infinite;
  margin-right: 4px;
  vertical-align: middle;
}
@keyframes livepulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(1.3); }
}

.live-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.live-card-inner {
  background: linear-gradient(135deg, #1a0a2e 0%, #1e1035 100%);
  border: 1.5px solid rgba(145, 71, 255, .35);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: border-color .2s, transform .15s;
  position: relative;
}
.live-card-inner:hover {
  border-color: #9147ff;
  transform: translateY(-2px);
}
.live-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  color: #f04040;
  background: rgba(240,64,64,.12);
  border: 1px solid rgba(240,64,64,.3);
  border-radius: 20px;
  padding: 2px 8px;
  margin-bottom: 10px;
}
.live-logo {
  width: 52px; height: 52px;
  object-fit: contain;
  border-radius: 8px;
  margin: 0 auto 8px;
  display: block;
}
.live-logo-ph {
  width: 52px; height: 52px;
  border-radius: 8px;
  background: rgba(145,71,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 8px;
}
.live-team {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-twitch {
  font-size: 12px;
  color: #9147ff;
  font-weight: 600;
}
.live-desc {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  margin-bottom: 6px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── LIVE EMBED ─────────────────────────────────────── */
.live-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  gap: 20px;
}

.live-card { display: block; }

.live-card-inner {
  background: linear-gradient(135deg, #1a0a2e 0%, #1e1035 100%);
  border: 1.5px solid rgba(145, 71, 255, .35);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s;
}
.live-card-inner:hover { border-color: #9147ff; }

.live-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  gap: 10px;
}

.live-twitch-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #9147ff;
  font-weight: 600;
  text-decoration: none;
}
.live-twitch-link:hover { text-decoration: underline; }

.live-embed-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  background: #000;
}
.live-embed {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.live-card-footer {
  padding: 10px 14px 12px;
}

.live-team {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .live-grid { grid-template-columns: 1fr; }
}
