:root {
  --navy-1:   #0f1c47;
  --navy-2:   #0a1230;
  --red:      #dc2626;
  --red-dark: #b91c1c;
  --text:     #1f2937;
  --muted:    #6b7280;
  --border:   #e5e7eb;
  --surface:  #f9fafb;
}

html, body {
  overflow-x: hidden;
}

* { 
  box-sizing: border-box; 
}

.eq-page {
  font-family: 'Outfit', sans-serif;
  background: #fff;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* ══════════════════════════════════════
   HERO — navy con acento rojo
══════════════════════════════════════ */
.eq-hero { 
  background: var(--navy-2); 
  position: relative; 
  overflow: hidden; 
}

.eq-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; 
  left: 0; 
  right: 0;
  height: 55px;
  background: #fff;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.eq-hero-bg {
  position: absolute; 
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}

.eq-hero-accent { 
  height: 4px; 
  background: var(--red); 
}

.eq-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

.eq-hero-eyebrow { 
  display: inline-flex; 
  align-items: center; 
  gap: 7px; 
  margin-bottom: 0.9rem; 
}

.eq-hero-eyebrow-dot {
  width: 7px; 
  height: 7px; 
  border-radius: 50%; 
  background: var(--red);
  animation: eq-blink 1.8s infinite;
}

@keyframes eq-blink { 
  0%, 100% { opacity: 1; } 
  50% { opacity: 0.25; } 
}

.eq-hero-eyebrow span {
  font-size: 0.7rem; 
  font-weight: 700; 
  letter-spacing: 0.1em;
  text-transform: uppercase; 
  color: rgba(255,255,255,0.4);
}

.eq-hero h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 8vw, 5.2rem);
  color: #fff;
  line-height: 0.95;
  margin: 0 0 0.9rem;
  letter-spacing: 0.02em;
}

.eq-hero h1 .accent { 
  color: var(--red); 
}

.eq-hero-desc { 
  font-size: 0.85rem; 
  color: rgba(255,255,255,0.4); 
  margin: 0; 
}

.eq-hero-badge {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  text-align: center;
  min-width: 120px;
  flex-shrink: 0;
}

.eq-hero-badge-icon { 
  font-size: 1.8rem; 
  display: block; 
  margin-bottom: 0.35rem; 
}

.eq-hero-badge strong { 
  display: block; 
  color: #fff; 
  font-size: 0.84rem; 
  font-weight: 700; 
}

.eq-hero-badge span { 
  display: block; 
  color: rgba(255,255,255,0.35); 
  font-size: 0.7rem; 
  margin-top: 2px; 
}

/* ══════════════════════════════════════
   CONTENIDO Y FILTROS
══════════════════════════════════════ */
.eq-content { 
  max-width: 1400px; 
  margin: 0 auto; 
  padding: 2rem 1.5rem 5rem; 
}

.eq-divider { 
  display: flex; 
  align-items: center; 
  gap: 10px; 
  margin: 0 0 1.4rem; 
}

.eq-divider::before, 
.eq-divider::after { 
  content: ''; 
  flex: 1; 
  height: 1px; 
  background: var(--border); 
}

.eq-divider span {
  font-size: 0.67rem; 
  font-weight: 800; 
  letter-spacing: 0.12em; 
  text-transform: uppercase;
  color: var(--muted); 
  white-space: nowrap; 
  padding: 3px 10px;
  border: 1px solid var(--border); 
  border-radius: 20px; 
  background: var(--surface);
}

.eq-filters {
  display: flex; 
  gap: 10px; 
  flex-wrap: wrap; 
  justify-content: center; 
  margin-bottom: 1.75rem;
}

.eq-search { 
  position: relative; 
  flex: 1; 
  min-width: 220px; 
  max-width: 380px; 
}

.eq-search svg {
  position: absolute; 
  left: 14px; 
  top: 50%; 
  transform: translateY(-50%); 
  color: var(--muted);
  z-index: 2;
}

#eq-filters-form .eq-search input[type="text"] {
  width: 100%; 
  height: 44px; 
  border: 1px solid var(--border); 
  border-radius: 999px;
  padding: 0 16px 0 40px !important;
  font-size: 14px; 
  font-family: 'Outfit', sans-serif;
  background: #fff; 
  color: var(--text);
  box-sizing: border-box;
}

.eq-filters select {
  height: 44px; 
  border: 1px solid var(--border); 
  border-radius: 999px; 
  padding: 0 16px;
  font-size: 14px; 
  font-family: 'Outfit', sans-serif; 
  background: #fff; 
  color: var(--text);
  min-width: 170px;
}

.eq-filters input:focus, 
.eq-filters select:focus {
  outline: none; 
  border-color: var(--navy-1); 
  box-shadow: 0 0 0 3px rgba(15,28,71,0.08);
}

.eq-filters button {
  height: 44px; 
  padding: 0 22px; 
  border: none; 
  border-radius: 999px;
  background: var(--navy-1); 
  color: #fff; 
  font-size: 14px; 
  font-weight: 700;
  font-family: 'Outfit', sans-serif; 
  cursor: pointer; 
  transition: background .15s;
}

