/* body {
  font-family: 'Poppins', sans-serif;
  background: var(--color-black);
  color: var(--color-white);
  margin: 0;
} */

h1 {
  text-align: center;
  margin: 20px 0;
}

#searchBox {
  display: block;
  width: 90%;
  max-width: 400px;
  margin: 0 auto 30px;
  padding: 10px 15px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  outline: none;
  transition: border 0.3s;
}
#searchBox:focus {
  border-color: var(--color-red);
}

/* Loader spinner */
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid var(--color-red);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* Grids */
.blog-grid, .teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 0 20px 40px;
}

/* Centrar los team-cards siempre */
.teams-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

/* Cards */
.blog-card, .team-card {
  background: var(--color-black_blog-card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  text-align: center;
}
.blog-card img, .team-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}
.team-card img {
  width: 80px;
  height: 80px;
  margin-top: 20px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
}
.blog-card h2, .team-card strong {
  font-size: 16px;
  margin: 12px;
  color: #fff;
}

/* Meta */
.news-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: #ccc;
  margin-bottom: 8px;
}
.news-meta img.source-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 3px;
}

.blog-card p {
  font-size: 12px;
  margin: 0 12px 12px;
  color: #ccc;
}

.blog-card a {
  font-size: 10px;
}

.blog-card h2 {
  font-size: 13px;
}

/* Botón */
.btn-go {
  display: inline-block;
  margin: 12px;
  padding: 8px 14px;
  background: var(--color-red);
  color: var(--color-white);
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.3s;
}
.btn-go:hover {
  background:  var(--color-black);
}

/* footer {
  background: #111;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  color: #777;
} */


/* Noticia destacada */
.blog-card.featured {
  grid-column: span 2; /* ocupa dos columnas en el grid */
  background: #1a1a1a;
  border: 2px solid var(--color-red);
}

.blog-card.featured img {
  height: 300px; /* más grande que las demás */
  object-fit: cover;
}

.blog-card.featured h2 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}


.blog-card.featured .news-meta img.source-icon {
  width: 16px;   /* antes estaba en 20px */
  height: 16px;
}

/* ====== Responsive ====== */

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .blog-card.featured img {
    height: 260px;
  }
  .blog-card.featured h2 {
    font-size: 18px;
  }
}

/* Móviles */
@media (max-width: 640px) {
  /* El grid pasa a 1 columna y la destacada ocupa todo el ancho */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 14px 28px;
  }
  .blog-card.featured {
    grid-column: 1 / -1;   /* asegura 100% del ancho */
    border-width: 1.5px;
  }
  .blog-card.featured img {
    height: 220px;         /* imagen menos alta para móviles */
  }
  .blog-card.featured h2 {
    font-size: 17px;
    line-height: 1.25;
    margin: 10px 12px;
  }
  .blog-card h2 {          /* títulos normales un poco más legibles */
    font-size: 14px;
  }
  .news-meta {             /* texto meta más compacto */
    font-size: 12px;
    gap: 6px;
  }
  .blog-card.featured .news-meta img.source-icon {
    width: 14px;           /* icono más sutil en móvil */
    height: 14px;
  }
  .btn-go {                /* mejor área táctil */
    padding: 10px 16px;
    font-size: 12px;
  }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
  .blog-card.featured img { height: 200px; }
  .blog-card.featured h2 { font-size: 16px; }
}




/* ===== Historias OneFootball ===== */
.stories-strip {
  margin: 18px auto 10px;
  padding: 0 10px;
}

.stories-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-black);
  text-align: left;
  max-width: 1200px;
  margin: 0 auto 8px;
  letter-spacing: 0.2px;
}

.stories-scroller {
  /* Carrusel horizontal */
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 10px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  max-width: 1200px;
  margin: 0 auto;
}

/* Ocultar scrollbar visual sin afectar accesibilidad */
.stories-scroller::-webkit-scrollbar { height: 8px; }
.stories-scroller::-webkit-scrollbar-track { background: transparent; }
.stories-scroller::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 4px; }

