:root {
  --ft-green:  #198754;
  --ft-dark:   #0d1b2a;
  --ft-card:   #f8f9fa;
}

body { background: #f4f6f9; font-family: 'Segoe UI', system-ui, sans-serif; }

/* Navbar */
.navbar-brand { padding: 2px 0; }
.navbar-logo {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}
@media (min-width: 992px) {
  .navbar-logo { height: 58px; }
}

/* Hero */
.hero-badge { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Match card */
.match-card { border: none; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,0,0,.07); transition: transform .15s; }
.match-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,.11); }
.team-code { font-size: 1.6rem; font-weight: 800; letter-spacing: -1px; }
.team-name { font-size: .78rem; color: #6c757d; }
.vs-divider { font-size: .7rem; font-weight: 700; color: #adb5bd; text-transform: uppercase; }

/* Probability bar */
.prob-bar-wrap { border-radius: 8px; overflow: hidden; height: 28px; display: flex; }
.prob-segment { display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; color: #fff; transition: width .4s ease; }
.prob-win   { background: var(--ft-green); }
.prob-draw  { background: #6c757d; }
.prob-lose  { background: #dc3545; }

/* Score matrix */
.matrix-table th, .matrix-table td {
  width: 56px; height: 44px; text-align: center; vertical-align: middle;
  font-size: .82rem; border: 1px solid #dee2e6; padding: 0; cursor: default;
}
.matrix-table th { background: #e9ecef; font-weight: 700; font-size: .75rem; color: #495057; }
.matrix-header-top { background: #0d1b2a !important; color: #fff !important; }
.matrix-header-side { background: #0d1b2a !important; color: #fff !important; }

/* Top scores */
.score-bar { position: relative; height: 22px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
.bar-fill { position: absolute; top: 0; left: 0; height: 100%; background: var(--ft-green);
  border-radius: 4px; width: 0; transition: width .5s ease; }
.score-label { position: relative; z-index: 1; font-size: .78rem; font-weight: 700; padding: 0 8px; line-height: 22px; }

/* Group standings */
.standings-pos { width: 28px; text-align: center; font-weight: 700; }
.qualified-1, .qualified-2 { border-left: 4px solid var(--ft-green); }
.qualified-3 { border-left: 4px solid #ffc107; }

/* Phase badge */
.phase-badge { font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 20px; }

/* Heatmap legend */
.legend-grad { height: 14px; border-radius: 4px;
  background: linear-gradient(to right, hsl(142,60%,96%), hsl(142,60%,44%)); }

/* FAQ */
.faq-section h2 { font-size: 1.25rem; font-weight: 700; }
.accordion-button:not(.collapsed) { background: #e8f5e9; color: var(--ft-green); }

/* Footer */
footer { background: var(--ft-dark); color: #adb5bd; font-size: .82rem; }
footer a { color: #8d9fae; text-decoration: none; transition: color .15s; }
footer a:hover { color: #fff; }

.footer-logo-wrap {
  display: inline-block;
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
}
.footer-logo {
  width: 168px;
  height: auto;
  display: block;
  object-fit: contain;
}
@media (max-width: 575px) {
  .footer-logo { width: 140px; }
}
.footer-tagline { color: #8d9fae; font-size: .82rem; line-height: 1.5; margin: 0; }

.footer-heading { font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #fff; margin-bottom: .6rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a { color: #8d9fae; font-size: .82rem; }
.footer-links a:hover { color: #fff; }

.footer-model-info { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-stat { display: flex; flex-direction: column; }
.footer-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--ft-green); line-height: 1; }
.footer-stat-lbl { font-size: .68rem; color: #6c757d; margin-top: 2px; }
.footer-model-name { font-size: .72rem; color: #6c757d; font-style: italic; }

.footer-divider { border-color: #1e2e3e; margin: 1.2rem 0 .8rem; }
.footer-copy { font-size: .76rem; color: #6c757d; }
.footer-disclaimer { font-size: .7rem; color: #4a5a6a; max-width: 400px; text-align: right; }

/* Botones sociales */
.social-btn { display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; background: #1e2e3e;
  color: #8d9fae; font-size: 1rem; text-decoration: none; transition: background .15s, color .15s; }
.social-btn:hover { background: var(--ft-green); color: #fff; }

/* ── Tabla de precisión ─────────────────────────────────────────────────── */
.precision-kpi { border-radius: 14px; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.07);
  padding: 1.2rem 1.5rem; text-align: center; }
.precision-kpi .kpi-val { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.precision-kpi .kpi-lbl { font-size: .75rem; color: #6c757d; font-weight: 600;
  text-transform: uppercase; letter-spacing: .07em; margin-top: 4px; }
.precision-kpi .kpi-sub { font-size: .72rem; color: #adb5bd; margin-top: 2px; }

.precision-table th { background: #0d1b2a; color: #fff; font-size: .75rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  white-space: nowrap; vertical-align: middle; }
.precision-table td { vertical-align: middle; font-size: .85rem; }
.precision-table .result-actual { font-size: 1rem; font-weight: 800; letter-spacing: -0.5px; }
.check-ok  { color: #198754; font-size: 1.1rem; }
.check-err { color: #dc3545; font-size: 1.1rem; }
.tag-exact { background: #d1fae5; color: #065f46; font-size: .68rem; font-weight: 700;
  border-radius: 20px; padding: 2px 8px; white-space: nowrap; }
.tag-top3  { background: #dbeafe; color: #1e40af; font-size: .68rem; font-weight: 700;
  border-radius: 20px; padding: 2px 8px; white-space: nowrap; }
.tag-miss  { background: #fee2e2; color: #991b1b; font-size: .68rem; font-weight: 700;
  border-radius: 20px; padding: 2px 8px; white-space: nowrap; }

.progress-kpi { height: 8px; border-radius: 4px; background: #e9ecef; overflow: hidden; margin-top: 6px; }
.progress-kpi-bar { height: 100%; border-radius: 4px; background: var(--ft-green); }

/* ── Blog ─────────────────────────────────────────────────────────────────── */
.blog-type-badge { font-size: .68rem; font-weight: 700; border-radius: 20px; padding: 3px 10px; }
.blog-type-preview  { background: #dbeafe; color: #1e40af; }
.blog-type-analisis { background: #d1fae5; color: #065f46; }
.blog-type-grupo    { background: #fef3c7; color: #92400e; }

.blog-title-link:hover { color: var(--ft-green) !important; }

.blog-featured-side {
  background: linear-gradient(135deg, var(--ft-dark) 0%, #1a3a5c 100%);
  min-height: 180px;
}

.blog-match-banner { background: #f8f9fa; border: 1px solid #e9ecef; }

/* Contenido del artículo generado */
.blog-content h2 { font-size: 1.3rem; font-weight: 700; margin: 1.8rem 0 .6rem; color: #0d1b2a; }
.blog-content h3 { font-size: 1.05rem; font-weight: 700; margin: 1.4rem 0 .5rem;
  color: var(--ft-green); border-left: 3px solid var(--ft-green); padding-left: 10px; }
.blog-content p  { line-height: 1.75; color: #2d3748; margin-bottom: 1rem; }
.blog-content ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.blog-content li { line-height: 1.7; color: #2d3748; margin-bottom: .35rem; }
.blog-content strong { color: #0d1b2a; }

.blog-disclaimer { max-width: 520px; }

/* ── Blog stats tables ────────────────────────────────────────────────────── */
.blog-table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
.blog-stats-table { font-size: .85rem; min-width: 360px; }
.blog-stats-table thead th { background: #0d1b2a; color: #fff; font-weight: 700;
  text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }
.blog-stats-table td.fw-700 { font-weight: 700; }

/* Responsive */
@media (max-width: 576px) {
  .matrix-table th, .matrix-table td { width: 40px; height: 36px; font-size: .7rem; }
  .team-code { font-size: 1.2rem; }
  .blog-content h2 { font-size: 1.15rem; }
}
