/* ========== VARIABLES CSS ========== */
:root {
  --color-primary: #0A3873; /* Azul Boca */
  --color-secondary: #FFDD00; /* Amarillo Boca */
  --color-dark: #1a1a1a;
  --color-light: #f9f9f9;
  --color-gray: #777;
  --color-error: #d93025;
  --color-success: #25d366;
  --shadow-default: 0 4px 10px rgba(0, 0, 0, 0.1);
  --transition-all: all 0.3s ease;
}

/* ========== RESETS Y ESTILOS BASE ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: var(--color-light);
  line-height: 1.6;
  color: #333;
}

/* ========== ESTILOS DEL BANNER ========== */
.banner {
  width: 100%;
  height: 100vh; /* Mantiene la altura de la ventana completa */
  background: linear-gradient(135deg, var(--color-primary), #0D2A52);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  padding: 20px;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  box-shadow: var(--shadow-default);
  transition: height 0.3s ease, padding 0.3s ease, justify-content 0.3s ease;
  overflow: hidden;
}

.banner.collapsed {
  height: 60px; /* Altura reducida */
  padding: 3px; /* Padding reducido */
  justify-content: flex-start; /* Alinea la búsqueda arriba */
}

.banner .main-title {
  font-size: 3.5rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--color-secondary);
  position: static;
}

.banner .subtitle {
  font-size: 1.3rem;
  max-width: 800px;
  margin-bottom: 30px;
  color: #fff;
  font-style: italic;
}

.banner.collapsed .main-title,
.banner.collapsed .subtitle,
.banner.collapsed .next-match-container {
  display: none; /* Oculta estos elementos */
}

.banner.collapsed .search-container {
  margin-top: 5px; /* Ajusta el margen superior */
}

.banner.collapsed .search-bar {
  padding: 8px 16px 8px 32px; /* Reduce el padding */
  font-size: 0.9rem; /* Reduce el tamaño de la fuente */
  border-radius: 20px; /* Reduce el radio del borde */
}

.banner.collapsed .search-icon {
  left: 10px; /* Ajusta la posición del icono */
}

.banner.collapsed .search-button {
  padding: 6px 12px; /* Reduce el padding del botón */
  font-size: 0.8rem; /* Reduce el tamaño de la fuente del botón */
}

/* ========== PRÓXIMO PARTIDO ========== */
.next-match-container {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 15px;
  border-radius: 10px;
  margin-top: 20px;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* CSS adicional para los renglones */
.match-row {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

/* Ajustamos los estilos para que funcionen en línea */
.match-teams {
  font-weight: bold;
  font-size: 1.3em;
  color: var(--color-secondary);
  margin-right: 10px;
}

.match-week {
  font-size: 1em;
  color: #e7e7e7fa;
  font-style: italic;
}

.match-competition, .match-date, .match-location {
  margin: 0 5px;
}

.match-competition {
  font-size: 0.85em;
  color: #ffffff;
}

.match-date {
  font-size: 0.9em;
  color: #ffffff;
}

.match-location {
  font-size: 0.85em;
  color: var(--color-secondary);
}

.countdown-simple {
  font-size: 0.95em;
  color: var(--color-secondary);
  letter-spacing: 0.5px;
  width: 100%;
  text-align: center;
  font-weight: bold;
}

/* ========== BARRA DE BÚSQUEDA ========== */
.search-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  transition: margin-top 0.3s ease; /* Agrega transición */
  display: none; /* Oculta la barra de búsqueda por defecto */
}

.banner.collapsed .search-container {
  display: block; /* Muestra la barra de búsqueda cuando el banner está colapsado */
}

.search-bar {
  width: 100%;
  padding: 16px 24px 16px 50px;
  font-size: 1.1rem;
  border: none;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  outline: none;
  transition: var(--transition-all);
}

.search-bar:focus {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #5f6368;
}

.search-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition-all);
}

.search-button:hover {
  background-color: #072a5c;
}

/* ========== CONTENIDO PRINCIPAL ========== */
.content {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 20px;
  padding-top: 250px;
}

/* ========== GRILLA DE VIDEOS ========== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.single-card-view {
  display: block;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* ========== TARJETAS DE VIDEO ========== */

