:root {
  --red: #c62828;
  --red-dark: #7f1d1d;
  --red-bright: #ef4444;
  --ink: #111827;
  --muted: #667085;
  --line: #e6eaf0;
  --soft: #f7f8fb;
  --green: #0f766e;
  --blue: #1d4ed8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #fff7f7;
}

a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px clamp(18px, 4vw, 56px);
  background: linear-gradient(90deg, rgba(127,29,29,.97), rgba(185,28,28,.95));
  border-bottom: 1px solid rgba(254,202,202,.4);
  box-shadow: 0 16px 40px rgba(127, 29, 29, .18);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 1.12rem;
  text-decoration: none;
  color: #fff;
}

.brand img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  /* border-radius: 999px; */
  /* background: #fff; */
  padding: 3px;
}

nav {
  display: flex;
  gap: clamp(10px, 2vw, 24px);
  color: #fff;
  font-weight: 750;
  font-size: .94rem;
}

nav a {
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

nav a:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
  transform: translateY(-1px);
}

.hero {
  position: relative;
  min-height: clamp(480px, 72vh, 680px);
  display: flex;
  align-items: flex-end;
  padding: 120px clamp(18px, 6vw, 76px) 74px;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(69,10,10,.9), rgba(127,29,29,.58) 52%, rgba(8,13,23,.14)),
    url("https://ca9j.com.ar/app/predioFoto1.jpg") center/cover;
}

.hero-copy {
  position: relative;
  width: min(720px, 100%);
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: #fca5a5;
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  font-size: 7rem;
  line-height: .9;
  font-weight: 950;
}

.hero p:not(.eyebrow) {
  max-width: 640px;
  margin: 22px 0 0;
  font-size: 1.25rem;
  line-height: 1.45;
  color: rgba(255,255,255,.88);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-actions a,
.section-head a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 850;
}

.hero-actions a:first-child {
  background: var(--red);
  color: #fff;
  box-shadow: 0 14px 32px rgba(220, 38, 38, .3);
}

.hero-actions a:last-child {
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

.countdown-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr);
  align-items: center;
  gap: 24px;
  padding: clamp(26px, 5vw, 46px) clamp(18px, 6vw, 76px);
  background: linear-gradient(135deg, #7f1d1d, #dc2626 58%, #ef4444);
  color: #fff;
}

.countdown-section h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: .95;
}

.countdown-section p {
  max-width: 680px;
  margin: 12px 0 0;
  color: #fee2e2;
  font-size: 1.05rem;
}

.countdown-boxes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.countdown-boxes span {
  min-height: 112px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.14);
}

.countdown-boxes strong {
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: .9;
}

.countdown-boxes small {
  color: #fee2e2;
  font-weight: 900;
  text-transform: uppercase;
}

.banner-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding: clamp(22px, 4vw, 34px) clamp(18px, 6vw, 76px);
  background: #fff;
  scroll-snap-type: x mandatory;
}

.banner-slide {
  min-height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #7f1d1d, #ef4444);
  scroll-snap-align: start;
  color: #fff;
}

.banner-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .7;
}

.banner-slide div {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 24px;
  background: linear-gradient(0deg, rgba(69,10,10,.86), rgba(69,10,10,.08));
}

.banner-slide h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
}

.banner-slide p {
  margin: 0;
  max-width: 680px;
  color: rgba(255,255,255,.84);
}

.banner-slide a {
  width: fit-content;
  margin-top: 4px;
  padding: 9px 13px;
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font-weight: 900;
  text-decoration: none;
}

.status-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: #fff;
}

.status-band div {
  min-height: 96px;
  padding: 20px clamp(18px, 4vw, 56px);
  border-right: 1px solid var(--line);
}

.status-band div:last-child { border-right: 0; }
.status-band span {
  display: block;
  color: var(--muted);
  font-weight: 850;
  font-size: .78rem;
  text-transform: uppercase;
}

.status-band strong {
  display: block;
  margin-top: 7px;
  font-size: 1.18rem;
  line-height: 1.25;
}

.section,
.matchday,
.sponsor-section {
  padding: clamp(48px, 8vw, 82px) clamp(18px, 6vw, 76px);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
}

.section h2,
.matchday h2 {
  margin: 0;
  font-size: 3rem;
  line-height: 1;
}

.section-head a {
  border-color: #fecaca;
  color: var(--red);
  background: #fff;
}

.match-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.match-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.match-filters select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  padding: 0 12px;
}

.match-filters-dark label {
  color: #fecaca;
}

.match-filters-dark select {
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.09);
  color: #fff;
}

.match-filters-dark select option {
  color: var(--ink);
}