.eq-filters button:hover { 
  background: var(--navy-2); 
}

/* Suggestions Dropdown */
.eq-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0; 
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,28,71,0.12);
  overflow: hidden;
  z-index: 50;
  max-height: 280px;
  overflow-y: auto;
}

.eq-suggestions.open { 
  display: block; 
}

.eq-suggestion {
  display: flex; 
  align-items: center; 
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--surface);
}

.eq-suggestion:last-child { 
  border-bottom: none; 
}

.eq-suggestion:hover, 
.eq-suggestion.active { 
  background: var(--surface); 
}

.eq-suggestion-logo {
  width: 28px; 
  height: 28px; 
  border-radius: 7px; 
  flex-shrink: 0;
  background: var(--navy-1); 
  color: #fff;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif; 
  font-size: 12px;
  object-fit: cover;
}

.eq-suggestion-text p { 
  margin: 0; 
  font-size: 13px; 
  font-weight: 600; 
  color: var(--text); 
}

.eq-suggestion-text span { 
  font-size: 11px; 
  color: var(--muted); 
}

.eq-suggestion-empty { 
  padding: 12px; 
  font-size: 13px; 
  color: var(--muted); 
  text-align: center; 
}

/* ══════════════════════════════════════
   GRID DE EQUIPOS
══════════════════════════════════════ */
.eq-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 14px; 
  margin-bottom: 2rem; 
}

.eq-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.18s, border-color 0.18s;
  cursor: pointer;
}

.eq-card:hover { 
  box-shadow: 0 2px 14px rgba(15,28,71,0.09); 
  border-color: #d1d5db; 
}

.eq-card-head { 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  margin-bottom: 12px; 
}

.eq-logo {
  width: 40px; 
  height: 40px; 
  border-radius: 9px;
  background: var(--navy-1); 
  color: #fff;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif; 
  font-size: 15px; 
  letter-spacing: 0.03em;
  flex-shrink: 0; 
  object-fit: cover;
}

.eq-name { 
  font-size: 15px; 
  font-weight: 700; 
  color: var(--text); 
  margin: 0; 
}

.eq-cat {
  display: inline-block; 
  font-size: 10.5px; 
  font-weight: 800; 
  letter-spacing: 0.04em;
  text-transform: uppercase; 
  color: var(--red-dark); 
  background: #fef2f2;
  padding: 2px 8px; 
  border-radius: 5px; 
  margin-top: 3px;
}

.eq-meta { 
  display: flex; 
  flex-direction: column; 
  gap: 5px; 
  margin-bottom: 12px; 
}

.eq-meta-row { 
  display: flex; 
  align-items: center; 
  gap: 7px; 
  font-size: 12.5px; 
  color: var(--muted); 
}

.eq-meta-row svg { 
  flex-shrink: 0; 
  color: var(--muted); 
}

.eq-meta-row strong { 
  color: var(--text); 
  font-weight: 600; 
  text-transform: uppercase; 
}

.eq-foot {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 12.5px; 
  font-weight: 700; 
  color: var(--navy-1);
  display: flex; 
  align-items: center; 
  justify-content: space-between;
}

.eq-empty { 
  grid-column: 1 / -1; 
  text-align: center; 
  color: var(--muted); 
  font-size: 14px; 
  padding: 3rem 0; 
}

