/* ==========================================================================
   Liga Reconquistense de Fútbol — Design System
   ========================================================================== */

:root {
  --green-900: #062617;
  --green-800: #0b4d29;
  --green-700: #0f7a3f;
  --green-600: #16944c;
  --green-500: #1fae5c;
  --green-100: #e7f6ed;
  --green-050: #f3fbf6;

  --gold-600: #c99400;
  --gold-500: #f2b705;
  --gold-400: #f7c928;
  --gold-100: #fdf0c4;

  --ink-900: #0a0f14;
  --ink-800: #131b24;
  --ink-700: #202b38;
  --ink-500: #4a5a6a;
  --ink-300: #8797a6;

  --gray-050: #f6f8f7;
  --gray-100: #eef2f0;
  --gray-200: #e2e8e5;
  --white: #ffffff;

  --win: #16944c;
  --draw: #c99400;
  --loss: #c9432f;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(6, 38, 23, 0.08);
  --shadow-md: 0 8px 24px rgba(6, 38, 23, 0.12);
  --shadow-lg: 0 20px 48px rgba(6, 38, 23, 0.22);

  --container: 1180px;
  --header-h: 84px;

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--ink-900);
  margin: 0;
  line-height: 1.12;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green-700);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold-500);
  color: var(--ink-900);
}
.btn-primary:hover { background: var(--gold-400); transform: translateY(-2px); }
.btn-outline {
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.08); }
.btn-dark {
  background: var(--green-800);
  color: var(--white);
}
.btn-dark:hover { background: var(--green-700); transform: translateY(-2px); }
.btn-sm { padding: 9px 18px; font-size: 12px; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--white);
  box-shadow: 0 2px 14px rgba(6,38,23,0.08);
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img { height: 48px; width: 48px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text strong {
  font-family: var(--font-display);
  font-size: 15.5px;
  letter-spacing: 0.3px;
  color: var(--ink-900);
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-text span {
  font-size: 10.5px;
  color: var(--green-700);
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  display: inline-block;
  padding: 10px 13px;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-700);
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.2s;
  position: relative;
}
.nav-links a::before {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: 6px;
  height: 2px;
  background: var(--gold-500);
  border-radius: 2px;
  transition: left 0.25s cubic-bezier(.4,0,.2,1), right 0.25s cubic-bezier(.4,0,.2,1);
}
.nav-links a:hover { color: var(--green-700); }
.nav-links a:hover::before { left: 13px; right: 13px; }
.nav-links a.active {
  color: var(--green-800);
  background: var(--green-050);
}
.nav-links a.active:hover { background: var(--green-100); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span { width: 26px; height: 3px; background: var(--ink-900); border-radius: 2px; }

/* ---------- Score ticker ---------- */
.ticker-wrap {
  display: flex;
  align-items: stretch;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  height: 72px;
}
.ticker-fixed {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 24px;
  flex-shrink: 0;
  border-right: 1px solid var(--gray-200);
}
.ticker-eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--green-700);
  white-space: nowrap;
}
.ticker-round {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-900);
  white-space: nowrap;
}
.ticker-scroll {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 28px, black calc(100% - 36px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 28px, black calc(100% - 36px), transparent 100%);
}
.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  white-space: nowrap;
  padding-left: 28px;
  animation: ticker 130s linear infinite;
}
.ticker-track:focus-within {
  animation-play-state: paused;
}
@media (hover: hover) and (pointer: fine) {
  .ticker-wrap:hover .ticker-track {
    animation-play-state: paused;
  }
}
.ticker-match {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px;
}
.ticker-match-badge {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 8px;
  font-weight: 700;
  color: var(--white);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  overflow: hidden;
  flex-shrink: 0;
}
.ticker-team { font-size: 13.5px; font-weight: 500; color: var(--ink-700); }
.ticker-team.is-winner { font-weight: 700; color: var(--ink-900); }
.ticker-score {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: 0.3px;
  margin: 0 3px;
}
.ticker-score .dash { color: var(--ink-300); font-weight: 500; margin: 0 3px; }
.ticker-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--gray-200); flex-shrink: 0; }
.ticker-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 28px 0 8px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--green-700);
  white-space: nowrap;
  transition: color 0.15s;
}
.ticker-cta:hover { color: var(--green-900); }
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
@media (max-width: 760px) {
  .ticker-fixed { padding: 0 16px; gap: 8px; }
  .ticker-scroll {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, black 16px, black calc(100% - 16px), transparent 100%);
  }
  .ticker-track { padding-left: 16px; }
  .ticker-match { padding: 0 16px; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--green-900) 0%, var(--green-800) 55%, var(--green-700) 100%);
  color: var(--white);
  overflow: hidden;
  padding: 96px 0 108px;
}
.hero-watermark {
  position: absolute;
  top: 50%;
  right: -70px;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  opacity: 0.07;
  z-index: 1;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}
