.navbar {
    background: linear-gradient(180deg, #273952 0%, rgba(39, 57, 82, 0.28) 79.33%, rgba(10, 76, 168, 0.00) 93.41%);
    transition: background-color 0.3s ease;
    /* Transición suave */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding-bottom: 30px;
    z-index: 999;
}

.navbar.solid {
    background-color: #041E42;
}

.container-header {
    text-align: center;
    font-family: 'DM Sans', sans-serif;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 90px;
}

.logo-header {
    position: absolute;
    left: auto;
}

.logo {
    height: 70px;
}

.anexo {
    display: flex;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 5%;
    gap: 5px;
    align-items: center;
}

.buscador {
    display: flex;
}

.buscador input {
    display: none;
    position: relative;
    right: -30px;
    color: #868686;
    font-size: 16px;
    padding: 8px 20px;
    background: #F5F5F5;
    border: none;
    border-radius: 18px;
}

.lupa {
    background-color: var(--naranjo);
    border-radius: 50px;
    border: none;
    height: 35px;
    padding: 9px;
    z-index: 2;
}

.icon-lupa {
    height: 100%;
}

.mobile-menu,
.mobile-cerrar,
.titulo-nav {
    display: none;
}

.contactanos {
    text-decoration: none;
    color: #FFF;
    font-weight: 600;
    letter-spacing: 0.6px;
    background: var(--naranjo);
    padding: 10px 18px;
    border: 1px solid var(--naranjo);
    border-radius: 30px;
}

.contactanos:hover {
    background-color: #FFF;
    border: 1px solid var(--naranjo);
    color: var(--naranjo);
}

.buscador:hover .lupa {
    display: flex;
    background-color: var(--naranjo);
    justify-content: center;
    align-items: center;
    width: 35px;
    border-radius: 45%;
    border: none;
    padding: 9px;
}

.buscador:hover input {
    display: flex;
    transition: 0.3s ease-in-out;
}

.header-line {
    background: #E6E6E6;
    height: 0.5px;
    width: 78%;
    margin: 0 auto 10px;
}

.main-nav {
    display: flex;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    position: relative;
    color: #FFF;
    font-size: 18px;
    font-weight: 600;
}

.main-nav a::after {
    content: "";
    position: absolute;
    text-decoration: underline;
    left: 0;
    bottom: -3px;
    width: 0%;
    height: 2px;
    background: #FFF;
    transition: width 0.3s ease-in-out;
}

.main-nav a:hover::after {
    width: 100%;
}

.blog,
.btn-blog {
    background: transparent;
    border: none;
    color: #FFF;
    font-size: 18px;
    font-weight: 600;
    gap: 10px;
    cursor: pointer;
}

.blog-y-noticias {
    position: relative;
    display: inline-block;
}

.blog-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    gap: 15px;
    z-index: 1;
}

.blog-menu a {
    color: var(--azul);
    font-weight: 500;
    width: 100%;
}

.blog-y-noticias:hover .blog-menu {
    display: block;
    background-color: #FFF;
    border-radius: 8px;
    width: 120%;
    box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, 0.20);
}

.blog-menu a:hover {
    background-color: #f1f1f1;
    text-decoration: none;
    width: 100%;
}

.divisor {
    width: 80%;
    background-color: 2px solid #e4e7ef;
}

.main-nav .innovacion,
.main-nav .vinculacion {
    width: min-content;
}

@media screen and (max-width: 969px) {
    .navbar {
        background: none;
        height: fit-content;

    }

    .top-nav {
        justify-content: space-between;
    }

    .logo-header {
        height: 48px;
        margin-left: 20px;
        z-index: 1;
    }

    .anexo {
        height: 50px;
        gap: 20px;
        /* right: 0; */
        right: 55px;
        left: auto;
    }

    .contactanos {
        display: none;
    }

    .mobile-menu {
        /* .mobile-menu:hover .mobile-cerrar */
        position: absolute;
        display: block;
        height: 50px;
        top: 20px;
        right: 10px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .main-nav.active .mobile-menu {
        display: none;
    }

    /* .mobile-menu:hover .main-nav,
    .main-nav:hover {
        display: block;
        width: 100%;
        top: 0;
        background-color: var(--azul);
    } */

    .main-nav.active .mobile-cerrar {
        display: block;
        margin: 35px 20px 0;
        align-self: flex-end;
        background: none;
        border: none;
    }


    .main-nav.active {
        position: absolute;
        flex-direction: column;
        background-color: var(--azul);
        width: 100%;
        top: 0;
        padding-bottom: 120px;
    }

    .main-nav.active a,
    .main-nav.active p,
    .main-nav.active .blog-y-noticias {
        display: block;
        width: 100%;
        text-align: left;
        margin-left: 70px;
        color: #F5F5F5;
        letter-spacing: 0.8px;
    }

    .main-nav p {
        font-size: 20px;
        font-weight: 700;
        text-decoration: underline;
        margin-bottom: 0;
    }

    .main-nav a,
    .main-nav .btn-blog {
        font-weight: 500;
        font-size: 25px;
        padding: 0;
    }

    .main-nav .mobile-cerrar.active .main-nav {
        display: none
    }

    .lupa {
        background: none;
        padding: 0;
        cursor: pointer;
    }

    .icon-lupa {
        height: 24px;
    }

    .buscador.active .lupa {
        height: 45px;
        width: 45px;
    }

    .buscador.active input {
        width: 85vw;
        height: 45px;
    }

    .main-nav a,
    .main-nav .blog-y-noticias,
    .header-line {
        display: none;
    }
}