/* ══════════════════════════════════════
   PAGINACIÓN
══════════════════════════════════════ */
.eq-pager { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.eq-pager a, 
.eq-pager span {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  width: 34px; 
  height: 34px; 
  border-radius: 999px;
  border: 1px solid var(--border); 
  font-size: 13px; 
  font-family: 'Outfit', sans-serif;
  text-decoration: none; 
  color: var(--text); 
  background: #fff;
  transition: border-color .15s, color .15s;
}

.eq-pager a:hover { 
  border-color: var(--navy-1); 
  color: var(--navy-1); 
}

.eq-pager .current { 
  background: var(--navy-1); 
  border-color: var(--navy-1); 
  color: #fff; 
}

.eq-pager .disabled { 
  color: var(--border); 
  pointer-events: none; 
}

/* ══════════════════════════════════════
   MODAL DE PLANTILLA
══════════════════════════════════════ */
.eq-modal-overlay {
  display: none;
  position: fixed; 
  inset: 0;
  background: rgba(10,18,48,0.55);
  align-items: center; 
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
}

.eq-modal-overlay.open { 
  display: flex; 
}

.eq-modal {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.eq-modal-head {
  display: flex; 
  align-items: flex-start; 
  justify-content: space-between;
  gap: 12px;
  padding: 1.25rem 1.4rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.eq-modal-head-info {
  display: flex; 
  align-items: flex-start; 
  gap: 10px; 
  min-width: 0;
}

.eq-modal-logo {
  width: 42px; 
  height: 42px; 
  border-radius: 10px; 
  object-fit: cover; 
  flex-shrink: 0;
  background: var(--navy-1);
  display: none;
}

.eq-modal-name {
  font-size: 17px; 
  font-weight: 700; 
  color: var(--text); 
  margin: 0;
  font-family: 'Outfit', sans-serif;
  word-break: break-word;
}

.eq-modal-cat {
  display: inline-block; 
  font-size: 10.5px; 
  font-weight: 800; 
  letter-spacing: 0.04em;
  text-transform: uppercase; 
  color: var(--red-dark); 
  background: #fef2f2;
  padding: 2px 8px; 
  border-radius: 5px; 
  margin-top: 6px;
}

.eq-modal-close {
  border: none; 
  background: var(--surface); 
  color: var(--muted);
  width: 30px; 
  height: 30px; 
  border-radius: 8px; 
  font-size: 18px; 
  line-height: 1;
  cursor: pointer; 
  flex-shrink: 0;
}

.eq-modal-close:hover { 
  background: var(--border); 
  color: var(--text); 
}

.eq-modal-body { 
  padding: 0.75rem 1.4rem 1.4rem; 
  overflow-y: auto; 
}

.eq-modal-capitan {
  display: flex; 
  align-items: center; 
  gap: 10px;
  background: var(--surface);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 0.9rem;
}

.eq-modal-capitan-info { 
  min-width: 0; 
}

.eq-modal-capitan-info p { 
  margin: 0; 
  font-size: 13px; 
  font-weight: 600; 
  color: var(--text); 
  text-transform: uppercase; 
  word-break: break-word;
}

.eq-modal-capitan-info span {
  font-size: 10.5px; 
  font-weight: 800; 
  letter-spacing: 0.05em; 
  text-transform: uppercase; 
  color: var(--red-dark);
}

.eq-modal-avatar {
  width: 32px; 
  height: 32px; 
  border-radius: 8px; 
  flex-shrink: 0;
  background: var(--navy-1); 
  color: #fff;
  display: flex; 
  align-items: center; 
  justify-content: center;
  font-family: 'Bebas Neue', sans-serif; 
  font-size: 14px;
  object-fit: cover;
}

.eq-modal-row {
  display: flex; 
  align-items: center; 
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface);
}

.eq-modal-row:last-child { 
  border-bottom: none; 
}

.eq-modal-player { 
  font-size: 14px; 
  font-weight: 600; 
  color: var(--text); 
  margin: 0; 
  text-transform: uppercase; 
  word-break: break-word;
}

.eq-modal-pos { 
  font-size: 12px; 
  color: var(--muted); 
  margin: 1px 0 0; 
}

.eq-modal-empty { 
  text-align: center; 
  color: var(--muted); 
  font-size: 13px; 
  padding: 1.5rem 0; 
}

.eq-modal-section-title {
  font-size: 0.67rem; 
  font-weight: 800; 
  letter-spacing: 0.1em; 
  text-transform: uppercase;
  color: var(--muted); 
  margin: 1.1rem 0 0.6rem;
}

.eq-modal-match {
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--surface);
  font-size: 13px;
}

.eq-modal-match:last-child { 
  border-bottom: none; 
}

.eq-modal-match-rival { 
  display: flex; 
  flex-direction: column; 
  gap: 1px; 
  min-width: 0; 
}

.eq-modal-match-rival strong { 
  font-size: 13px; 
  font-weight: 600; 
  color: var(--text); 
  word-break: break-word;
}

.eq-modal-match-rival span { 
  font-size: 11px; 
  color: var(--muted); 
}

.eq-modal-match-score { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  flex-shrink: 0; 
}

.eq-modal-match-marcador {
  font-family: 'Bebas Neue', sans-serif; 
  font-size: 15px; 
  letter-spacing: 0.03em; 
  color: var(--text);
}

.eq-modal-badge {
  font-size: 10px; 
  font-weight: 800; 
  letter-spacing: 0.03em; 
  text-transform: uppercase;
  padding: 2px 8px; 
  border-radius: 999px;
}

.eq-modal-badge.ganado   { background: #dcfce7; color: #15803d; }
.eq-modal-badge.perdido  { background: #fef2f2; color: var(--red-dark); }
.eq-modal-badge.empate   { background: #f3f4f6; color: var(--muted); }

/* ══════════════════════════════════════
   MEDIA QUERIES (RESPONSIVIDAD MÓVIL)
══════════════════════════════════════ */
@media (max-width: 1024px) { 
  .eq-grid { 
    grid-template-columns: repeat(2, 1fr); 
  } 
}

@media (max-width: 768px) {
  .eq-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 2.5rem 1rem 4.5rem;
    gap: 1.25rem;
  }

  .eq-content {
    padding: 1.5rem 1rem 3rem;
  }

  .eq-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .eq-search {
    max-width: 100%;
    width: 100%;
  }

  .eq-filters select,
  .eq-filters button {
    width: 100%;
    min-width: unset;
  }

  .eq-modal-overlay {
    padding: 0.75rem;
  }

  .eq-modal {
    max-width: 100%;
    max-height: 88vh;
  }
}

@media (max-width: 560px) { 
  .eq-grid { 
    grid-template-columns: 1fr; 
  } 

  .eq-hero h1 {
    font-size: 2.5rem;
  }

  .eq-modal-head {
    padding: 1rem;
  }

  .eq-modal-body {
    padding: 0.75rem 1rem 1rem;
  }
}