:root {
    --color1: rgb(219, 144, 0);
    --color2: rgba(23, 180, 83, 0.877);
    --color3: rgba(11, 194, 211, 0.623);
    --fondo: #f2f2f2;
    --titulos: 33px;
    --margenes: 60px;
    --espacios: 10px;
    --espacios-contenido: 45px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'open sans';
    background: var(--fondo);
}

img {
    vertical-align: top;
}

a:link,
a:visited,
a:active {
    text-decoration: none;

}

.ligas {
    list-style: none;
    display: flex;
}

/* --------------------------------Preloader-------------------------------- */
.hidden {
    overflow: hidden;
}

.centrado {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lds-facebook {
    display: inline-block;
    position: relative;
    width: 64px;
    height: 64px;
}

.lds-facebook div {
    display: inline-block;
    position: absolute;
    left: 6px;
    width: 13px;
    background: #cef;
    animation: lds-facebook 1.2s cubic-bezier(0, 0.5, 0.5, 1) infinite;
}

.lds-facebook div:nth-child(1) {
    left: 6px;
    animation-delay: -0.24s;
}

.lds-facebook div:nth-child(2) {
    left: 26px;
    animation-delay: -0.12s;
}

.lds-facebook div:nth-child(3) {
    left: 45px;
    animation-delay: 0;
}

@keyframes lds-facebook {
    0% {
        top: 6px;
        height: 51px;
    }

    50%,
    100% {
        top: 19px;
        height: 26px;
    }
}

/* -------------------------------- Header -------------------------------- */

header {
    width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom,
            rgba(0, 75, 135, .6),
            rgba(173, 21, 25, .6),
            rgba(250, 189, 0, .45)), url("../img/backgroundce25.png");
    background-attachment: fixed;
    background-position: center;
    background-size: cover;

}

nav {
    width: 100%;
    position: fixed;
    top: 0;
    /* Asegurar que el nav esté siempre en la parte superior */
    left: 0;
    z-index: 1000;
    /* Asegurar que el nav esté por encima de todo */
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, .5);
    list-style: none;

}

.nav1 {
    background: transparent;
    height: 80px;
    color: #fff;
}

.nav2 {
    background: var(--fondo);
    height: 100px;
    color: #000;
}

.nav1,
.nav2 {
    transition: background 0.5s, height 0.5s;
    /* Transición suave para cambios de estado */
}

.contenedor-nav {
    display: flex;
    margin: auto;
    width: 90%;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    height: inherit;
    overflow: hidden;

}

nav .enlaces a {
    display: inline-block;
    padding: 5px 0;
    margin-right: 12px;
    font-size: 17px;
    font-weight: 300;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    color: inherit;
    list-style: none;
}

nav .enlaces a:hover {
    border-bottom: 3px solid #1498a4;
    transition: 0.6s;
}

.logo,
.logo img {
    height: 75px;
    padding-top: 5px;
    padding-bottom: 5px;
}

/* Estilos para el menú desplegable */
.menu-desplegable {
    position: relative;
}

.menu-desplegable .submenu {
    display: none;
    position: absolute;
    top: 100%;
    /* Adjust this value if needed */
    left: 0;
    background: #34495e;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1002;
}

.contenedor-nav {
    overflow: visible;
    /* Ensure dropdown is not cut off */
}


.menu-desplegable:hover .submenu {
    display: block;
}

.menu-desplegable .submenu li {
    padding: 10px;
    border-bottom: 1px solid #2c3e50;
}

.menu-desplegable .submenu li:last-child {
    border-bottom: none;
}

.menu-desplegable .submenu a {
    color: #fff;
    text-decoration: none;
    display: block;
}

.menu-desplegable .submenu a:hover {
    background: #1abc9c;
}