.eyebrow-light {
  color: rgba(255,255,255,0.85);
}
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 {
  color: var(--white);
  font-size: clamp(46px, 7vw, 84px);
  line-height: 1.02;
  margin-bottom: 24px;
  max-width: 100%;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-500);
}
.hero p.lead {
  font-family: var(--font-body);
  font-size: 18px;
  color: rgba(255,255,255,0.82);
  max-width: 700px;
  margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-alt { background: var(--gray-050); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 8px; }
.section-head p { color: var(--ink-500); margin-top: 10px; max-width: 560px; }
.section-link {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green-700);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.section-link:hover { color: var(--green-900); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    linear-gradient(120deg, var(--green-900) 0%, var(--green-800) 60%, var(--green-700) 100%);
  color: var(--white);
  padding: 56px 0;
  position: relative;
  overflow: hidden;
}
.page-hero .breadcrumb {
  font-size: 12.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 12px;
  position: relative; z-index: 2;
}
.page-hero .breadcrumb a:hover { color: var(--gold-500); }
.page-hero h1 { color: var(--white); font-size: clamp(30px, 4vw, 46px); position: relative; z-index: 2; }
.page-hero p { color: rgba(255,255,255,0.78); max-width: 620px; margin-top: 12px; position: relative; z-index: 2; }

/* ---------- News cards ---------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 26px;
}
.news-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s, box-shadow 0.18s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-200);
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.news-media {
  height: 180px;
  background-color: var(--green-900);
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  overflow: hidden;
  transition: background-size 0.35s ease;
}
.news-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6,38,23,0) 45%, rgba(6,38,23,0.75) 100%);
  pointer-events: none;
}
.news-card:hover .news-media img,
.news-card:hover .news-media { background-size: 108%; }
.news-tag {
  position: relative;
  z-index: 1;
  background: var(--gold-500);
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.news-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.news-date { font-size: 12px; color: var(--ink-300); letter-spacing: 0.5px; text-transform: uppercase; font-weight: 600; }
.news-card h3 { font-size: 18px; text-transform: none; line-height: 1.3; letter-spacing: 0; }
.news-card p { color: var(--ink-500); font-size: 14.5px; margin: 0; flex: 1; }
.news-source {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--green-700);
  border-top: 1px solid var(--gray-200);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.news-source:hover { color: var(--green-900); }

/* ---------- Team cards ---------- */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.filter-btn {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--ink-700);
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--green-600); color: var(--green-700); }
.filter-btn.active { background: var(--green-800); border-color: var(--green-800); color: var(--white); }

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
.team-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 30px 20px 26px;
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  cursor: pointer;
  overflow: hidden;
}
.team-card:hover {
  box-shadow: 0 18px 34px -12px var(--team-glow, rgba(6,38,23,0.28));
  transform: translateY(-6px);
  border-color: var(--gray-200);
}
.team-badge {
  position: relative;
  z-index: 1;
  width: 76px; height: 76px;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--white);
  background: var(--white);
  border: 2.5px solid var(--gray-200);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}
.team-card:hover .team-badge { transform: scale(1.08); }
.team-card h3 { font-size: 16px; text-transform: none; letter-spacing: 0; margin-bottom: 4px; }
.team-city { font-size: 12.5px; color: var(--green-700); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; }
.team-meta { font-size: 12px; color: var(--ink-300); margin-top: 10px; }
.team-titles {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gold-600);
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(6,10,15,0.6);
  display: none;
  align-items: center; justify-content: center;
  z-index: 500;
  padding: 24px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 460px;
  width: 100%;
  padding: 34px;
  position: relative;
  box-shadow: var(--shadow-lg);
  max-height: 86vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--gray-100);
  border: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--ink-700);
}
.modal-close:hover { background: var(--gray-200); }
.modal-badge {
  width: 84px; height: 84px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 24px; color: var(--white);
  background: var(--white);
  border: 2.5px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 18px;
}
.modal-box h3 { font-size: 22px; text-transform: none; margin-bottom: 4px; }
.modal-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.modal-list div { display: flex; justify-content: space-between; font-size: 14px; border-bottom: 1px dashed var(--gray-200); padding-bottom: 8px; }
.modal-list span:first-child { color: var(--ink-500); }
.modal-list span:last-child { font-weight: 600; }