/* Estilos para la tarjeta de video */
.video-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e0e0e0;
  border-radius: 8px; /* Redondea las esquinas superiores */
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  background-color: #fff;
  margin-bottom: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Nuevo contenedor para la información en la parte superior */
.video-header-info {
  padding: 12px 15px;
  background-color: #0c2340; /* Fondo azul oscuro de Boca */
  border-bottom: 1px solid #1a3a5f;
  color: #fff;
  border-radius: 8px 8px 0 0; /* Redondea las esquinas superiores */
}

.video-header-info .video-title {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffcb05; /* Color amarillo Boca para el título */
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2em;
}

.video-header-info .video-channel,
.video-header-info .video-date,
.video-header-info .video-reading-time {
  margin: 4px 0;
  font-size: 0.9rem;
  color: #e0e0e0; /* Color claro para mejor legibilidad */
}

.video-header-info .video-channel {
  font-weight: 500;
  color: #ffcb05; /* Color amarillo Boca para el canal */
}

.thumbnail {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-bottom: 3px solid var(--color-secondary);
  border-radius: 8px 8px 0 0; /* Redondea las esquinas superiores */
}

.video-info {
  padding: 16px;
}

/* Mantener los estilos existentes para el resumen y demás contenido */
.video-summary {
  height: 300px;
  overflow-y: auto;
  font-size: 1.2rem;
  color: #000000;
  background-color: #f3f3f3;
  padding: 12px;
  border-radius: 8px;
  line-height: 1.5;
  border-left: 3px solid var(--color-primary);
  margin-bottom: 15px;
}

.video-summary::-webkit-scrollbar {
  width: 6px;
}

.video-summary::-webkit-scrollbar-thumb {
  background-color: var(--color-primary);
  border-radius: 6px;
}

.video-summary::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

/* Estilos para etiquetas de fecha */
.video-date-label {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 5px;
}

.video-date-label.hoy {
  background-color: #ffcb05; /* Amarillo Boca */
  color: #0c2340; /* Azul Boca */
}

.video-date-label.ayer {
  background-color: #fff; /* Blanco */
  color: #0c2340; /* Azul Boca */
}

.video-date-label.dias,
.video-date-label.meses,
.video-date-label.anios {
  background-color: rgba(255, 255, 255, 0.2); /* Semi-transparente para contrastar con el fondo oscuro */
  color: #ffcb05; /* Amarillo Boca */
}

/* Mantener estilos para el enlace a YouTube */
.ver-en-youtube {
  display: block;
  margin-top: 10px;
  text-align: center;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: bold;
  padding: 8px 0;
  border-radius: 0 0 8px 8px; /* Redondea las esquinas inferiores */
  background-color: #f5f5f5;
  transition: var(--transition-all);
}

.ver-en-youtube:hover {
  background-color: var(--color-secondary);
  color: var(--color-primary);
  text-decoration: none;
}

/* ========== BOTONES DE COMPARTIR ========== */
.share-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.share-button {
  background-color: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: var(--transition-all);
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: center;
  margin: 0 5px;
}

.share-button:hover {
  background-color: var(--color-primary);
  color: white;
}

.share-button i {
  margin-right: 8px;
  font-size: 1.2em;
}

.whatsapp-button {
  border-color: var(--color-success);
  color: var(--color-success);
}

.whatsapp-button:hover {
  background-color: var(--color-success);
  color: white;
}

/* ========== MENSAJES DE ESTADO ========== */
.loading,
.no-results,
.error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 20px;
  color: #5f6368;
  font-size: 1.1rem;
}

.loading {
  animation: pulse 1.5s infinite ease-in-out;
}

.error {
  color: var(--color-error);
  background-color: rgba(217, 48, 37, 0.05);
  border-radius: 8px;
}

.no-results {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 30px;
}

/* ========== BOTÓN CARGAR MÁS ========== */
.load-more-container {
  padding: 20px;
  width: 200px;
  margin: 30px auto;
}

.load-more-button {
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition-all);
  font-size: 1.1rem;
  width: 100%;
}

