/* ==========================================
   CARROUSEL DE AUSPICIANTES
   ========================================== */
.sponsors-section {
  background-color: var(--white);
  padding: 50px 0;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
}

.sponsors-title {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  margin-bottom: 25px;
}

.sponsors-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* Sombras suaves a los lados para disimular la entrada/salida de logos */
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.sponsors-track {
  display: flex;
  width: calc(200px * 10); /* Ajusta según la cantidad total de marcas duplicadas */
  animation: scrollSponsors 25s linear infinite;
}


.sponsor-slide {
  width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
}

.sponsor-slide img {
  max-width: 170px;
  max-height: 85px;
  object-fit: contain;
  /* Convierte los logos a una tonalidad uniforme que resalta al pasar el mouse */
  filter:none;/* grayscale(100%) opacity(0.6);*/
  transition: var(--transition);
}

.sponsor-slide img:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

/* Animación en bucle perfecto */
@keyframes scrollSponsors {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-200px * 5)); /* Desplaza la mitad del contenido */
  }
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  border: 2px solid var(--primary);
  box-shadow: 0 4px 14px rgba(15, 76, 129, 0.4);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(15, 76, 129, 0.5);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(4px);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}

/* ==========================================
   TARJETAS INSTITUCIONALES
   ========================================== */
.card {
  background: var(--white);
  padding: 35px 25px;
  border-radius: var(--radius);
  border-top: 4px solid var(--primary);
  box-shadow: var(--shadow-md);
  text-align: center;
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 2.6rem;
  color: var(--primary);
  margin-bottom: 20px;
  background: var(--primary-light);
  width: 70px;
  height: 70px;
  line-height: 70px;
  border-radius: 50%;
  display: inline-block;
}

.card h3 {
  color: var(--primary-dark);
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================
   OFERTA ACADÉMICA / CURSOS
   ========================================== */
.courses-section {
  background-color: var(--white);
  padding: 20px 0 80px;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.course-card {
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.course-header {
  background: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.course-body {
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-body h3 {
  margin-bottom: 12px;
  color: var(--primary-dark);
  font-size: 1.25rem;
  line-height: 1.3;
}

.course-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.btn-card {
  display: inline-block;
  text-align: center;
  background-color: var(--white);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-card:hover {
  background-color: var(--primary);
  color: var(--white);
}

/* ==========================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================== */
.whatsapp-float {
  position: fixed;
  width: 58px;
  height: 58px;
  bottom: 28px;
  right: 28px;
  background-color: var(--accent);
  color: var(--white);
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: var(--accent-hover);
  color: var(--white);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

/* ==========================================
   MODAL / VENTANA EMERGENTE PROMOCIONAL
   ========================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Clase que activa la visibilidad del modal */
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white, #ffffff);
  padding: 35px 30px;
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  border-top: 5px solid #0f4c81; /* O el color primario de la asociación */
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #000;
}

.modal-badge {
  display: inline-block;
  background-color: #e0f2fe;
  color: #0284c7;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.modal-content h2 {
  color: #1e293b;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.modal-content p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 15px;
}

.modal-details {
  background: #f8fafc;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: left;
}

.modal-details p {
  margin: 4px 0;
  font-size: 0.9rem;
  color: #334155;
}

.modal-details i {
  color: #0f4c81;
  margin-right: 6px;
}

.btn-modal {
  width: 100%;
  gap: 8px;
}

/* --- ESTILOS DEL BANNER EN EL MODAL --- */
.modal-banner {
  width: calc(100% + 40px); /* Extiende el contenedor de borde a borde */
  margin: -20px -20px 15px -20px; /* Anula el padding interno del modal */
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background-color: #0b132b; /* Fondo oscuro por si la imagen escala */
}

.modal-img {
  width: 100%;
  height: auto; /* Mantiene la proporción original completa */
  max-height: 380px; /* Da espacio vertical suficiente para ver el afiche entero */
  object-fit: contain; /* Asegura que la imagen NUNCA se recorte */
  display: block;
}