/* ---------- Tabs ---------- */
.tabs-bar {
  display: flex;
  gap: 4px;
  background: var(--gray-100);
  padding: 5px;
  border-radius: 999px;
  width: fit-content;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.tab-btn {
  background: transparent;
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ink-500);
}
.tab-btn.active { background: var(--green-800); color: var(--white); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---------- Standings table ---------- */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
table.standings { width: 100%; border-collapse: collapse; font-size: 14px; }
table.standings thead {
  background: var(--ink-900);
  color: rgba(255,255,255,0.85);
}
table.standings th {
  padding: 13px 10px;
  font-family: var(--font-display);
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
}
table.standings th:nth-child(2) { text-align: left; padding-left: 22px; }
table.standings td {
  padding: 17px 10px;
  text-align: center;
  border-bottom: 1px solid var(--gray-100);
  color: var(--ink-700);
}
table.standings td:nth-child(2) { text-align: left; padding-left: 22px; font-weight: 600; color: var(--ink-900); }
table.standings tbody tr:hover { background: var(--green-050); }
.pos-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  font-weight: 700; font-size: 13px;
  box-shadow: none;
}
.table-legend { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-500); }
.table-legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

.data-note {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-100); color: var(--gold-600);
  padding: 8px 16px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; margin-bottom: 24px;
}

/* ---------- Results / fixture list ---------- */
.match-list { display: flex; flex-direction: column; gap: 14px; }
.match-row {
  display: grid;
  grid-template-columns: 100px 1fr auto 1fr 140px;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}
.match-date { font-size: 12px; color: var(--ink-300); text-transform: uppercase; font-weight: 600; letter-spacing: 0.5px; }
.match-time { display: block; margin-top: 3px; font-size: 12.5px; color: var(--ink-700); text-transform: none; font-weight: 700; letter-spacing: 0; }
.match-team { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14.5px; }
.match-team.right { justify-content: flex-end; text-align: right; flex-direction: row-reverse; }
.mini-badge { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 700; font-family: var(--font-display); background: var(--white); border: 1.5px solid var(--gray-200); overflow: hidden; }
.match-score {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  background: var(--ink-900);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 8px;
  min-width: 76px;
  text-align: center;
}
.match-score.pending { background: var(--gray-100); color: var(--ink-500); font-size: 13px; }
.match-venue { font-size: 12px; color: var(--ink-300); text-align: right; }

/* ---------- Scorers table ---------- */
table.scorers { width: 100%; border-collapse: collapse; font-size: 14px; }
table.scorers th { text-align: left; padding: 12px 14px; font-family: var(--font-display); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-500); border-bottom: 2px solid var(--gray-200); }
table.scorers td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); }
table.scorers td:last-child, table.scorers th:last-child { text-align: center; }

/* ---------- Institutional ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
#timeline-list { display: contents; }
.timeline-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-500);
}
.timeline-year {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  line-height: 1;
  color: var(--green-700);
  text-align: center;
  margin-bottom: 16px;
}
.timeline-item h4 { font-size: 16px; text-transform: none; margin-bottom: 6px; }
.timeline-item p { color: var(--ink-500); font-size: 14.5px; margin: 0; }

/* ---------- Authority carousel (overlapping avatars) ---------- */
.authority-carousel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.authority-stage {
  position: relative;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.authority-avatars {
  position: relative;
  width: 100%;
  height: 100%;
}
.authority-avatar-item {
  position: absolute;
  top: 50%; left: 50%;
  width: 128px; height: 128px;
  margin: -64px 0 0 -64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
  border: 4px solid var(--white);
  box-shadow: 0 10px 26px rgba(6, 38, 23, 0.16);
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(.4,0,.2,1), opacity 0.5s ease, box-shadow 0.3s ease;
}
.authority-avatar-item.is-active { box-shadow: 0 20px 40px rgba(6, 38, 23, 0.3); }
.authority-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.authority-nav:hover { background: var(--green-800); color: var(--white); border-color: var(--green-800); }
.authority-nav:disabled { opacity: 0.3; pointer-events: none; }
.authority-nav--prev { left: 0; }
.authority-nav--next { right: 0; }
.authority-dots { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.authority-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gray-200);
  transition: background 0.2s, transform 0.2s;
}
.authority-dot.is-active { background: var(--green-700); transform: scale(1.3); }
.authority-panel {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-sm);
  min-height: 220px;
}
.authority-panel-role {
  display: inline-flex;
  background: var(--green-050);
  color: var(--green-700);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 999px;
}
.authority-panel h3 { font-size: 27px; text-transform: none; letter-spacing: 0; margin: 14px 0 4px; }
.authority-panel .authority-panel-term { font-size: 13px; color: var(--ink-300); font-weight: 600; margin-bottom: 16px; }
.authority-panel p { color: var(--ink-500); font-size: 15px; margin: 0; }
@media (max-width: 760px) {
  .authority-carousel { grid-template-columns: 1fr; }
  .authority-stage { height: 220px; }
  .authority-avatar-item { width: 96px; height: 96px; margin: -48px 0 0 -48px; font-size: 24px; }
  .authority-panel { padding: 26px; }
}

