/* ── Design tokens ──────────────────────── */
:root {
  --verde-cancha: #0a3d1f;
  --verde-medio: #145a2e;
  --verde-claro: #1e7a3e;
  --dorado: #c9a84c;
  --dorado-claro: #e6c97a;
  --rojo-vivo: #e63030;
  --blanco: #f5f5f0;
  --gris-bg: #f0f0eb;
  --gris-borde: #d0d0c8;
  --pizarra: #1e1e2e;
  --texto: #1a1a2a;

  --font-display: "Bebas Neue", sans-serif;
  --font-body: "Inter", sans-serif;

  --radius-card: 12px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* ── Reset / base ───────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--gris-bg);
  color: var(--texto);
  margin: 0;
  padding: 0;
}

/* ── Header ─────────────────────────────── */
.site-header {
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  background: var(--verde-cancha);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.75rem 1rem;
  margin: 0 auto;
}

.intinerary-tab {
  /* position: relative; */

  background: var(--verde-cancha);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 1rem;
  border-radius: 0px 0px 12px 12px;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--dorado);
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0;
}

.site-title span {
  color: var(--blanco);
  font-size: 0.85em;
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--rojo-vivo);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

/* ── Nav tabs ───────────────────────────── */
.tab-nav {
  display: flex;

  overflow: hidden; /* Crucial: oculta el texto cuando se sale de los bordes */
  white-space: nowrap; /* Evita que el texto se rompa en varias líneas */

  justify-content: end;
  margin-right: 20%;
  gap: 0.5rem;
}

.tab-nav a {
  flex: 1;
  text-align: center;
  padding: 0.6rem 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s,
    border-color 0.15s;
}

.tab-nav a.active,
.tab-nav a:hover {
  color: var(--dorado-claro);
  border-bottom-color: var(--dorado);
}

.carrusel-container {
  background: var(--verde-medio);
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.08);

  overflow: hidden; /* Crucial: oculta el texto cuando se sale de los bordes */
  white-space: nowrap; /* Evita que el texto se rompa en varias líneas */
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}

.site-title-animation {
  display: inline-block; /* Permite que el elemento se mueva correctamente */
  padding-left: 100%; /* Hace que empiece justo fuera de la pantalla a la derecha */
  animation: carrusel 15s linear infinite;
  color: #fff;
  font-weight: bold;

  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--dorado);
  letter-spacing: 0.04em;
  line-height: 1;
  margin: 0;
}

@keyframes carrusel {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

.no-matches {
  text-align: center;
  padding: 2rem 1rem;
  color: #999;
  font-size: 0.9rem;

  .texto {
    color: var(--verde-cancha);
    margin-bottom: 90px;
  }
}

.next-argentina {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  background: linear-gradient(135deg, #001a09 0%, #0a3d1f 100%);
  border: 1px solid var(--verde-claro);
  border-radius: var(--radius-card);
  padding: 1rem 1.25rem;
  margin: 1rem;
  color: var(--blanco);
  font-size: 0.82rem;
  position: relative;
  overflow: hidden;

  margin-bottom: 100px;
}

/* franja dorada decorativa arriba */
.next-argentina::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--dorado),
    var(--dorado-claro),
    var(--dorado)
  );
}

.next-argentina .label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dorado-claro);
}

.next-argentina strong {
  /* font-family: var(--font-display); */
  font-size: 1.2rem;
  /* letter-spacing: 0.2rem; */
  color: #fff;
  /* line-height: 1.2; */
}

.next-argentina .fecha {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 0.1rem;
}

.sponsors {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
}

.match-minute {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--rojo-vivo);
  background: rgba(230, 48, 48, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(230, 48, 48, 0.2);
}

.match-minute.is-paused {
  color: var(--dorado);
  background: rgba(201, 168, 76, 0.1);
  border-color: rgba(201, 168, 76, 0.3);
}

/* ── Main content ───────────────────────── */
.main {
  max-width: 680px;
  margin: 0 auto;
  padding: 1rem;
}

/* ── Section heading ────────────────────── */
.section-label {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--verde-cancha);
  margin: 1.5rem 0 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gris-borde);
}

/* ── Match card ─────────────────────────── */

@keyframes pulso {
  0% {
    box-shadow:
      0 0 0 2px rgba(230, 48, 48, 0.2),
      var(--shadow-card);
  }
  50% {
    box-shadow:
      0 0 14px 6px rgba(230, 48, 48, 0.4),
      var(--shadow-card);
  }
  100% {
    box-shadow:
      0 0 0 2px rgba(230, 48, 48, 0.2),
      var(--shadow-card);
  }
}

.match-card {
  background: var(--blanco);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  margin-bottom: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--gris-borde);
  position: relative;
  padding: 0.5rem 0.5rem 1.75rem 0.5rem;
}

.match-card.is-live {
  border-color: var(--rojo-vivo);
  animation: pulso 3s infinite ease-in-out;
  /* box-shadow:
    0 0 0 2px rgba(230, 48, 48, 0.2),
    var(--shadow-card); */
}

.match-card.is-live::before {
  background: linear-gradient(
    105deg,
    var(--rojo-vivo) 0%,
    var(--rojo-vivo) 4px,
    transparent 4px
  );
}

.match-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.match-meta .stage-pill {
  background: var(--gris-bg);
  border: 1px solid var(--gris-borde);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.match-time {
  font-weight: 600;
  color: var(--verde-cancha);
}

.match-time.live {
  color: var(--rojo-vivo);
}

.match-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 1.5rem;
  gap: 0.5rem;
}

.team {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 0.3rem;
}

.team.home {
  /* align-items: flex-start; */
}
.team.away {
  /* align-items: flex-end; */
}

.team-crest {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.team-name {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--texto);
  text-align: center;
}

.team-name-original {
  font-family: var(--font-body);
  font-size: 0.5rem;
  font-weight: 500;
  color: var(--texto-claro);
  text-align: center;
}

.team.home .team-name {
  text-align: left;
}
.team.away .team-name {
  text-align: right;
}

.score-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.score-main {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: var(--pizarra);
  line-height: 1;
}

.score-main.live {
  color: var(--rojo-vivo);
}

.score-ht {
  font-size: 0.62rem;
  color: #aaa;
  font-weight: 500;
}

/* ── Day separator ──────────────────────── */
.day-group {
  margin-bottom: 0.5rem;
}

.day-header {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  background: var(--verde-cancha);
  color: var(--dorado-claro);
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  display: inline-block;
}

/* ── Empty state ────────────────────────── */
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: #999;
  font-size: 0.9rem;
}

.empty-state .icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

/* ── Refresh button ─────────────────────── */
.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--verde-cancha);
  color: var(--dorado-claro);
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background 0.15s;
}

.refresh-btn:hover {
  background: var(--verde-medio);
}

/* htmx loading indicator */
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s;
}
.htmx-request .htmx-indicator {
  opacity: 1;
}
.spinner {
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Footer ─────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  font-size: 0.72rem;
  color: #bbb;
}

.site-footer a {
  color: #aaa;
}

/* ── Responsive ─────────────────────────── */
@media (min-width: 480px) {
  .team-crest {
    width: 44px;
    height: 44px;
  }
  .score-main {
    font-size: 2.4rem;
  }
  .team-name {
    font-size: 0.85rem;
  }
}

@media (width < 1400px) {
  .tab-nav {
    justify-content: end;
    margin-right: 5px;
  }
}
