/* ════════════════════════════════════════════
   SPONSORS.CSS — Estilos exclusivos de la
   página de sponsors (marcas auspiciantes).
   Se carga DESPUÉS de base.css y subpaginas.css
   ════════════════════════════════════════════ */


/* ── CONTENEDOR PRINCIPAL ─────────────────────*/

.sp-container {
  width: 100%;
  max-width: var(--max-w);
  padding: 0 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}


/* ── DECLARACIÓN ──────────────────────────────
   Texto descriptivo pequeño entre anuncios
   y la grilla. Sutil, no compite con el título.
   ─────────────────────────────────────────── */

.sp-declaracion {
  background: var(--black);
  padding: 1.5rem 2rem;
  font-family: var(--font);
  font-size: clamp(0.95rem, 1.2vw, 1.2rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
  margin-bottom: 0.6rem;
}


/* ── GRILLA ───────────────────────────────────*/

.sp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}


/* ── TARJETA ──────────────────────────────────*/

.sp-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.sp-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  transition: opacity 0.2s;
}

.sp-card-link:hover { opacity: 0.85; }

/* Variantes de fondo */
.sp-bg-black { background: var(--black); }
.sp-bg-white { background: var(--white); }
.sp-bg-grey  { background: var(--grey);  }

/* Contenedor del logo */
.sp-logo-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sp-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* Texto */
.sp-name,
.sp-desc,
.sp-link {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.sp-name {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding-top: 0.65rem;
  padding-bottom: 0.2rem;
}

.sp-desc {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 300;
  line-height: 1.5;
  flex: 1;
  padding-bottom: 0.4rem;
}

.sp-link {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.sp-link i { font-size: 0.6rem; }

/* Colores según fondo */
.sp-bg-black .sp-name  { color: var(--white); }
.sp-bg-black .sp-desc  { color: rgba(255,255,255,0.65); }
.sp-bg-black .sp-link  { color: var(--orange); }

.sp-bg-white .sp-name  { color: var(--black); }
.sp-bg-white .sp-desc  { color: rgba(0,0,0,0.6); }
.sp-bg-white .sp-link  { color: var(--orange); }

.sp-bg-grey  .sp-name  { color: var(--black); }
.sp-bg-grey  .sp-desc  { color: rgba(0,0,0,0.6); }
.sp-bg-grey  .sp-link  { color: var(--orange); }


/* ── CTA ──────────────────────────────────────*/

.sp-cta {
  background: var(--black);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.sp-cta-text {
  font-family: var(--font);
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
}

.sp-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.4rem;
  background: var(--orange);
  color: var(--white);
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.sp-cta-btn:hover { background: var(--white); color: var(--orange); }


/* ── MENSAJES DE ESTADO ───────────────────────*/

.sp-msg {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--black);
  opacity: 0.6;
  padding: 1rem 0;
  text-align: center;
}

.sp-error {
  color: #c0392b;
  opacity: 1;
}


/* ── LIGHTBOX ─────────────────────────────────*/

.sp-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.sp-lightbox-visible { display: flex; }

.sp-lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.sp-lightbox-cerrar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 2px solid var(--white);
  color: var(--white);
  font-size: 1.2rem;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: border-color 0.2s, color 0.2s;
}

.sp-lightbox-cerrar:hover {
  border-color: var(--orange);
  color: var(--orange);
}


/* ══════════════════════════════════════════
   ANUNCIOS DESTACADOS
   Fichas que aparecen antes de la grilla.
   Tres fondos alternados: negro / gris / blanco.
   ══════════════════════════════════════════ */

.anuncios-titulo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.2rem;
}

.anuncios-titulo-texto {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--orange);
  white-space: nowrap;
}

.anuncios-titulo-linea {
  flex: 1;
  height: 2px;
  background: var(--orange);
  opacity: 0.4;
}

.anuncios-grilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.2rem;
}