.split-mobile-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 48px; }
.former-list { display: flex; flex-direction: column; gap: 0; }
.former-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--gray-200);
}
.former-item:last-child { border-bottom: none; }
.former-item .name { font-weight: 600; color: var(--ink-900); }
.former-item .term { font-size: 12.5px; color: var(--ink-300); font-family: var(--font-display); letter-spacing: 0.5px; }

/* ---------- Objectives (editorial oversized numbering) ---------- */
.section-objectives .section-head { margin-bottom: clamp(48px, 6vw, 64px); }
.objectives-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.objective-card {
  position: relative;
  overflow: hidden;
  background: var(--green-050);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 30px 26px;
  min-height: 208px;
  display: flex;
  align-items: flex-end;
  transition: transform 0.2s ease, background 0.2s ease;
}
.objective-card:hover {
  transform: translateY(-3px);
  background: #eef6f1;
}
.objective-number {
  position: absolute;
  top: -16px;
  right: -4px;
  z-index: 0;
  font-family: var(--font-display);
  font-size: clamp(72px, 6.5vw, 118px);
  font-weight: 800;
  line-height: 1;
  color: var(--green-700);
  opacity: 0.07;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.2s ease;
}
.objective-card:hover .objective-number { opacity: 0.11; }
.objective-content { position: relative; z-index: 1; }
.objective-content h4 {
  font-size: 20px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-900);
  margin-bottom: 10px;
}
.objective-content p {
  color: var(--ink-500);
  font-size: 15.5px;
  line-height: 1.6;
  margin: 0;
}
@media (max-width: 980px) {
  .objectives-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .objectives-grid { grid-template-columns: 1fr; }
  .objective-number { font-size: 76px; top: -10px; right: -2px; }
  .objective-card { min-height: 0; padding: 26px 22px; }
}

/* ---------- Split / about ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split img, .split .split-media { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.split-media {
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  display: flex; align-items: center; justify-content: center;
  position: relative;
  overflow: hidden;
}
.split-media-watermark {
  position: absolute;
  top: 50%; left: 50%;
  width: 130%; height: 130%;
  transform: translate(-50%, -50%);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
}
.split-media-crest { position: relative; z-index: 1; width: 190px; height: 190px; box-shadow: none; }
.split h2 { font-size: clamp(26px,3.4vw,36px); margin-bottom: 18px; }
.split p { color: var(--ink-500); margin-bottom: 16px; }

/* ---------- Palmarés card (institucional.html) ---------- */
.palmares-card {
  position: relative;
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}
.palmares-watermark {
  position: absolute;
  top: 50%; left: 55%;
  width: 480px; height: 480px;
  transform: translate(-50%, -50%);
  opacity: 0.05;
  pointer-events: none;
  user-select: none;
}
.palmares-content { position: relative; z-index: 1; }
.palmares-label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 22px;
}
.palmares-leaders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.palmares-leader-badge {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--white);
  background: var(--white);
  overflow: hidden;
  margin-bottom: 14px;
}
.palmares-leader-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 4vw, 44px);
  line-height: 1;
  color: var(--white);
  margin-bottom: 8px;
}
.palmares-leader-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.3px;
  color: var(--white);
}
.palmares-leader-sub { font-size: 12px; color: rgba(255, 255, 255, 0.55); margin-top: 3px; }

