/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
}

:root {
    --celeste: #00AFF0;
    --azul: #003882;
    --bluedemon: #01285a;

    --rojo: #EC3237;
    --amarillo: #ff9900;
}

/* Barra de navegación */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bluedemon);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: top 0.3s ease;
}

.logo img {
    width: 200px;
    border-radius: 7px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--amarillo);
    cursor: pointer;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger div {
    width: 30px;
    height: 3px;
    background-color: white;
}

/* HEADER */
.header {
    position: relative;
    width: 100%;
    height: 300px;
    /* Ajusta la altura según lo que necesites */
    background-image: url('../images/fondo2.jpg');
    background-size: cover;
    /* Hace que la imagen cubra todo el fondo */
    background-position: center;
    /* Centra la imagen en el header */
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 5rem;
    /* Color del texto, puedes ajustarlo */
}

.hServ {
    height: 150px;
    background-image: url('../images/carreteralinea4.jpg');
    background-size: cover;
    background-position: center;
    scroll-margin-top: 5rem;
}

.hServX {
    background-image: url('../images/Servicios1.jpg');
    margin-top: 0;
    scroll-margin-top: 5rem;
}

.header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*background-color: rgba(0, 30, 60, 0.8);*/
    /* Ajusta la opacidad para oscurecer */
    z-index: 1;
    /* Lo coloca detrás del texto */
}

.hServ::before {
    /* background-color: rgba(10, 25, 47, 0.6);*/
    background-color: rgba(30, 60, 100, 0.9);
}

.header-text {
    z-index: 2;
    /* Asegura que el texto esté por encima de la imagen */
}

.header h1 {
    font-size: 2.5rem;
    /* Ajusta el tamaño del título */
    margin: 0;
}

.header p {
    font-size: 1.5rem;
    /* Ajusta el tamaño del texto */
    margin: 10px 0 0;
}


/* Cinta de datos */
.cinta {
    background-color: #444;
    display: flex;
    justify-content: center;
    padding: 20px;
    color: white;
    font-size: 1.2rem;
}

.cinta-item {
    margin: 0 30px;
    text-align: center;
}

.number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

/* Cinta de datos */
.cinta {
    display: flex;
    justify-content: center;
    padding: 20px;
    color: white;
    font-size: 1.2rem;
    background-position: center;
    background-color: #444;
}

.cinta-item {
    margin: 0 30px;
    text-align: center;
}

.number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

/* Estilos del carrete de imágenes */
.image-slider {
    margin: 30px 0;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-size: cover;
    /* Asegura que solo se vea una imagen a la vez */
}

.slider-container {
    display: flex;
    justify-content: center;
    position: relative;
}

.slider {
    display: flex;
    transition: transform 0.5s ease;
}

.slider img {
    max-width: 400px;
    max-height: 250px;
    /* Ajusta la imagen al ancho del contenedor */
    max-width: 600px;
    /* Ajusta un máximo de tamaño */
    margin: 0;
    border-radius: 10px;
    cursor: pointer;
    /* Cambia el cursor para indicar que es clickeable */
}

/* Estilos para el modal */
.modal {
    display: none;
    /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    /* Asegura que el modal esté por encima del contenido */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    /* Fondo oscuro */
    justify-content: center;
    align-items: center;
}

