/* =========================
   SECCIÓN PATROCINADORES
========================= */
.sponsors-container {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 25px;
  text-align: center;
}

.sponsors-container h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.sponsors-container .subtitle {
  font-size: 1rem;
  color: #6b7280;
  margin-bottom: 45px;
}

/* =========================
   GRID
========================= */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 35px;
}

/* =========================
   CARD LOGO
========================= */
.sponsor-card {
  border-radius: 18px;
  overflow: hidden;
}

/* SUMMARY (logo clickeable) */
.sponsor-card summary {
  list-style: none;
  cursor: pointer;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sponsor-card summary:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.12);
}

.sponsor-card summary::-webkit-details-marker {
  display: none;
}

.sponsor-card summary img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  padding: 30px;
  background: #f9fafb;
}

/* =========================
   OVERLAY MODAL
========================= */
.sponsor-card[open]::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 998;
}

/* =========================
   MODAL INFO
========================= */
.sponsor-card[open] .sponsor-info {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 28px;
  z-index: 999;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  animation: modalIn 0.3s ease;
  text-align: center;
}

/* LOGO CHICO EN MODAL */
.sponsor-card[open] .sponsor-info::before {
  content: "";
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto 15px;
  background-image: var(--logo);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* INFO */
.sponsor-info p {
  font-size: 0.95rem;
  color: #374151;
  margin-bottom: 10px;
}

.sponsor-info strong {
  color: #111827;
}

/* LINK */
.sponsor-info a {
  display: inline-block;
  margin-top: 15px;
  font-weight: 700;
  font-size: 0.95rem;
  color: #b91c1c;
  text-decoration: none;
}

.sponsor-info a:hover {
  text-decoration: underline;
}

/* =========================
   ANIMACIÓN MODAL
========================= */
@keyframes modalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -55%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* GRID DE LOGOS */
.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 30px;
  align-items: center;
}

.sponsor-item {
  text-align: center;
}

.sponsor-logo {
  max-width: 180px;
  max-height: 120px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.sponsor-logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,0.2));
}

/* =========================
   MODAL / MENSAJE
========================= */
#sponsorOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.sponsor-modal {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  position: relative;
}

.modal-logo {
  max-width: 120px;
  max-height: 80px;
  object-fit: contain;
  margin-bottom: 15px;
}

.cerrar-modal {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 480px) {
  .sponsor-card[open] .sponsor-info {
    padding: 25px 20px;
  }
}