.load-more-button:hover {
  background-color: #072a5c;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ========== LAZY LOAD ========== */
.lazy-load {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.lazy-load:not([src]) {
  background-color: #f0f0f0;
}

.lazy-load[src] {
  opacity: 1;
}

/* ========== MODAL ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 80%;
  position: relative;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
  transition: var(--transition-all);
}

.close-button:hover {
  color: black;
}

/* ========== FOOTER ========== */
.footer {
  background-color: var(--color-primary);
  padding: 30px 0;
  text-align: center;
  font-size: 0.9em;
  margin-top: 40px;
  position: relative;
  color: white;
}

.footer::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  background-color: var(--color-secondary);
}

.footer p {
  margin-bottom: 20px;
}

.footer a {
  color: var(--color-secondary);
  text-decoration: none;
  position: relative;
  font-weight: bold;
  z-index: 1;
}

.footer a:hover {
  text-decoration: underline;
}

/* ========== ETIQUETAS DE FECHA ========== */
.video-date-label {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: 5px;
}

.video-date-label.hoy {
  background-color: #1aff05; /* Amarillo Boca */
  color: #230c40; /* Azul Boca */
}

.video-date-label.ayer {
  background-color: #e6e200de; /* Azul Boca */
  color: #030303; /* Amarillo Boca */
}

.video-date-label.dias {
  background-color: #ff0000; /* Azul Boca */
  color: #ffffff; /* Amarillo Boca */
}


.video-date-label.meses,
.video-date-label.anios {
  background-color: #e0e0e0;
  color: #333;
}

/* ========== ANIMACIONES ========== */
@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .banner {
    height: 100vh; /* Ocupa toda la altura de la pantalla en smartphones */
  }

  .banner .main-title {
    font-size: 2.2rem;
  }

  .banner .subtitle {
    font-size: 1.1rem;
  }

  .content {
    padding-top: 230px;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .video-title {
    font-size: 0.95rem;
  }

  .next-match-container {
    width: 95%;
    padding: 10px;
  }

  .countdown-item {
    font-size: 1.2em;
    min-width: 40px;
  }

  .single-card-view {
    padding: 10px;
  }

  .single-card-view iframe {
    height: 240px;
  }

  .single-card-view .video-title {
    font-size: 1.2rem;
  }
}

/* ========== UTILIDADES ========== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.copied-message {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.copied-message.show {
  opacity: 1;
}



/* ========== RESUMENES DE CARGA ========== */
.banner .loading-resumenes-container {
    /* Elimina el fondo */
    background-color: transparent;

    /* Cambia el color del texto a blanco o el que prefieras */
    color: white;

    /* Elimina el padding */
    padding: 0;

    /* Elimina los bordes redondeados */
    border-radius: 0;

    /* Ajusta el margen según sea necesario */
    margin-top: 20px;

    /* Ajusta el tamaño de la fuente */
    font-size: 1.1rem;

    /* Centra el texto */
    text-align: center;

    /* Ajusta el ancho según sea necesario */
    width: 100%;
    max-width: 600px;

    /* Elimina la sombra */
    box-shadow: none;
}

.banner .loading-resumenes-container p.loading {
    margin: 0; /* Elimina el margen predeterminado del párrafo */
}

/* Opcional: Estilos para cuando el banner está colapsado */
.banner.collapsed .loading-resumenes-container {
    display: none; /* Oculta el mensaje cuando el banner está colapsado */
}


/* ========== DESLIZAR MENSAJE ========== */

.banner .deslizar-container {
    /* Estilos existentes */
    background-color: transparent;
    color: white;
    padding: 0;
    border-radius: 0;
    margin-top: 20px;
    font-size: 1.1rem;
    text-align: center;
    width: 100%;
    max-width: 600px;
    box-shadow: none;
    display: flex; /* Para alinear el texto y la flecha */
    align-items: center; /* Centrar verticalmente */
    justify-content: center; /* Centrar horizontalmente */
    flex-direction: column; /* Apilar el texto y la flecha */
}

.banner .deslizar-container p {
    margin: 0;
    margin-bottom: 5px; /* Espacio entre el texto y la flecha */
}

.banner .deslizar-arrow {
    font-size: 1.5rem; /* Ajusta el tamaño de la flecha */
    animation: deslizarTitilar 1.5s infinite; /* Aplica la animación */
}

@keyframes deslizarTitilar {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(5px); /* Pequeño desplazamiento para el efecto */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Opcional: Estilos para cuando el banner está colapsado */
.banner.collapsed .deslizar-container {
    display: none; /* Oculta el mensaje cuando el banner está colapsado */
}