.modal-content {
    max-width: 90%;
    /* El modal puede ser grande, pero no más que el 90% del ancho de la pantalla */
    max-height: 90%;
    /* Limitar la altura también */
    margin: auto;
    display: block;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

/* Botones de navegación */
button {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    z-index: 10;
}

.prev {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    /* Fondo semi-transparente */
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px 20px;
    /* Hacerlo rectangular */
    border-radius: 25px;
    /* Bordes redondeados */
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* Transición suave */
}

/* Efecto hover */
.prev:hover {
    background-color: rgba(0, 0, 0, 0.7);
    /* Fondo más oscuro al pasar el mouse */
}

.next {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    /* Fondo semi-transparente */
    color: white;
    border: none;
    font-size: 2rem;
    padding: 10px 20px;
    /* Hacerlo rectangular */
    border-radius: 25px;
    /* Bordes redondeados */
    cursor: pointer;
    transition: background-color 0.3s ease;
    /* Transición suave */
}

/* Efecto hover */
.next:hover {
    background-color: rgba(0, 0, 0, 0.7);
    /* Fondo más oscuro al pasar el mouse */
}

/* Estilos pie de página */
.footer {
    background-color: var(--bluedemon);
    color: white;
    text-align: center;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-infoX {
    margin-top: 1.5rem;
    grid-column: 1 / span 2;
}

.contact-info a {
    color: inherit;
    text-decoration: none;
}

.whatsapp-btn {
    background-color: #25d366;
    padding: 10px 20px;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.whatsapp-btn:hover {
    background-color: #128c7e;
}


/* Media Queries */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Ocultamos el menú por defecto */
        width: 100%;
        text-align: center;
        position: absolute;
        top: 60px;
        /* Justo debajo del header */
        left: 0;
        background-color: var(--bluedemon);
        padding: 20px 0;
        z-index: 1000;
        flex-direction: column;
        /* Hacemos los enlaces verticales */
    }

    .nav-links.active {
        display: flex;
        margin-top: 1.5rem;
        /* Cuando está activo, mostramos el menú */
    }

    .hamburger {
        display: flex;
        /* Mostramos el botón hamburguesa */
    }

    /* Hacemos que los enlaces tengan un margen para separarlos un poco */
    .nav-links a {
        padding: 10px;
        font-size: 22px;
    }

    .header {
        flex-direction: column;
    }

    .header {
        height: 200px;
        /*Reducir la altura en dispositivos móviles */
        background-size: cover;
        /* Mantener la imagen cubriendo todo */
    }

    .hServ {
        height: 155px;
    }

    .header h1 {
        font-size: 2rem;
        /* Reducir el tamaño del título */
    }

    .header p {
        font-size: 1rem;
        /* Reducir el tamaño del texto */
    }

    .logo img {
        width: 150px;
    }

    .cinta {
        /*flex-direction: column;*/
        gap: 1.5rem;
        text-align: center;
    }

    .cinta-item {
        margin: 10px 0;
    }

    .slider img {
        max-width: 100%;
    }

    .whatsapp-btn {
        width: 100%;
    }

    .footer {
        grid-template-columns: 1fr;
    }

    .contact-infoX {
        grid-column: 1 / span 1;
    }
}

/* Estilo para la sección "Quiénes Somos" */
.about-us {
    /*padding: 50px 20px;*/
    text-align: center;
}

/* Estilo para cada bloque de texto + imagen */
.about-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /*margin-bottom: 5px;*/
    flex-wrap: wrap;
    height: 400px;
    /* Altura fija para las dos mitades */
}

.galeria {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    flex-wrap: wrap; /* permite que bajen si no caben */
  }

  .imagen-contenedor {
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .imagen-contenedor img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

/* La mitad con el texto y fondo con imagen oscurecida */
.about-text {
    position: relative;
    width: 50%;
    padding: 20px;
    background-image: url('../images/fondosomos.png');
    /* Imagen de fondo */
    background-size: cover;
    background-position: center;
    color: #333;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    /* Centra el texto verticalmente */
}

.mision {
    width: 33.33%;
    background-image: url('../images/mision1.jpg');
    color: white;
}

.vision {
    width: 33.33%;
    background-image: url('../images/vision1.jpg');
}

.valores {
    width: 33.33%;
    background-image: url('../images/valores1.jpg');
    color: white;
}

.bloque {
    color: white;
    background-image: none;
}

.bloqueinvert {
    color: white;
    background-image: none;
}

/* Capa oscurecida sobre la imagen de fondo */
.about-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(240, 240, 240, 0.9);
    /* Oscurecimiento */
    z-index: -1;
    /* Coloca la capa oscura detrás del contenido */
}

.mision::before {
    /*background-color: rgba(220, 53, 69, 0.9);*/
    background-color: rgba(200, 0, 0, 0.9);

}

.vision::before {
    background-color: rgba(240, 240, 240, 0.9);
}