.story-card {
  /* 9:16 estable para evitar CLS */
  aspect-ratio: 9 / 16;
  width: 150px;                 /* Desktop por defecto */
  max-width: 32vw;              /* no crecer demasiado en pantallas chicas */
  background: #0f1422;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  scroll-snap-align: start;
  flex: 0 0 auto;
  user-select: none;
  -webkit-user-drag: none;
  transform: translateZ(0);     /* acelera en móviles */
}

.story-card:hover {
  transform: translateZ(0) scale(1.015);
}

.story-link {
  position: absolute;
  inset: 0;
  display: block;
  text-decoration: none;
  color: inherit;
}

.story-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}

/* Degradados para legibilidad */
.story-grad-top,
.story-grad-bottom {
  position: absolute;
  left: 0; right: 0;
  height: 40%;
  pointer-events: none;
}
.story-grad-top { top: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.55), rgba(0,0,0,0)); }
.story-grad-bottom { bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0)); }

/* Badge superior (logo provider o icono play) */
.story-badge {
  position: absolute;
  top: 8px; left: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0,0,0,0.45);
  padding: 6px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.story-badge img.provider-logo {
  width: 18px; height: 18px;
  border-radius: 4px;
  object-fit: contain;
  background: #fff;
}

.story-badge .provider-name {
  font-size: 12px;
  color: #fff;
  font-weight: 600;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Icono play para video */
.story-badge .play-icon {
  width: 0; height: 0;
  border-left: 10px solid var(--color-white);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

/* Título */
.story-title {
  position: absolute;
  left: 8px; right: 8px; bottom: 8px;
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;           /* 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Estados de foco accesibles */
.story-link:focus-visible {
  outline: 2px dashed var(--color-red);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 1024px) {
  .story-card { width: 140px; }
}
@media (max-width: 640px) {
  .stories-title {
    text-align: left;
    padding-left: 2px;
    margin-bottom: 6px;
  }
  .stories-scroller { gap: 10px; padding: 4px 4px 8px; }
  .story-card { width: 126px; }
  .story-title { font-size: 12px; }
}
@media (max-width: 360px) {
  .story-card { width: 118px; }
}


/* ===== Story Viewer (overlay tipo Instagram) ===== */
.sv.hidden { display: none; }
.sv {
  position: fixed;
  inset: 0;
  z-index: 9999;
  font-family: var(--font-main);
}

.sv-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
}

.sv-canvas {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: stretch;
}

/* Barra de progreso superior */
.sv-progress {
  display: grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 10px 12px;
}
.sv-seg {
  height: 3px;
  background: rgba(255,255,255,0.35);
  border-radius: 2px;
  overflow: hidden;
}
.sv-seg-fill {
  height: 100%;
  width: 0%;
  background: #fff;
  transition: width 0.15s linear;
}

/* Botón cerrar */
.sv-close {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: 0;
  width: 36px; height: 36px;
  border-radius: 999px;
  font-size: 18px;
  cursor: pointer;
}

/* Stage (contenido 9:16 central) */
.sv-stage {
  display: grid;
  place-items: center;
  padding: 8px 0;
}
.sv-photo, .sv-video-wrap {
  aspect-ratio: 9 / 16;
  width: min(92vw, 420px);
  /* antes: max-height: calc(100vh - 140px); */
  max-height: calc(100vh - 200px); /* 🔽 deja más espacio para el título/CTA */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
  background: #0e1422;
}

@media (min-width: 1024px) {
  .sv-photo, .sv-video-wrap {
    width: min(40vw, 420px);
    /* antes: max-height: calc(100vh - 140px); */
    max-height: calc(100vh - 220px); /* 🔽 un poco más compacto en desktop */
  }
}

.sv-photo {
  background-size: cover;
  background-position: center;
}
.sv-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

/* Meta + CTA */
.sv-meta {
  color: #fff;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding-bottom: 16px;
}
.sv-provider {
  display: grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 8px;
}
.sv-provider-logo {
  width: 22px; height: 22px;
  border-radius: 4px; object-fit: contain; background: #fff;
}
.sv-provider-name {
  font-weight: 600;
  font-size: 14px;
}
.sv-title {
  text-align: center;
  max-width: min(92vw, 420px);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.45);
}
.sv-cta {
  display: inline-block;
  text-decoration: none;
  background: #fff;
  color: #111;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 999px;
}