.fixture-table-wrap,
.standings-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.fixture-table,
.standings-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.fixture-table th,
.fixture-table td,
.standings-table th,
.standings-table td {
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
}

.fixture-table th,
.standings-table th {
  background: #fff7f7;
  color: var(--red-dark);
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.fixture-table tbody tr + tr td,
.standings-table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.fixture-table td:nth-child(6) {
  text-align: center;
}

.standings-section {
  background: #fff;
}

.standings-table {
  min-width: 900px;
}

.standings-table th:first-child,
.standings-table td:first-child,
.standings-table th:nth-child(n+5),
.standings-table td:nth-child(n+5) {
  text-align: center;
}

.standings-rank {
  color: var(--red-dark);
  font-weight: 950;
}

.standings-team {
  min-width: 210px;
}

.points-chip {
  display: inline-flex;
  min-width: 44px;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-weight: 950;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}

.pagination-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination-buttons button {
  min-width: 38px;
  min-height: 38px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: var(--red);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.pagination-buttons button.is-active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.pagination-buttons button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.classifications-section {
  background: #fff7f7;
}

.classification-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, 1.2fr) minmax(160px, .72fr);
  gap: 10px;
  margin-bottom: 12px;
}

.classification-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.classification-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  padding: 0 12px;
}

.classification-status {
  margin-bottom: 16px;
  color: var(--muted);
  font-weight: 850;
}

.classification-status:empty {
  display: none;
}

