.landing-page header,
header {
    position: relative;
    padding: 1rem 15px;
}

header, header .bg-image {
    min-height: 400px;
}

.landing-page header {
    min-height: 750px;
}

header .hero.banner {
    position: absolute;
    width: 100%;
    min-height: 750px;
    top: 0;
    right: 0;
    left: 0;
    z-index: 0;
}

body:not(.landing-page) header .hero.banner {
    min-height: 400px;
}

div#menu-header-idioma {
    position: absolute;
    width: 100%;
    z-index: 4;
    left: 0;
    top: 0;
}

div#menu-header-idioma section.idiomas {
    max-width: 1335px;
    margin: auto;
    width: 100%;
    display: grid;
    place-content: end;
    padding: 0 15px;
}

div#menu-header-idioma section.idiomas ul#menu-idiomas {
    display: flex;
    flex-flow: row;
    gap: 1rem;
}

div#menu-header-idioma section.idiomas ul#menu-idiomas a {
    color: var(--white);
    text-decoration: none;
}

header #menu-header {
    position: relative;
    z-index: 2;
}

header #menu-header ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    place-content: stretch center;
    place-items: center;
    max-width: 1480px;
    margin: auto;
    gap: 1rem;
}

header #menu-header ul a {
    color: var(--white);
    text-decoration: none;
    filter: drop-shadow(0px 0px 0px var(--white));
}

#header-content {
    position: absolute;
    color: var(--white);
    bottom: 135px;
    width: 100%;
    left: 0;
    padding: 0 15px;
    text-wrap: balance;
}

#header-content h1,
#header-content h2 {
    filter: drop-shadow(0px 0px 0px var(--white));
}

.landing-page header .swiper-slide img {
    height: 750px;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

header .swiper-slide img {
    height: 400px;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

#menu-toggle {
    display: none;
}

section.title.text-center {
    padding: 2rem 15px 0;
}

@media(max-width: 1390px) {

    body.open {
        overflow: hidden;
    }

    header #menu-header ul {
        gap: 0rem;
    }

    div#menu-header-idioma section.idiomas ul#menu-idiomas {
        display: flex;
        flex-flow: row;
        gap: 1rem;
        position: absolute;
        top: 1.65rem;
        right: 5.5rem;
        z-index: 4;
    }

    header #menu-header ul li:not(:has(img)) {
        display: none;
    }
    
    body.open header #menu-header ul li:not(:has(img)) {
        display: block;
    }

    body.open header #menu-header ul li:has(img) {
        order: 1;
    }

    body.open header #menu-header ul li:not(:has(img)):nth-of-type(1) {
        order: 2;
    }

    body.open header #menu-header ul li:not(:has(img)):nth-of-type(2) {
        order: 2;
    }

    body.open header #menu-header ul li:not(:has(img)):nth-of-type(4) {
        order: 4;
    }

    body.open header #menu-header ul li:not(:has(img)):nth-of-type(5) {
        order: 5;
    }

    #menu-toggle {
        display: flex;
        flex-flow: column;
        gap: 4px;
        z-index: 299;
        position: absolute;
        width: fit-content;
        top: 0;
        right: 2rem;
    }

    header .toggle-container {
        position: absolute;
        top: 2rem;
        width: 100%;
        left: 0;
    }

    div#identity-header {
        padding: 2rem 15px;
        width: 100%;
    }

    header .toggle-container .toggle-wrapper {
        max-width: 1280px;
        margin: auto;
        padding: 0px;
        direction: rtl;
        height: 98px;
        place-content: center;
    }

    .menu-bar {
        width: 30px;
        height: 3px;
        border-radius: 2rem;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    #menu-toggle .menu-bar {
        background: var(--white);
    }

    body.open #menu-toggle .menu-bar:nth-child(1) {
        opacity: 0;
    }

    body.open #menu-toggle .menu-bar:nth-child(2) {
        transform: translateY(6px) rotate(45deg);
    }

    body.open #menu-toggle .menu-bar:nth-child(3) {
        transform: rotate(-45deg);
    }

    body header .main_menu > div {
        transition-property: display opacity;
        transition-duration: 0;
        transition-behavior: allow-discrete;
        translate: 0;
    }

    body.open header .main_menu > div {
        display: block;
        background-color: var(--header-mobile-bg);
        height: 100vh;
        width: 100%;
        z-index: 7;
        position: fixed;
        top: 0;
        right: 0;
        display: grid;
        place-content: center;
        place-items: start center;
        padding-top: 0em;
        opacity: .95;
        translate: 0;
        grid-template-columns: repeat(4, 1fr);
    }

    body.open header #menu-header ul {
        display: flex;
        position: absolute;
        flex-flow: column;
        gap: 2em;
        padding-top: 1rem;
        left: 0px;
        width: 100%;
        align-items: center;
        margin: auto;
        text-align: center;
    }
}


@media(max-width: 620px) {

    div#menu-header-idioma section.idiomas ul#menu-idiomas {
        display: none;
    }


    body.open div#menu-header-idioma section.idiomas ul#menu-idiomas {
        display: flex;
        position: absolute;
        width: 100%;
        left: 0;
        right: 0;
        width: 100%;
        text-align: center;
        margin: auto;
        justify-content: center;
        top: 28rem;
    }

}