/* Estilos para el ícono de flecha */
.menu-desplegable .fa-chevron-down {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.menu-desplegable:hover .fa-chevron-down {
    transform: rotate(180deg);
}

.icono {
    display: none;
    font-size: 30px;
    padding: 20px;
    color: #fff;
    cursor: pointer;
    position: relative;
    /* Asegurar que el ícono esté correctamente posicionado */
    z-index: 1001;
    /* Asegurar que esté por encima del nav */
}

.textos {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    color: #fff;
    overflow: hidden;
    text-align: center;
}

.textos>h1 {
    font-size: 50px;
}

.textos>h2 {
    font-size: 30px;
    font-weight: 300;
    border-bottom: 1px solid var(--color1);
}

.textos>h3 {
    font-size: 20px;
}



/* ---------------------------------------- Main ---------------------------------------- */

.contenedor {
    margin: auto;
    padding: var(--margenes) 0;
    width: 90%;
    max-width: 1000px;
    text-align: center;
    overflow: hidden;
}

.contenedor h3 {
    font-size: var(--titulos);
    color: var(--color1);
    margin-bottom: var(--espacios);
}

.contenedor p {
    font-size: var(--subtitulos);
    font-weight: 300;
    color: var(--color1);
}

.after::after {
    content: '';
    display: block;
    margin: auto;
    margin-top: var(--espacios);
    width: 100px;
    height: 2px;
    background: var(--color1);
    margin-bottom: var(--espacios-contenido);

}

.parrafo {
    margin-bottom: 13px;
    font-weight: 300;
    text-align: justify;
    line-height: 24px;
    color: rgb(24, 16, 16);
}

.card {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.content-card {
    width: 31%;
    box-shadow: 0 0 6px 0 rgba(0, 0, 0, .5);
    overflow: hidden;
    height: 400px;
}

.people {
    height: 80%;
}

.content-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.texto-team {
    height: 20%;
    width: 100%;
    padding: var(--espacios) 0;
}

.about {
    background: url("../img/bgintermedio.jpg");
    height: auto;
}

.servicios {
    display: flex;
    color: #fff;
    justify-content: space-between;
    margin: auto;
    flex-wrap: wrap;
}

.caja-servicios {
    width: 30%;
    text-align: center;
}

.caja-servicios>h4 {
    margin-bottom: var(--espacios);
}

.caja-servicios>p {
    text-align: center;

}

.galeria-work {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.cont-work {
    width: 31%;
    box-shadow: 0 0 6px 0 rgba(0, 0, 0, .5);
    height: 300px;
    overflow: hidden;
    margin-bottom: var(--espacios-contenido);
}

.img-work {
    height: 90%;
    width: 100%;
}

.img-work img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.textos-work {
    height: 10%;
}

.textos-work h4 {
    line-height: 30px;
    font-weight: 300;
}

/* Footer */

footer {
    background: url("../img/bgintermedio.jpg");
    padding: 20px 0;
}

.content {
    max-width: 1200px;
    /* Limitar el ancho del contenido del footer */
    margin: 0 auto;
    /* Centrar el contenido */
    padding: 0 20px;
    /* Añadir un padding lateral para evitar que el contenido toque los bordes */
}

.contact-wrapper {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    /* Permitir que los elementos se apilen en móvil */
}

.contact-form {
    flex: 1 1 60%;
    /* El formulario ocupará el 60% del espacio disponible */
    margin-right: 20px;
    /* Espacio entre el formulario y el contact-info */
}

.contact-info {
    flex: 1 1 35%;
    /* El contact-info ocupará el 35% del espacio disponible */
}

.marca-logo {
    width: 40%;
    margin: auto;
    margin-bottom: var(--espacios);
}

.marca-logo img {
    width: 100%;
}

.iconos {
    display: flex;
    margin: auto;
    justify-content: space-around;
    width: 100%;
}

.fab {
    color: inherit;
    margin-bottom: var(--espacios);
    display: inline-block;
}

footer p {
    margin-top: var(--espacios);
}

@media screen and (max-width: 768px) {
    .nav2 {
        color: #fff;
    }

    .menu-desplegable .submenu {
        display: none;
        /* Ocultar por defecto */
        position: static;
        background: #2c3e50;
        box-shadow: none;
        width: 100%;
        /* Asegurar que ocupe todo el ancho */
    }

    .menu-desplegable:hover .submenu {
        display: none;
    }

    .menu-desplegable.active .submenu {
        display: block;
    }

    .submenu a {
        display: block;
        /* Asegurar que los enlaces sean clickeables */
        padding: 10px 20px;
        /* Espaciado para mejor usabilidad */
        color: #fff;
        /* Color del texto */
        text-decoration: none;
        /* Quitar subrayado */
    }

    .submenu a:hover {
        background: #1abc9c;
        /* Cambiar color al hacer hover */
    }

    .icono {
        display: block;
        /*font-size: 30px; // Aumentar el tamaño del ícono 
        padding: 20px;  // Ajustar el padding para que el ícono sea más visible 
        color: #fff;  // Asegurar que el ícono sea blanco 
        cursor: pointer;*/
    }

    .enlaces {
        position: fixed;
        top: 80px;
        background: #2c3e50;
        left: 0;
        height: auto;
        /* Ajustar la altura automáticamente */
        max-height: 300px;
        /* Limitar la altura máxima para mostrar más enlaces */
        transition: width 0.5s;
        /* Transición suave */
        width: 0;
        overflow-y: auto;
        /* Permitir desplazamiento vertical */
        z-index: 1000;
    }


    .ligas li a span {
        display: none;
        border-right: none;
        /* Eliminar el borde derecho en móvil */
        padding-left: 0;
        padding-right: 0;

    }

    .ligas li {
        margin-bottom: 10px;
        /* Añadir margen inferior para separar los elementos */
    }

    .ligas li:last-child {
        margin-bottom: 0;
        /* Eliminar el margen inferior del último elemento */
    }

    .enlaces a {
        display: block;
        width: 100%;
        padding: 15px 20px;
        /* Aumentar el padding para mejor espaciado */
        text-align: left;
        /* Alinear el texto a la izquierda */
        background: #34495e;
        color: #fff;
        border-bottom: 1px solid #2c3e50;
        /* Añadir separación entre elementos */
        font-size: 16px;
        /* Ajustar el tamaño de la fuente */
    }

    .enlaces a:hover {
        background: #1abc9c;
        /* Cambiar el color al hacer hover */
    }

    .enlaces ul {
        display: flex;
        flex-direction: column;
        /* Asegurar que los elementos se muestren en vertical */
        padding: 10px 0;
        margin: 0;
        list-style: none;
    }

    .enlaces ul li {
        width: 100%;
    }

    .enlaces ul li a {
        display: block;
        width: 100%;
        padding: 15px 20px;
        text-align: left;
        background: #34495e;
        color: #fff;
        border-bottom: 1px solid #2c3e50;
        font-size: 16px;
        text-decoration: none;
    }

    .enlaces ul li a:hover {
        background: #1abc9c;
    }
}



.textos>h1 {
    font-size: 40px;
}

.textos>h2 {
    font-size: 25px;
}

.textos>h3 {
    font-size: 18px;
}

.content-card {
    width: 48%;
    margin-bottom: var(--margenes);
}

#container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
}

:root {
    --margenes: 30px;
}

.contact-form {
    flex: 1 1 100%;
    /* En móvil, el formulario ocupará el 100% del ancho */
    margin-right: 0;
    /* Eliminar el margen derecho en móvil */
    margin-bottom: 20px;
    /* Espacio entre el formulario y el contact-info */
}

.contact-info {
    flex: 1 1 100%;
    /* En móvil, el contact-info ocupará el 100% del ancho */
}


@media screen and (max-width: 500px) {
    :root {
        --espacios-contenido: 25px;
    }

    .textos>h1 {
        font-size: 30px;
        /* Ajustar aún más para pantallas muy pequeñas */
    }

    .textos>h2 {
        font-size: 20px;
    }

    .textos>h3 {
        font-size: 16px;
    }

    .content-card {
        width: 90%;
    }

    .caja-servicios {
        width: 90%;
        margin-bottom: var(--margenes);
    }

    .cont-work {
        width: 85%;
    }

    .marca-logo {
        width: 80%;
    }

    .iconos {
        margin: auto;
    }
}