/* ---------- Real team crests inside badge circles ---------- */
.team-badge img,
.modal-badge img,
.mini-badge img,
.palmares-leader-badge img,
.ticker-match-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14%;
  box-sizing: border-box;
  display: block;
}
.palmares-divider { height: 1px; background: rgba(255, 255, 255, 0.12); margin: 30px 0 24px; }
.palmares-recent { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.palmares-recent-year {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.4px;
  color: var(--gold-400);
  margin-bottom: 5px;
}
.palmares-recent-team { display: block; font-size: 15px; font-weight: 600; color: var(--white); }
@media (max-width: 480px) {
  .palmares-card { padding: 30px 24px; }
  .palmares-leaders, .palmares-recent { gap: 16px; }
}

/* ---------- Format flow diagram (torneo.html) ---------- */
.format-rule {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--gray-200);
}
.format-rule-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--gold-600);
  margin-bottom: 8px;
}
.format-rule p { font-size: 13.5px; color: var(--ink-500); line-height: 1.6; margin: 0; }

.format-flow {
  position: relative;
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-800) 100%);
  border-radius: var(--radius);
  overflow: hidden;
  padding: 44px 32px 40px;
  box-shadow: var(--shadow-md);
}
.format-flow-watermark {
  position: absolute;
  bottom: -70px; right: -80px;
  width: 400px; height: 400px;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
}
.format-flow-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.flow-top { display: flex; gap: 14px; }
.flow-top-item {
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  padding: 7px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}
.flow-connector { width: 1px; height: 26px; background: rgba(255, 255, 255, 0.18); margin: 6px 0; }
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.flow-step-num {
  width: 25px; height: 25px;
  border-radius: 50%;
  border: 1px solid rgba(242, 183, 5, 0.4);
  color: var(--gold-400);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 3px;
}
.flow-step-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--white);
}
.flow-step-sub { font-size: 12px; color: rgba(255, 255, 255, 0.5); max-width: 230px; }
.flow-step--final .flow-step-num { background: var(--gold-500); border-color: var(--gold-500); color: var(--ink-900); }
.flow-step--final .flow-step-title { color: var(--gold-400); font-size: 17px; }

.format-flow-content > * {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.format-flow-content.is-visible > * { opacity: 1; transform: translateY(0); }
.format-flow-content.is-visible > *:nth-child(1) { transition-delay: 0s; }
.format-flow-content.is-visible > *:nth-child(2) { transition-delay: 0.11s; }
.format-flow-content.is-visible > *:nth-child(3) { transition-delay: 0.22s; }
.format-flow-content.is-visible > *:nth-child(4) { transition-delay: 0.33s; }
.format-flow-content.is-visible > *:nth-child(5) { transition-delay: 0.44s; }
.format-flow-content.is-visible > *:nth-child(6) { transition-delay: 0.55s; }
.format-flow-content.is-visible > *:nth-child(7) { transition-delay: 0.66s; }
.format-flow-content.is-visible > *:nth-child(8) { transition-delay: 0.77s; }
.format-flow-content.is-visible > *:nth-child(9) { transition-delay: 0.88s; }
@media (prefers-reduced-motion: reduce) {
  .format-flow-content > * { opacity: 1; transform: none; transition: none; }
}
@media (max-width: 480px) {
  .format-flow { padding: 36px 22px 32px; }
  .flow-top { gap: 10px; }
  .flow-top-item { padding: 6px 14px; font-size: 11.5px; }
}

/* ---------- Contact ---------- */
.page-hero--compact { padding: 40px 0; }

.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; align-items: start; }

.contact-info { display: flex; flex-direction: column; }
.contact-info-block { padding: 18px 0; border-top: 1px solid var(--gray-200); }
.contact-info-block:first-child { padding-top: 0; border-top: none; }
.contact-label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: 7px;
}
.contact-value { margin: 0; font-size: 17px; font-weight: 500; color: var(--ink-900); line-height: 1.4; }
.contact-value a { color: var(--ink-900); transition: color 0.15s; }
.contact-value a:hover { color: var(--green-700); }

.contact-social-row {
  display: flex;
  gap: 20px;
  padding: 16px 0 22px;
  margin-top: 2px;
}
.contact-social-row a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-500);
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s;
}
.contact-social-row a:hover { color: var(--green-700); }
.contact-social-row .arrow { font-size: 11px; }

