body {
    overflow-x: hidden; /* Evita el scroll horizontal */
    
}

/*para poner la imagen de servicios*/
.hero { 
  position: relative;
  width: 100%;
  height: 480px; /* Imagen un poco más alta */
  overflow: hidden;
}

.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* Imagen más grande para mejor recorte */
  object-fit: cover;
  object-position: center 30%; /* Baja el enfoque */
  z-index: 1;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.hero-content {
  position: absolute;
  bottom: 40px; /* Más arriba */
  left: 10%; /* Mueve el texto hacia la derecha */
  z-index: 3;
  text-align: left;
  color: white;
  transform: none;
}

.hero-content h1 {
  font-size: 4vw;
  margin: 0;
  color: white;
  text-shadow:
    3px 3px 10px rgba(0, 0, 0, 0.9),
    0px 0px 4px rgba(0, 0, 0, 0.7);
}

.hero-content .subtext {
  font-size: 1vw;
  margin-top: 0.5rem;
  font-weight: 400;
  color: #f1f1f1;
}

/* -------- Pantallas medianas -------- */
@media (max-width: 990px) {
  .hero {
    height: 350px;
  }

  .hero img {
    height: 130%; /* Para que siga cubriendo bien */
    object-position: center 40%; /* Baja más el enfoque */
  }

  .hero-content {
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-30%, -10%); /* Un poco más hacia la derecha */
    text-align: center;
  }

  .hero-content h1 {
    font-size: 8vw;
  }

  .hero-content .subtext {
    font-size: 2vw;
  }
}

/* -------- Pantallas pequeñas -------- */
@media (max-width: 480px) {
  .hero {
    height: 220px;
  }

  .hero img {
    height: 140%;
    object-position: center 45%;
  }

  .hero-content {
    top: 50%;
    left: 50%;
    transform: translate(-20%, -50%);
    text-align: center;
  }

  .hero-content h1 {
    font-size: 8.5vw;
    padding: 0.4rem 0;
  }

  .hero-content .subtext {
    font-size: 3.5vw;
  }
}


.nosotros-container {
    display: flex;
    align-items: flex-start;
    justify-content: center; /* Centra horizontalmente los hijos */
    padding: 8rem 2rem;
    flex-wrap: wrap;
    gap: 3rem;
    max-width: 1200px; /* Ancho máximo del contenedor */
    margin: 0 auto; /* Centrar el contenedor */
}

.nosotros-img {
    flex: 1 1 300px;
    padding: 1rem;
    text-align: center;
}

.nosotros-img img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-top: 55px; /* Ajusta este valor según necesites */
}

.nosotros-texto {
    flex: 2 1 400px;
    padding: 1rem;
    max-width: 800px;
}

.nosotros-texto h2 {
    color: #004d66;
    margin-bottom: 1rem;
    text-align: center;
}

.nosotros-texto p {
    color: #333;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: justify;
}

.etiquetas {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    border-top: 1px solid #ccc;
    padding-top: 1rem;
    font-size: 0.95rem;
}

.etiqueta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #00796b;
    font-weight: bold;
}

.etiqueta-item img {
    width: 24px;
    height: 24px;
}

@media screen and (max-width: 768px) {
    .nosotros-container {
        flex-direction: column;
        text-align: center;
    }

    .nosotros-texto {
        text-align: left;
    }

    .etiquetas {
        justify-content: center;
    }
}

/*Para los textos con su imagen de fondo*/

.unidades-content {
    padding: 40px 20px;
    text-align: center;
    background-color: #fff;
}

.unidades-content h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #004d66;
    position: relative;
    display: inline-block;
    text-align: center;
}

.unidades-content h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 4px;
    background-color: #EC9D2E;
    border-radius: 2px;
}


.cajas {
    position: relative;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 20px;
    border-radius: 12px;
    overflow: hidden;
}

/* Imagen de fondo como elemento HTML */
.fondo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.7; /* nivel de transparencia del fondo */
}

/* Cuadros con fondo translúcido encima de la imagen */
.caja {
    position: relative;
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.60); /* transparencia para ver el fondo */
    color: white;
    padding: 20px;
    width: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    margin: 15px;
}

.caja h3 {
    font-size: 22px;
    margin-bottom: 10px;
}

.caja p {
    font-size: 14px;
    margin: 0;
}

.caja:hover {
    transform: scale(1.03);
}


/*Para la mision y vision de la empresa */
.vision-mision {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 40px 20px;
    background-color: #fff;
    flex-wrap: wrap;
}

.bloque {
    display: flex;
    align-items: flex-start;
    max-width: 500px;
    gap: 20px;
}

.icono {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 30px;
    transition: transform 0.3s ease; /* transición suave */
    cursor: pointer;
}

.icono:hover {
    transform: scale(1.2); /* crece un 20% */
}

.texto h3 {
    font-size: 20px;
    color: #00796b;
    margin-bottom: 10px;
}

.texto p {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Título */
h2 {
    font-size: 2em;
    color: #004d66;
    margin-bottom: 20px;
}


/* Contenedor de valores */
.valores {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    background-color: #fff;
}

/* Cada valor con animación */
.valor {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 140px;
    opacity: 0;
    transform: translateX(-40px); /* Comienza más a la izquierda */
    animation: fadeInLeft 0.6s ease forwards; /* Animación al cargar */
}

/* Imagen dentro del círculo */
.valor img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border: 4px solid #f3c847;
    border-radius: 50%;
    padding: 18px;
    margin-bottom: 10px;
    background-color: white;
    box-shadow: 0 0 10px rgba(243, 200, 71, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto al pasar el mouse */
.valor img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(243, 200, 71, 0.8);
}

/* Texto debajo */
.valor p {
    font-weight: bold;
    color: #003b4d;
    font-size: 15px;
}

/* Animación de izquierda a derecha */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Retrasos para que aparezcan uno tras otro */
.valor:nth-child(1) { animation-delay: 0s; }
.valor:nth-child(2) { animation-delay: 0.1s; }
.valor:nth-child(3) { animation-delay: 0.2s; }
.valor:nth-child(4) { animation-delay: 0.3s; }

/* Media query para pantallas pequeñas */
@media screen and (max-width: 600px) {
    .valores {
        flex-direction: column;
        align-items: center;
    }

    .valor {
        max-width: none;
        width: 100%;
        margin-bottom: 20px;
    }
}
