/* ============================================================
   EQUIPOS SÉNIOR (page-equipos-senior.php) — mobile first
   ============================================================ */

/* ── Hero con los dos equipos: apilados en móvil, lado a lado en escritorio ── */
.eq-hero {
  display: grid; grid-template-columns: minmax(0, 1fr);
  padding: var(--nav-h) 0 0;
}
.eq-hero-team {
  position: relative; display: flex; align-items: flex-end;
  min-height: max(300px, calc((100svh - var(--nav-h)) / 2));
  overflow: hidden; text-decoration: none; cursor: pointer;
}
.eq-hero-team-2 { border-top: 2px solid rgba(255,255,255,0.08); }
.eq-hero-team .team-photo-bg { transition: transform 0.6s; }
@media (hover: hover) { .eq-hero-team:hover .team-photo-bg { transform: scale(1.04); } }
.eq-hero-body { position: relative; z-index: 2; padding: 28px var(--gutter); color: white; width: 100%; }

@media (min-width: 768px) {
  .eq-hero { grid-template-columns: 1fr 1fr; min-height: 60vh; }
  .eq-hero-team { min-height: 0; }
  .eq-hero-team-2 { border-top: 0; border-left: 2px solid rgba(255,255,255,0.08); }
  .eq-hero-body { padding: 40px 32px; }
}
@media (min-width: 1024px) {
  /* A todo el ancho (17 nov 2026): sin márgenes laterales */
  .eq-hero { min-height: 85vh; padding: var(--nav-h) 0 0; }
  .eq-hero-body { padding: 56px var(--gutter); }
}
.eq-hero-team .team-photo-bg { position: absolute; inset: 0; }
.eq-hero-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  padding: 5px 14px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(var(--tint), .25); border: 1px solid rgba(var(--tint), .5); color: #f2b3c2;
}
.eq-hero-name { margin: 0 0 8px; font-size: clamp(30px, 3.5vw, 52px); font-weight: 900; line-height: 1.05; letter-spacing: -1.5px; color: white; }
.eq-hero-desc { margin: 0; font-size: 14px; color: rgba(255,255,255,.7); }
.eq-hero-more { margin-top: 24px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.6); }

/* ── Foto de equipo: llena el marco (cover) ── */
.eq-teamphoto-fig { margin: 0; }
.eq-teamphoto-fig img {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: center;
  border-radius: 14px; background: var(--gray-50);
}
@media (min-width: 768px) { .eq-teamphoto-fig img { aspect-ratio: 16 / 9; } }
.eq-teamphoto-fig figcaption { margin-top: 12px; font-size: 13px; color: var(--gray-500); }
@media (min-width: 1024px) { .eq-teamphoto-fig img { border-radius: 18px; } }

/* ── Noticias del equipo (tarjetas .nc de main.css) ── */
.eq-news-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; }
.eq-news-all { margin-bottom: 24px; font-size: 14px; font-weight: 700; color: var(--blue); text-decoration: none; white-space: nowrap; }
.eq-news-all:hover { color: var(--pink); }
.eq-news-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 640px)  { .eq-news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 768px)  { .eq-news-all { margin-bottom: 40px; } }
@media (min-width: 1024px) { .eq-news-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; } }

.eq-title { margin-bottom: 24px; }
@media (min-width: 768px) { .eq-title { margin-bottom: 40px; } }

/* ── Plantilla ── */
.eq-plantilla-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.eq-card { background: white; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.08); text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
@media (hover: hover) { .eq-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,0.14); } }
.eq-card-foto, .eq-card-foto-ph { aspect-ratio: 4 / 5; }
.eq-card-foto { background: #f0f0f0 center/cover no-repeat; }
.eq-card-foto-ph { background: linear-gradient(135deg, var(--black), #2a2a2a); display: flex; align-items: center; justify-content: center; font-size: 40px; }
.eq-card-info { padding: 12px; }
.eq-card-dorsal { font-size: 12px; font-weight: 700; color: var(--blue); margin-bottom: 3px; }
.eq-card-nombre { font-size: 14px; font-weight: 800; color: var(--black); letter-spacing: -0.3px; line-height: 1.3; }
.eq-card-posicion { font-size: 13px; color: var(--gray-500); margin-top: 3px; }

/* ── Entrenadores ── */
.eq-entrenadores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.eq-entrenador-card { background: var(--black); border-radius: 14px; overflow: hidden; text-align: center; border: 1px solid rgba(255,255,255,0.08); }
.eq-entrenador-foto, .eq-entrenador-foto-ph { aspect-ratio: 1 / 1; }
.eq-entrenador-foto { background: #1a1a1a center/cover no-repeat; }
.eq-entrenador-foto-ph { background: linear-gradient(135deg, var(--blue), var(--pink)); display: flex; align-items: center; justify-content: center; font-size: 48px; }
.eq-entrenador-info { padding: 14px; }
.eq-entrenador-nombre { font-size: 15px; font-weight: 800; color: white; line-height: 1.3; }
.eq-entrenador-cargo { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

/* ── Noticias ── */
.eq-news { display: block; text-decoration: none; background: white; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.07); transition: transform 0.2s; }
@media (hover: hover) { .eq-news:hover { transform: translateY(-4px); } }
.eq-news-img { height: 110px; }
.eq-news-body { padding: 12px; }
.eq-news-date { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.eq-news-title { font-size: 14px; font-weight: 700; color: var(--black); line-height: 1.4; }

/* ── Galería ── */
.eq-galeria-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.eq-galeria-foto { aspect-ratio: 4 / 3; border-radius: 10px; background: #eee center/cover no-repeat; cursor: pointer; transition: transform 0.2s, opacity 0.2s; }
@media (hover: hover) { .eq-galeria-foto:hover { transform: scale(1.02); opacity: 0.9; } }

/* ── Aviso sin plantilla ── */
.eq-empty { background: white; border-radius: 14px; padding: 28px 20px; text-align: center; color: var(--gray-500); border: 2px dashed var(--gray-200); }

@media (min-width: 640px) {
  .eq-plantilla-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .eq-galeria-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .eq-entrenadores-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (min-width: 768px) {
  .eq-news-img { height: 160px; }
  .eq-news-body { padding: 16px; }
  .eq-news-date { font-size: 10px; color: var(--gray-400); }
  .eq-empty { padding: 48px; }
}
@media (min-width: 1024px) {
  .eq-plantilla-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .eq-card-foto, .eq-card-foto-ph { aspect-ratio: auto; height: 240px; }
  .eq-card-foto-ph { font-size: 48px; }
  .eq-card-info { padding: 16px; }
  .eq-card-dorsal { font-size: 11px; }
  .eq-card-nombre { font-size: 15px; line-height: 1.6; }
  .eq-card-posicion { font-size: 12px; color: var(--gray-400); }
  .eq-entrenadores-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .eq-entrenador-card { border: 0; }
  .eq-entrenador-foto, .eq-entrenador-foto-ph { aspect-ratio: auto; height: 280px; }
  .eq-entrenador-foto-ph { font-size: 56px; }
  .eq-entrenador-info { padding: 20px; }
  .eq-entrenador-nombre { font-size: 16px; line-height: 1.6; }
  .eq-entrenador-cargo { font-size: 12px; color: rgba(255,255,255,0.45); }
  .eq-galeria-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Si un equipo está oculto, la mitad que queda ocupa toda la cabecera */
@media (min-width: 768px) {
  .eq-hero:has(> .eq-hero-team:only-of-type) { grid-template-columns: 1fr; }
  .eq-hero-team-2:only-of-type { border-left: 0; }
}