.contact-map { border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--gray-200); height: 220px; }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.contact-map-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--green-700);
}
.contact-map-cta:hover { color: var(--green-900); }

.contact-form-title { font-size: 22px; margin-bottom: 22px; }
.contact-form-note {
  display: none;
  margin-top: 16px;
  color: var(--green-700);
  font-size: 13.5px;
  font-weight: 600;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-700);
  margin-bottom: 7px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 2px; border-radius: 0; border: none; border-bottom: 1.5px solid var(--gray-200);
  font-family: var(--font-body); font-size: 14.5px; color: var(--ink-900); background: transparent;
  transition: border-color 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-600); }
.field textarea { resize: vertical; min-height: 90px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--green-900), var(--green-700));
  color: var(--white);
  padding: 58px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); font-size: clamp(24px,3vw,34px); margin-bottom: 12px; }
.cta-band p { color: rgba(255,255,255,0.8); margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.footer {
  background: var(--green-900);
  color: rgba(255, 255, 255, 0.62);
}
.footer-main {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
  padding: 56px 0 40px;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}
.footer-brand img { height: 50px; width: 50px; flex-shrink: 0; }
.footer-brand-name {
  font-family: var(--font-display);
  color: #f5f7f6;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1.25;
}
.footer-desc { font-size: 14px; line-height: 1.6; margin: 16px 0 0; max-width: 280px; }
.footer-social { display: flex; gap: 2px; margin-top: 16px; margin-left: -8px; }
.footer-social a {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255, 255, 255, 0.42);
  transition: color 0.15s;
}
.footer-social a:hover { color: var(--green-500); }
.footer-social svg { width: 19px; height: 19px; }

.footer h5 {
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-explore-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.footer ul { display: flex; flex-direction: column; gap: 12px; }
.footer ul a,
.footer-contact address a {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.15s, transform 0.15s;
  display: inline-block;
}
.footer ul a:hover,
.footer-contact address a:hover { color: #fff; transform: translateX(2px); }
.footer-contact address {
  font-style: normal;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.35);
}
.footer-credit { color: rgba(255, 255, 255, 0.6); transition: color 0.15s; }
.footer-credit:hover { color: #fff; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav-links { gap: 0; }
  .nav-links a { padding: 10px 10px; font-size: 12.5px; }
}
@media (max-width: 980px) {
  .hero-watermark { width: 360px; height: 360px; }
  .split { grid-template-columns: 1fr; }
  .split .split-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-identity { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .hero-watermark { display: none; }
  .hero { padding: 40px 0 48px; }
  .hero .eyebrow { margin-bottom: 14px; }
  .hero h1 { margin-bottom: 16px; }
  .hero p.lead { margin-bottom: 24px; }
  .nav-links { position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--white);
    flex-direction: column; align-items: stretch; padding: 12px; box-shadow: var(--shadow-md);
    display: none; gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; }
  .nav-links a::before { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .match-row { grid-template-columns: 1fr; text-align: center; gap: 8px; }
  .match-team { justify-content: center; }
  .match-team.right { flex-direction: row; justify-content: center; text-align: left; }
  .match-venue { text-align: center; }
  .footer-main { grid-template-columns: 1fr; padding: 44px 0 32px; gap: 32px; }
  .footer-identity { grid-column: auto; display: flex; flex-direction: column; align-items: center; text-align: center; }
  .footer-desc { max-width: 320px; }
  .footer-social { margin-left: 0; justify-content: center; }
  .footer-explore-grid { grid-template-columns: 1fr 1fr; text-align: center; }
  .footer-contact { text-align: center; }
  .footer-contact address { align-items: center; }
  .footer-legal { justify-content: center; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.standings { font-size: 12px; min-width: 620px; }
  .modal-list div { flex-direction: column; align-items: flex-start; gap: 3px; padding-bottom: 10px; }
  .split-mobile-stack { grid-template-columns: 1fr; gap: 24px; }
  .data-note { display: flex; align-items: flex-start; border-radius: var(--radius-sm); width: 100%; }
  .tabs-bar { border-radius: var(--radius-sm); width: 100%; }
  .tab-btn { flex: 1 1 calc(50% - 4px); text-align: center; padding: 10px 8px; }
  .form-grid { grid-template-columns: 1fr; }
}
