/* Modales */
.info-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  overflow-y: auto;
}

.modal-content {
  background-color: white;
  width: 90%;
  max-width: 700px;
  margin: 10% auto;
  padding: 2rem;
  border-radius: var(--border-radius);
  position: relative;
  animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  color: #aaa;
  cursor: pointer;
  transition: var(--transition);
}

.close-modal:hover {
  color: var(--dark-color);
}

.modal-content h2 {
  margin-bottom: 1.5rem;
  color: var(--dark-color);
  text-align: center;
}

/* Modal de servicios */
.services-modal {
  width: 80vw; /* 80% del ancho de la ventana */
  height: 80vh; /* 80% del alto de la ventana */
  max-width: none; /* Eliminamos el máximo width */
  max-height: none; /* Eliminamos el máximo height */
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.4s ease;
}

.modal-services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Cambiado a 3 columnas fijas */
  gap: 25px;
  margin-top: 20px;
}

.modal-service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.modal-service-card:hover {
  transform: translateY(-5px);
}

.modal-service-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0; /* Evita que la imagen se reduzca */
}

.modal-service-content {
  padding: 20px;
  flex-grow: 1; /* Hace que el contenido ocupe el espacio restante */
  display: flex;
  flex-direction: column;
}

.modal-service-content h3 {
  margin: 0 0 10px;
  color: var(--text-dark);
}

.modal-service-content p {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-service-link {
  display: inline-block;
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.9rem;
}

.modal-service-link i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}

.modal-service-link:hover i {
  transform: translateX(3px);
}

/* Estilos generales del modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  backdrop-filter: blur(5px);
}

.modal-container {
  background: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Contenedor estilo folleto */
.modal-container.brochure-style {
  background: #fff;
  border-radius: 4px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  position: relative;
  padding: 2rem;
  border-top: 4px solid #1e9bb1;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

/* Encabezado del folleto */
.brochure-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.brochure-title {
  color: #1e9bb1;
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Divisores estilizados */
.brochure-divider {
  height: 1px;
  margin: 0.5rem 0;
}

.brochure-item {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: flex-start;
  padding-left: 1rem;
  text-indent: -1rem;
}

.item-number {
  font-weight: bold;
  color: #1e9bb1;
  margin-right: 1rem;
}

.brochure-paragraph {
  margin-bottom: 1.2rem;
  text-align: justify;
}

/* Pie del folleto */
.brochure-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.service-name {
  font-style: italic;
  color: #666;
  font-size: 0.9rem;
  margin: 0.5rem 0 0 0;
}