.valores::before {
    /*background-color: rgba(0, 123, 255, 0.9);*/
    background-color: rgba(10, 25, 47, 0.9);

}

.bloque::before {
    background-color: rgba(200, 0, 0, 0.9);
}

.bloqueinvert::before {
    background-color: rgba(10, 25, 47, 0.9);
}

/* Título del texto */
.about-text h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    /*text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);*/
    /* Da un efecto de sombra al título */
}

/* Párrafo del texto */
.about-text p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/*.vision p {
    font-size: 1rem;
    line-height: 1;
}*/

.valores p {
    font-size: 1rem;
    line-height: 1;
}

/* La mitad con la imagen */
.about-image {
    width: 50%;
    height: 100%;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Hace que la imagen cubra completamente el contenedor */
    border-radius: 8px;
}

.noborder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0px;
}

.noborderX img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0px;
}

/* Bloques alternados: imagen a la izquierda y texto a la derecha */
.reversed {
    flex-direction: row-reverse;
}

/* Estilo de la sección de afiliaciones */
.affiliations {
    /*background-color: #f4f4f4;*/
    padding: 20px 10px;
    text-align: center;
}

.affiliations-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.affiliation img {
    width: auto;
    max-width: 266px;
    height: auto;
    margin-bottom: 20px;
}

.affiliationX img {
    width: auto;
    max-width: 190px;
    height: auto;
    margin-bottom: 20px;
}

.affiliations-text p {
    font-size: 1.6rem;
    color: var(--bluedemon);
    /*max-width: 800px;*/
    margin: 10px auto;
}

/* Estilos para móvil */
@media (max-width: 768px) {

    /* En pantallas pequeñas, cambia la disposición a columna */
    .about-item {
        flex-direction: column;
        height: auto;
        /* Ajusta la altura cuando es en columna */
    }

    /* La imagen ocupa todo el espacio en dispositivos móviles */
    .about-text,
    .about-image {
        width: 100%;
    }

    .about-text h2 {
        font-size: 2rem;
        /* Reduce el tamaño del título */
    }

    .about-text p {
        font-size: 1rem;
        /* Reduce el tamaño del texto */
    }

    .about-item.reversed {
        flex-direction: column;
        /* Reversa la dirección para los bloques "reversed" */
    }

    .affiliations-container {
        justify-content: center;
        gap: 15px;
    }

    /*  .affiliation img {
        width: 80px;
        /* Reducimos el tamaño de los logos en pantallas pequeñas 
    }*/

    .affiliations-text p {
        font-size: 1.3rem;
    }
}

form {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    margin: auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}


label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
}

input,
textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
}

fieldset {
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

legend {
    font-weight: bold;
    padding: 0 10px;
}

.boton {
    width: 100%;
    background-color: #e53935;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.boton:hover {
    background-color: #c62828;
}

@media (max-width: 600px) {
    form {
        padding: 15px;
    }

    input,
    textarea {
        font-size: 14px;
    }

    .boton {
        font-size: 14px;
        padding: 10px;
    }
}

.cinta-monitoreo {
    /*background-color: #005f73;*/
    /* Color afín (puedes cambiarlo) */
    background-color: var(--celeste);
    color: #fff;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-family: Arial, sans-serif;
    font-size: 2rem;
}

.cinta-monitoreo img {
    /*height: 24px;*/
    width: 12rem;
}

@media (max-width: 768px) {

    .cinta-monitoreo img {
        /*height: 24px;*/
        width: 10rem;
        gap: 1rem;
    }

    .cinta-monitoreo {
        font-size: 1.5rem;
    }
}

/* Estilos básicos para el dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1e3a5f;
    min-width: 160px;
    z-index: 1;
    border-radius: 4px;
}

.dropdown-content a {
    color: white;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #2a4c78;
}

.dropdown:hover .dropdown-content {
    display: block;
}

@media (max-width: 768px) {
    .dropdown-content {
        position: static;
        /* Quita el posicionamiento absoluto */
        transform: none;
        width: 100%;
        border-radius: 0;
        background-color: transparent;
    }

    .dropdown-content a {
        background-color: #1e3a5f;
        border-bottom: 1px solid #2a4c78;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }
}