.classification-status-success { color: var(--green); }
.classification-status-warning { color: #b45309; }
.classification-status-danger { color: var(--red); }

.classification-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.classification-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.classification-summary-head h3,
.zone-card h3,
.bracket-round h3 {
  margin: 0;
}

.classification-summary-head span {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.zone-card {
  min-height: 156px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.zone-card h3 {
  color: var(--red-dark);
  font-size: 1.08rem;
}

.zone-card small {
  color: var(--muted);
  font-weight: 800;
}

.qualified-item {
  min-height: 48px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: var(--soft);
}

.qualified-item img,
.qualified-fallback {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  background: #fff;
}

.qualified-item img {
  object-fit: contain;
  padding: 4px;
}

.qualified-fallback {
  display: grid;
  place-items: center;
  color: var(--red);
  font-weight: 950;
}

.qualified-name {
  min-width: 0;
  color: var(--ink);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.qualified-meta {
  min-width: 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.compact-empty {
  padding: 10px;
}

.classification-bracket-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.bracket-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  align-items: stretch;
  gap: 22px;
  min-width: max-content;
}

.bracket-round {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
}

.bracket-round h3 {
  color: var(--red-dark);
  font-size: .86rem;
  font-weight: 950;
  text-transform: uppercase;
}

.bracket-round-matches {
  display: grid;
  align-content: space-around;
  gap: 18px;
  min-height: 148px;
}

.bracket-match {
  position: relative;
  display: grid;
  overflow: visible;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(127, 29, 29, .08);
}


.bracket-match-meta {
  padding: 8px 10px;
  border-bottom: 1px solid #fee2e2;
  background: #fff7f7;
  color: var(--red-dark);
  font-size: .76rem;
  font-weight: 900;
  line-height: 1.25;
}

.bracket-round:not(:last-child) .bracket-match::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -23px;
  width: 23px;
  border-top: 2px solid #fecaca;
}

.bracket-team {
  min-height: 58px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  gap: 9px;
  align-items: center;
  padding: 9px;
}

.bracket-team + .bracket-team {
  border-top: 1px solid #fee2e2;
}

.bracket-team img,
.bracket-fallback {
  width: 36px;
  height: 36px;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  background: #fff7f7;
}

.bracket-team img {
  object-fit: contain;
  padding: 4px;
}

.bracket-fallback {
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: .82rem;
  font-weight: 950;
}

.bracket-team-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.bracket-team-name {
  color: var(--ink);
  font-weight: 950;
  overflow-wrap: anywhere;
}

.bracket-team-origin {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bracket-score {
  justify-self: end;
  color: var(--red);
  font-weight: 950;
}

.bracket-team.is-empty {
  background: #fffafa;
}

.bracket-team.is-empty .bracket-team-name,
.bracket-team.is-empty .bracket-team-origin {
  color: #94a3b8;
}

.bracket-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 800;
}

.team-cell {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  line-height: 1.2;
}

.team-cell > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.team-logo {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: contain;
  border: 1px solid #fee2e2;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

.team-logo-fallback {
  display: grid;
  place-items: center;
  color: var(--red);
  font-weight: 950;
}

.score-chip {
  display: inline-flex;
  min-width: 54px;
  justify-content: center;
  padding: 6px 9px;
  border: 1px solid #fecaca;
  border-radius: 999px;
  background: #fff7f7;
  color: var(--red);
  font-weight: 950;
}

.news-grid,
.clubs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.news-card,
.club-card {
  min-height: 176px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.clubs-section {
  background: #fff;
}

.club-card {
  min-height: 154px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-color: #fee2e2;
}

.club-card img,
.club-fallback {
  width: 74px;
  height: 74px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid #fee2e2;
  background: #fff7f7;
  padding: 8px;
}

.club-fallback {
  display: grid;
  place-items: center;
  color: var(--red);
  font-size: 1.7rem;
  font-weight: 950;
}

.club-card h3 {
  margin: 0;
  font-size: 1.12rem;
}

.club-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.club-card small {
  display: block;
  margin-top: 8px;
  color: var(--red);
  font-weight: 900;
}

.news-card small {
  color: var(--muted);
  font-weight: 800;
}

.matchday {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 36px;
  background: linear-gradient(135deg, #1f1212, #7f1d1d);
  color: #fff;
}

.matchday p:not(.eyebrow) {
  color: rgba(255,255,255,.72);
  font-size: 1.05rem;
  line-height: 1.55;
}

.matchday-list {
  display: grid;
  gap: 10px;
}

.matchday-panel {
  display: grid;
  gap: 14px;
}

.matchday-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 96px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,.05);
}

.matchday-item time {
  color: #fecaca;
  font-weight: 950;
}

.matchday-detail {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.matchday-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.matchday-teams .team-cell {
  min-width: 0;
  color: #fff;
}

.matchday-teams .team-cell:last-child {
  justify-content: end;
  text-align: right;
}

.matchday-teams > strong {
  min-width: 54px;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  color: #fff;
  text-align: center;
  font-weight: 950;
}

.matchday-detail small {
  color: rgba(255,255,255,.72);
  font-weight: 800;
}

.matchday .team-logo {
  border-color: rgba(255,255,255,.28);
  background: #fff;
}

.matchday .empty {
  border-color: rgba(255,255,255,.24);
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.78);
}

.news-card {
  display: grid;
  align-content: space-between;
}

.news-card h3 {
  margin: 8px 0;
  font-size: 1.15rem;
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.2fr .8fr .8fr;
  gap: 12px;
  min-height: 280px;
}

.photo-strip img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

.sponsor-section {
  background: #fff7f7;
}

.sponsor-carousel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 260px);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x mandatory;
}

.sponsor-card {
  min-height: 150px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  text-align: center;
  text-decoration: none;
  scroll-snap-align: start;
  box-shadow: 0 12px 30px rgba(127, 29, 29, .08);
}

.sponsor-card img {
  width: 120px;
  height: 64px;
  object-fit: contain;
}

.sponsor-card strong {
  color: var(--ink);
}

.sponsor-card span {
  color: var(--muted);
  font-size: .84rem;
}

.site-footer {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: var(--soft);
  border-top: 1px solid var(--line);
  color: #344054;
  font-weight: 750;
}

.site-footer img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.site-footer a {
  border-color: var(--line);
  background: #fff;
}

.empty {
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
  background: var(--soft);
}

@media (max-width: 920px) {
  .site-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
  }
  nav {
    width: 100%;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  nav a {
    flex: 0 0 auto;
    background: rgba(255,255,255,.12);
  }
  .hero { min-height: 72vh; align-items: flex-end; }
  .hero h1 { font-size: 4.2rem; }
  .hero p:not(.eyebrow) { font-size: 1.06rem; }
  .section h2,
  .matchday h2 { font-size: 2.1rem; }
  .status-band,
  .match-filters,
  .classification-controls,
  .news-grid,
  .clubs-grid,
  .zone-grid,
  .matchday,
  .photo-strip,
  .countdown-section { grid-template-columns: 1fr; }
  .status-band div { border-right: 0; border-bottom: 1px solid var(--line); }
  .status-band div:last-child { border-bottom: 0; }
  .section-head { align-items: start; flex-direction: column; }
  .countdown-boxes span { min-height: 86px; }
  .banner-carousel { grid-auto-columns: minmax(260px, 86vw); }
  .banner-slide { min-height: 210px; }
  .fixture-table { min-width: 860px; }
  .standings-table { min-width: 820px; }
  .pagination-controls {
    align-items: flex-start;
    flex-direction: column;
  }
  .classification-summary-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .bracket-board {
    grid-auto-columns: minmax(220px, 78vw);
  }
  .matchday-item { grid-template-columns: 1fr; }
  .matchday-teams { grid-template-columns: 1fr; }
  .matchday-teams .team-cell:last-child {
    justify-content: start;
    text-align: left;
  }
  .matchday-teams > strong {
    width: fit-content;
  }
}