.anuncio-card {
  border: 3px solid var(--black);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Fondos */
.anuncio-fondo-negro  { background: var(--black); }
.anuncio-fondo-gris   { background: var(--grey);  }
.anuncio-fondo-blanco { background: var(--white); }

/* Textos fondo negro */
.anuncio-fondo-negro .anuncio-nombre       { color: var(--white); }
.anuncio-fondo-negro .anuncio-nombre-grande { color: var(--white); }
.anuncio-fondo-negro .anuncio-dato         { color: rgba(255,255,255,0.75); }
.anuncio-fondo-negro .anuncio-dato i       { color: var(--orange); }
.anuncio-fondo-negro .anuncio-obs          { color: rgba(255,255,255,0.45); }
.anuncio-fondo-negro .anuncio-header-negro { background: #1a1a1a; }

/* Textos fondo gris */
.anuncio-fondo-gris .anuncio-nombre        { color: var(--black); }
.anuncio-fondo-gris .anuncio-nombre-grande { color: var(--black); }
.anuncio-fondo-gris .anuncio-dato          { color: #444; }
.anuncio-fondo-gris .anuncio-dato i        { color: var(--orange); }
.anuncio-fondo-gris .anuncio-obs           { color: #888; }
.anuncio-fondo-gris .anuncio-header-negro  { background: #d0d0d0; }

/* Textos fondo blanco */
.anuncio-fondo-blanco .anuncio-nombre        { color: var(--black); }
.anuncio-fondo-blanco .anuncio-nombre-grande { color: var(--black); }
.anuncio-fondo-blanco .anuncio-dato          { color: #444; }
.anuncio-fondo-blanco .anuncio-dato i        { color: var(--orange); }
.anuncio-fondo-blanco .anuncio-obs           { color: #999; }
.anuncio-fondo-blanco .anuncio-header-negro  { background: #e8e8e8; }

/* Zona imagen / video */
.anuncio-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.anuncio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(10%) contrast(95%);
  transition: transform 0.4s ease;
}

.anuncio-card:hover .anuncio-img { transform: scale(1.04); }

.anuncio-video-wrap .anuncio-img { cursor: pointer; }
.anuncio-video-wrap:hover .anuncio-img { transform: none; }

.anuncio-img-clickable { cursor: zoom-in; }

/* Botón play */
.anuncio-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(0,0,0,0.65);
  border: 2px solid var(--white);
  color: var(--white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s;
}

.anuncio-play-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
}

.anuncio-play-btn i { margin-left: 3px; }

/* Header sin archivo */
.anuncio-header-negro {
  padding: 1.2rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 100px;
  justify-content: flex-end;
  position: relative;
}

.anuncio-nombre-grande {
  font-family: var(--font);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Badge "Destacado" */
.anuncio-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.2rem 0.5rem;
  z-index: 2;
}

/* Datos */
.anuncio-datos {
  padding: 0.6rem 0.9rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.anuncio-nombre-fila {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.05rem;
}

.anuncio-nombre {
  font-family: var(--font);
  font-size: 0.92rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.anuncio-dato {
  font-size: 0.73rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.anuncio-dato i {
  font-size: 0.65rem;
  flex-shrink: 0;
}

.anuncio-obs {
  font-size: 0.7rem;
  font-style: italic;
  line-height: 1.4;
  margin-top: 0.05rem;
}

/* Botones */
.anuncio-botones {
  display: flex;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.5rem;
  flex-wrap: wrap;
}

.anuncio-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity 0.2s;
  flex: 1;
  justify-content: center;
}

.anuncio-btn:hover { opacity: 0.85; }

.anuncio-btn-wa   { background: #25d366 !important; color: #fff !important; }
.anuncio-btn-link { background: var(--orange) !important; color: #fff !important; }

/* Separador */
.anuncios-separador {
  height: 2px;
  background: var(--black);
  opacity: 0.15;
  margin: 0.4rem 0;
}


/* ── RESPONSIVE ───────────────────────────────*/

@media (max-width: 768px) {
  .sp-grid         { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .sp-container    { padding: 0 1.5rem 3rem; }
  .anuncios-grilla { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .sp-grid         { grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
  .sp-container    { padding: 0 1.25rem 3rem; }
  .sp-cta          { flex-direction: column; align-items: flex-start; }
  .sp-cta-btn      { width: 100%; justify-content: center; }
  .anuncios-grilla { grid-template-columns: 1fr; }
}