/* ========================================================
   ACORDEÓN DE EQUIPOS THUNDER CHI (Libre de conflictos)
======================================================== */

/* Contenedor principal que protege al resto de tu página */

.thunder-equipos-section {
  width: 100%;
  padding: 60px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
}

/* El bloque de las tarjetas */

.tc-cards {
  display: flex;
  flex-wrap: nowrap;
  width: min(1170px, 90vw);
  height: 400px;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
  white-space: nowrap;
  z-index: 2;
}

/* Tarjeta individual */

.tc-card {
  flex: 1 1 0 !important;
  min-width: 0;
  height: 100%;
  cursor: pointer;
  transition: flex 0.5s ease, box-shadow 0.5s ease !important;
  overflow: hidden;
  position: relative;
  will-change: flex;
}

/* El efecto al pasar el mouse */

.tc-card:hover {
  flex: 3 !important;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
}

.tc-card a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* Imágenes con filtro blanco y negro inicial */

.tc-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: grayscale(100%);
  will-change: transform, filter;
  background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
  background-size: 200% 100%;
  animation: tc-shimmer 1.5s infinite;
}

@keyframes tc-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.tc-card:hover img {
  transform: scale(1.2);
  filter: grayscale(0%);
}

/* Capa oscura superpuesta al pasar el mouse */

.tc-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.tc-card:hover::after {
  opacity: 1;
}

/* Título del equipo */

.tc-card-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.3s ease;
  z-index: 2;
}

.tc-card:hover .tc-card-title {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Descripción que sube */

.tc-card-desc {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 1rem;
  color: #fff;
  font-size: 0.95rem;
  white-space: normal;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.tc-card:hover .tc-card-desc {
  transform: translateY(0);
}

/* Accesibilidad teclado */

.tc-card a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.tc-card a:focus-visible img {
  filter: grayscale(0%);
}

/* ========================================================
   VERSIÓN MÓVIL Y TABLET (Acordeón Vertical Táctil)
======================================================== */

@media (max-width: 768px) {
  .tc-cards {
    flex-direction: column !important;
    height: 85vh !important;
  }
}

@media (max-width: 768px) {
  .tc-card {
    flex: 1 1 0 !important;
    width: 100% !important;
    height: auto !important;
  }
}

/* MAGIA TÁCTIL: Al tocar la tarjeta (active o focus), se expande hacia abajo */

@media (max-width: 768px) {
  .tc-card:hover, .tc-card:active, .tc-card:focus-within {
    flex: 3 !important;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    z-index: 10;
  }
}

/* Aseguramos que la imagen cubra el nuevo espacio vertical sin deformarse */

@media (max-width: 768px) {
  .tc-card img {
    height: 100%;
    width: 100%;
    object-fit: cover;
  }
}

/* Ajuste de los títulos para que se lean mejor en pantallas pequeñas */

@media (max-width: 768px) {
  .tc-card-title {
    font-size: 1rem;
    padding: 8px 15px;
  }
}

