/* ═══════════════════════════════════════════════════════════════
   sponsors.css — Estilos exclusivos de la sección de sponsors
   ---------------------------------------------------------------
   REGLAS DE ORO:
   · Usa únicamente clases con prefijo  .spn-  → nunca colisiona.
   · Lee variables de :root (definidas en style.css).
   · No sobreescribe ninguna clase de style.css / historia.css /
     ediciones.css bajo ninguna circunstancia.
   · Mobile-first: base para móvil, luego min-width para escritorio.
═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────
   1. SECCIÓN CONTENEDOR
─────────────────────────────────────────────── */
.spn-section {
  background: var(--color-black);
  padding: 5rem var(--gutter) 4.5rem;
  position: relative;
  overflow: hidden;
}

/* Textura de puntos sutil — puramente decorativa, no interfiere */
.spn-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* ───────────────────────────────────────────────
   2. CABECERA DE SECCIÓN
─────────────────────────────────────────────── */
.spn-section__header {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto 4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
}

.spn-section__rule {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(196, 56, 121, 0.4),
    transparent
  );
}

/* Invertimos el gradiente del segundo separador */
.spn-section__rule:last-child {
  background: linear-gradient(
    to left,
    transparent,
    rgba(196, 56, 121, 0.4),
    transparent
  );
}

.spn-section__heading-wrap {
  text-align: center;
  flex-shrink: 0;
}

.spn-section__label {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--color-pink);
  margin-bottom: 0.7rem;
}

.spn-section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: 0.05em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--color-white);
  white-space: nowrap;
}

.spn-section__title em {
  color: var(--color-pink);
  font-style: normal;
}

/* ───────────────────────────────────────────────
   3. GRID DE TARJETAS
─────────────────────────────────────────────── */
.spn-grid {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1fr;         /* móvil: 1 columna */
  gap: 2rem;
}

/* ───────────────────────────────────────────────
   4. TARJETA INDIVIDUAL
─────────────────────────────────────────────── */
.spn-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

/* ─── Marco del logo ─── */
.spn-card__frame {
  position: relative;
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
  transition:
    border-color 0.35s ease,
    transform 0.35s ease;
  background: rgba(255, 255, 255, 0.02);
}

.spn-card__frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.35s ease;
  pointer-events: none;
}

.spn-card:hover .spn-card__frame {
  border-color: rgba(196, 56, 121, 0.45);
  transform: translateY(-6px);
}

.spn-card:hover .spn-card__frame::after {
  border-color: rgba(196, 56, 121, 0.12);
}

/* Marco destacado para el organizador principal */
.spn-card__frame--featured {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.spn-card--center:hover .spn-card__frame--featured {
  border-color: rgba(196, 56, 121, 0.6);
}

/* ─── Glow de fondo (halo de color al hover) ─── */
.spn-card__glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(196, 56, 121, 0.0) 0%,
    transparent 70%
  );
  transition: opacity 0.5s ease;
  opacity: 0;
  pointer-events: none;
}

.spn-card__glow--gold {
  background: radial-gradient(
    ellipse at center,
    rgba(212, 160, 23, 0.0) 0%,
    transparent 70%
  );
}

.spn-card:hover .spn-card__glow {
  opacity: 1;
  background: radial-gradient(
    ellipse at center,
    rgba(196, 56, 121, 0.15) 0%,
    transparent 70%
  );
}

.spn-card--center:hover .spn-card__glow--gold {
  opacity: 1;
  background: radial-gradient(
    ellipse at center,
    rgba(212, 160, 23, 0.12) 0%,
    transparent 70%
  );
}

/* ─── Imagen del logo ─── */
.spn-card__logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Forzamos los logos a mostrar bien sobre fondo oscuro */
  filter: brightness(0.92) contrast(1.05);
  transition: filter 0.35s ease, transform 0.35s ease;
}

.spn-card:hover .spn-card__logo {
  filter: brightness(1) contrast(1.08);
  transform: scale(1.04);
}

/* ─── Badge "Organizador principal" ─── */
.spn-card__badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  background: var(--color-pink);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.4rem 0.5rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.spn-card--center:hover .spn-card__badge {
  transform: translateY(0);
}

/* ─── Info textual ─── */
.spn-card__info {
  text-align: center;
}

.spn-card__name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.spn-card__role {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-pink);
}

/* ───────────────────────────────────────────────
   5. PIE DECORATIVO
─────────────────────────────────────────────── */
.spn-section__footer {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 4rem auto 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.spn-section__footer-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.spn-section__footer-text {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Tablet (≥ 600px): 3 columnas
═══════════════════════════════════════════════ */
@media (min-width: 600px) {
  .spn-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
    gap: 1.5rem;
  }

  /* La tarjeta central (organizador principal) se eleva ligeramente */
  .spn-card--center {
    transform: translateY(-1rem);
  }

  .spn-card--center .spn-card__frame {
    aspect-ratio: 4 / 3.5;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Desktop (≥ 900px): espaciados mayores
═══════════════════════════════════════════════ */
@media (min-width: 900px) {
  .spn-section {
    padding: 6rem var(--gutter) 5.5rem;
  }

  .spn-grid {
    gap: 2.5rem;
  }

  .spn-card__frame {
    max-width: 340px;
    padding: 2.5rem;
  }

  /* La tarjeta central crece un poco más */
  .spn-card--center .spn-card__frame {
    max-width: 380px;
  }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Heading en móvil
═══════════════════════════════════════════════ */
@media (max-width: 480px) {
  .spn-section__header {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }

  .spn-section__rule {
    display: none;
  }

  .spn-section__title {
    white-space: normal;
  }

  .spn-card--center {
    transform: none;
  }

  .spn-section__footer-text {
    font-size: 0.55rem;
    letter-spacing: 0.12em;
  }
}

/* ═══════════════════════════════════════════════
   ACCESIBILIDAD — Reducción de movimiento
═══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .spn-card__frame,
  .spn-card__logo,
  .spn-card__badge,
  .spn-card__glow {
    transition: none;
  }

  .spn-card:hover .spn-card__frame {
    transform: none;
  }

  .spn-card:hover .spn-card__logo {
    transform: none;
  }
}
