@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

body {
  width: 100vw;
  min-height: 100vh;          /* importante: no forzar altura fija */
  background-color: #eafdfc;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 70px 0 0 0;        /* espacio para el header fijo */
  overflow-x: hidden;         /* solo escondemos scroll horizontal */
}

/* === CARRUSEL === */
.carrusel {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 70%;
  height: 70vh;
  margin: 0 auto;
  position: relative; /* para que las flechas se posicionen dentro */
}

/* Flechas de navegación */
.carrusel .atras,
.carrusel .adelante {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.carrusel .atras {
  left: 15px;
}
.carrusel .adelante {
  right: 15px;
}

.carrusel .atras img,
.carrusel .adelante img {
  width: 24px;
  height: 24px;
  filter: invert(1); /* las hace blancas */
}

/* Imagen y texto */
.imagenes {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: end;
}

.img {
  box-shadow: 0px 4px 10px 0px rgba(112, 163, 3, 0.5);
  height: 400px;
  width: 100%;
  max-width: 700px;
  border-radius: 15px;
  margin: 5px;
  object-fit: cover;
  filter: saturate(175%);
}

.imagenes .texto {
  width: 80%;          /* ocupa el 80% del ancho disponible */
  max-width: 300px;    /* pero nunca más grande de 300px */
  height: auto;        /* que crezca según el contenido */
  min-height: 50px;    /* altura mínima para el estilo original */
  transition: 1s;
  padding: 10px;       /* para que el texto respire un poco */
  box-sizing: border-box;
}

.imagenes:hover .texto {
  transition: height 1s, transform 1s, background-color 1s;
  transform: translateY(-20%); /* en lugar de un valor fijo */
  height: auto;
  background-color: rgba(112, 163, 3, 0.5);
}

.imagenes:hover .texto p {
  transition: font-size 0s .2s linear;
  font-size: 18px;  /* un poco más chico para móvil */
  font-weight: 300;
  text-shadow: 0px 0px 10px #000000;
}
@media (max-width: 600px) {
  .imagenes .texto {
    width: 90%;
    max-width: 250px;
    min-height: 40px;
  }

  .texto h3 {
    font-size: 20px;
    padding-top: 20px;
  }

  .imagenes:hover .texto p {
    font-size: 16px;
  }
}


/* Puntos indicadores */
.puntos {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
}

.puntos p {
  font-size: 40px;
  font-weight: 500;
  margin: 0 5px;
  color: #999;
  cursor: pointer;
}

.puntos .bold {
  font-weight: 700;
  color: #5E17EB;
}

/* === MODAL === */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(112, 163, 3, 0.8);
}

.modal-content {
  position: relative;
  background-color: rgba(112, 163, 3, 0.1); /* verde semitransparente */;
  margin: 60px auto;
  padding: 20px;
  border-radius: 15px;
  max-width: 900px;
  box-shadow: 0 5px 15px rgba(112, 163, 3, 0.5);
}

/* Botón cerrar */
.modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
}
.modal .close:hover {
  color: red;
}
