/* Modal Base */
.modal-saber-mas {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 1;
  transition: all 0.3s ease-in-out;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
}

.modal-saber-mas.show {
  opacity: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenido del Modal */
.modal-saber-mas-content {
  background: #ffffff;
  margin: 20px auto;
  padding: 40px;
  max-width: 800px;
  width: 90%;
  position: relative;
  border-radius: 15px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  color: #333;
  font-family: 'Golos Text', sans-serif;
  line-height: 1.6;
  opacity: 1;
  transform: none;
  transition: all 0.3s ease;
  overflow: auto;
  max-height: 90vh;
}

.modal-saber-mas.show .modal-saber-mas-content {
  transform: scale(1);
}

/* Botón de cierre */
.close-saber-mas {
  position: absolute;
  right: 20px;
  top: 15px;
  color: #666;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0f0f0;
  border: none;
  z-index: 10001;
}

.close-saber-mas:hover,
.close-saber-mas:focus {
  color: #000;
  background: #e0e0e0;
  transform: rotate(90deg);
  text-decoration: none;
}

/* Títulos y texto */
.modal-saber-mas h2 {
  color: #2c3e50;
  margin: 0 0 25px 0;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
}

.modal-saber-mas h2:after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 2px;
}

.modal-saber-mas p {
  color: #444;
  line-height: 1.7;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 400;
  text-shadow: 1px 1px 1px rgba(255,255,255,0.8);
}

/* Grid de contenido */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
  margin: 30px 0;
}

.modal-grid-item {
  background: rgba(255, 255, 255, 0.8);
  padding: 25px;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #333;
}

/* Estilos para los títulos de las tarjetas */
.modal-grid-item h3 {
  color: #2c3e50;
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Estilos para los iconos */
.modal-grid-item h3 i {
  color: #3498db;
  font-size: 1.6rem;
}

/* Estilos para el texto de las tarjetas */
.modal-grid-item p {
  color: #444;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.modal-grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.modal-grid-item h3 {
  color: #2c3e50;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
}

.modal-grid-item h3 i {
  margin-right: 10px;
  color: #3498db;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-saber-mas-content {
    padding: 30px 20px;
    width: 95%;
  }
  
  .modal-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-saber-mas h2 {
    font-size: 1.8rem;
  }
  
  .close-saber-mas {
    right: 20px;
    top: 15px;
    width: 35px;
    height: 35px;
    font-size: 28px;
  }
}

/* Animación de entrada */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-saber-mas-content {
  animation: modalFadeIn 0.4s ease-out forwards;
}
