/* Modal Styles */
.modal {
  display: none; /* Oculto por defecto */
  position: fixed; /* Permanece en su lugar incluso al desplazarse */
  z-index: 1001; /* Z-index alto para estar por encima de todo */
  left: 0;
  top: 0;
  width: 100%; /* Ancho completo */
  height: 100%; /* Altura completa */
  overflow: auto; /* Habilitar desplazamiento si el contenido es demasiado grande */
  background-color: rgba(0, 0, 0, 0.7); /* Fondo semi-transparente */
  /* Removemos 'display: flex' de aquí para que 'display: none' tenga efecto */
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fefefe;
  margin: 15vh 0 10vh 0;
  padding: 0 0 10vh 0;
  border-radius: 10px;
  width: 700px; /* Ancho máximo para pantallas grandes */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  position: relative;
  text-align: center;
  display: flex; /* Aseguramos flex aquí para el contenido interno */
  flex-direction: column;
  gap: 20px;
}

.Punto {
  width: 35px;
  position: absolute;
  top: 200px;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 1003;
}


.close-button {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  z-index: 1002;
}

.close-button:hover,
.close-button:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.modal-content h2 {
  color: rgb(142, 75, 230);
  font-size: 32px;
  margin-bottom: 20px;
}

.modal-content p{
  width: auto;
  font-size: 3vh;
  padding-bottom: 1vh;
}

.map-container {
  width: 700px;
  height: 400px; /* Altura del contenedor del mapa */
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden; /* Oculta el contenido que se sale del contenedor */
  position: relative; /* Esencial para posicionar la imagen y la flecha */
  cursor: zoom-in; /* Cambiamos el cursor para indicar zoom */
}

.map-container img#customMap {
   object-fit: cover;
  width: 100%; /* Ajusta el ancho inicial de la imagen al 100% del contenedor */
  height: 100%; /* Mantiene la proporción */
  display: block;
  object-fit: cover;
  transform-origin: 0 0; /* Punto de origen para las transformaciones */
  transition: transform 0.05s ease-out; /* Suaviza las transiciones de zoom */
  position: absolute; /* Permite escalarla libremente */
  top: 0;
  left: 0;
}

.map-container img#locationArrow {
  position: absolute;
  width: 40px; /* Tamaño de la flecha */
  height: auto;
  z-index: 2; /* Para que esté por encima del mapa */
}

.modal-contact-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10vh;
}

.modal-contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 2vh;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
  color: white;
  width: 220px;
}

.whatsapp-btn {
  background-color: #932be9;
}

.whatsapp-btn:hover {
  background-color: #8552af;
  transform: translateY(-2px);
}

.email-btn {
  background-color: #932be9; /* Un color para el email */
}

.email-btn:hover {
  background-color: #8552af;
  transform: translateY(-2px);
}

.modal-contact-btn img {
  width: 25px;
  height: 25px;
  margin-right: 10px;
  filter:brightness(1000); /* Para que los iconos blancos se vean bien en el fondo de color */
}

/* Responsive para el modal */


.whatsapp-button {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background-color: #25d366;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
}
.whatsapp-button:hover {
  transform: scale(1.1);
}
.whatsapp-button img {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1); /* para que el logo quede blanco */
}

.logos-certificaciones3{
  display: none;
}

@media (max-width: 768px) {
  nav img{
    height: 12vh;
    margin-top: -3vh;
  }

  .logos-certificaciones{
    margin-left: -3vh;
    width: 90%;
  }

  .logos-certificaciones2 {
    display: none;
  }



  .logos-certificaciones3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    padding: 30px;
    justify-items: center;
    align-items: center;
    border-radius: 12px;
    margin-left: -10vh;
    max-width: 400px;
  }

  .logos-certificaciones3 .certificado {
    background: linear-gradient(to right, #342e4d, #1d223b);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: scale(0.65); /* 60% más chico */
    transform-origin: center;
  }

  .logos-certificaciones3 .certificado img {
    max-width: 100%;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
  }

  .logos-certificaciones3 .certificado img:hover {
    filter: none;
  }

  .Endless .btn{
    margin-top: 8vh;
    margin-bottom: 10vh;
  }
}

@media (max-width: 768px) {
  .modal-content {
    width: 90%;
    margin: 10vh auto;
    gap: 15px;
  }

  .Punto {
    width: 25px;
    top: 128px;
  }

  .map-container {
    width: 100%;
    height: 250px;
  }

  .modal-content p {
    font-size: 2.2vh;
    margin: 0 10px;
  }

  .modal-contact-info {
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
    margin-left: 5vh;
    margin-right: 5vh;
  }

  .modal-contact-btn {
    width: 100%;
    max-width: 350px;
    font-size: 2vh;
    padding: 12px 16px;
  }

  .modal-contact-btn img {
    width: 22px;
    height: 22px;
    margin-right: 8px;
  }
}