*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-white: #fff;
    --color-neutral-100: #e3e5e8;
    --color-neutral-200: #c7cbd1;
    --color-neutral-500: #6f7989;
    --color-neutral-600: #59616E;
    --color-neutral-700: #424852;
    /* --color-blue-500: #2058AC; */
    --color-blue-500: #2172B6;
    --color-red-500: #be1f24;
    --color-red-600: #91181B;
    --color-footer-500: #3a4351;
    --color-footer-600: #222831;
    --color-orange-500: #D35100;
}

body {
    display: flex;
    font-family: 'DM Sans', arial;
    color: var(--color-neutral-600);
    font-size: 16px;
}

a:link {
    color: inherit;
}

.no-link-decoration {
    text-decoration: none !important;
}

.blue-bg {
    background-color: var(--color-blue-500);
}

/* ===== FONTS ===== */

.font-display {
    font-size: 3.25rem;
    line-height: 150%;
    font-family: 'DM Sans';
    font-weight: 700;
}

.font-display-small {
    font-family: 'DM Sans';
    font-size: 2rem;
    line-height: 150%;
    font-weight: 200;
}

.font-header {
    font-family: 'DM Sans';
    font-size: 2.43rem;
    line-height: 120%;
    font-weight: 700;
}

.font-subheader {
    font-family: 'DM Sans';
    font-size: 1.93rem;
    line-height: 140%;
    font-weight: 500;
}

.font-title {
    font-family: 'DM Sans';
    font-size: 1.56rem;
    line-height: 150%;
    font-weight: 700;
}

.font-subtitle {
    font-family: 'DM Sans';
    font-size: 1.25rem;
    line-height: 120%;
    font-weight: 600;
}

p,
.font-regular {
    font-family: 'DM Sans';
    font-size: 1rem;
    line-height: 150%;
    font-weight: 400;
}

.font-regular-bold {
    font-family: 'DM Sans';
    font-size: 1rem;
    line-height: 140%;
    font-weight: 600;
}

.font-label {
    font-family: 'DM Sans';
    font-size: 0.81rem;
    line-height: 100%;
    font-weight: 500;
}

.text-red {
    color: var(--color-red-500);
}

.text-neutral-700 {
    color: var(--color-neutral-700);
}

.text-white {
    color: var(--color-white) !important;
}

.text-orange {
    color: var(--color-orange-500);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 20%;
    height: 100dvh;
    background: var(--color-white);
    color: var(--color-neutral-600);
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    outline: 1px solid var(--color-neutral-100);
    scrollbar-gutter: stable;
    /* reserves space for the scrollbar */

}

.logo {
    display: block;
    text-align: center;
    padding: 32px 20px;
    font-size: 22px;
    text-decoration: none;
    color: white;
    border-bottom: 1px solid var(--color-neutral-100);

    img {
        max-width: 280px;
    }
}

/* ===== MENU ===== */
.menu {
    list-style: none;
    display: flex;
    flex-direction: column;

}

.menu-item-A {
    border-bottom: 1px solid var(--color-neutral-100);
    cursor: pointer;
    background: var(--color-white);
    position: relative;

    /* needed for pseudo-element */

    a {
        display: block;
        color: var(--color-neutral-600);
        text-decoration: none;
        margin-left: 12px;
        padding: 24px 15px;

    }

    /* animated line */
    &::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--color-red-500);
        /* line color */
        transform: translateX(-50%);
        transition: width 0.3s ease;
    }

    &:hover {
        background-color: var(--color-white);
    }

    &:hover::after {
        width: 100%;
    }
}

.menu-item {
    border-bottom: 1px solid var(--color-neutral-100);

    i {
        margin-left: auto;
        margin-right: 0;
    }
}

.menu-title {
    padding: 24px 15px;
    cursor: pointer;
    background-color: var(--color-white);
    margin-left: 12px;
    position: relative;

    /* needed for pseudo-element */
    /* animated line */
    &::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: var(--color-red-500);
        /* line color */
        transform: translateX(-55%);
        transition: width 0.3s ease;
    }

    &:hover {
        background-color: var(--color-white);
    }

    &:hover::after {
        width: 110%;
    }
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0s ease;
    background-color: var(--color-white);
}

.submenu a {
    display: block;
    padding: 16px 20px;
    color: var(--color-neutral-600);
    text-decoration: none;
    border-bottom: 1px solid var(--color-white);
    margin-left: 1rem;
    font-size: 0.9rem;
}

.submenu a:hover {
    background-color: var(--color-neutral-100);
}

.menu-item.active .submenu {
    max-height: 400px;
}

.sidebar_social_container {
    display: flex;
    padding: 24px 15px;
    margin-left: 12px;
    gap: 1rem;

    .fa-brands {
        font-size: 1.5rem;
        color: var(--color-blue-500);
    }

}

/* ===== CONTENT ===== */
.content {
    margin-left: 20%;
    width: 100%;
}

/* ===== TOP LOGO BAR ===== */
.top-logo-bar-section {
    background-color: var(--color-red-600);
    padding: 2rem 0;

    .top-logo-bar-container {
        display: flex;
        justify-content: space-around;
        align-items: center;

        img {
            min-height: 48px;
        }
    }
}

/* ===== GENERIC CTA ===== */
.generic-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    width: 100%;
    text-decoration: none;

    a {
        font-family: 'DM Sans';
        font-size: 1rem;
        line-height: 140%;
        font-weight: 500;
    }
}

.small-generic-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2rem;
    text-decoration: none;
    width: fit-content;
    margin: auto;

    a {
        font-family: 'DM Sans';
        font-size: 1rem;
        line-height: 140%;
        font-weight: 500;
        color: white;
    }
}

/* ===== GENERIC BOXES ===== */
.generic-section {
    width: 100%;
}

.generic-container {
    width: 100%;
}

.generic-wrapper {
    width: 100%;
    padding: 0;
}

.two-halves-wrapper {
    display: flex;
}

.half-container {
    width: 50%;
    display: flex;
}

.half-wrapper {
    display: flex;
    width: 100%;
}

.half-container-img {
    display: flex;
    justify-content: center;
    align-content: center;
    width: 100%;
    position: relative;


    .half-img-full {
        object-fit: cover;
        position: absolute;
        object-position: center;
        width: 100%;
        height: 100%;
    }

    .half-img-center {
        width: 65%;
        object-fit: contain;
    }

    .small-img-center {
        width: 65%;
        object-fit: contain;
        max-width: 360px;
    }
}

.half-text-container-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 4rem 4rem 4rem 0;
    width: 100%;

}

.half-text-container-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 4rem 0 4rem 4rem;
    width: 100%;
}

.text-content-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.text-content-container-right-padding {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-right: 4rem;
}

.icon-div-line {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.full-width-img-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
    overflow: hidden;

    img {
        width: 100%;
        object-fit: cover;
    }
}



/* ===== TOP TITLE SECTION ===== */
.top-title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== HERO ===== */

.hero-container {
    background:
        linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        url(img/hero_placeholder.jpg);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 560px;
    width: 100%;
    color: white;

    .hero-wrapper {
        padding: 8rem;
        position: relative;
        width: 100%;
        height: 100%;

        .hero-text-content {
            position: absolute;
            bottom: 20%;
            width: 75%;
        }
    }
}

/* ===== LABIT INICIO ===== */
.labit-index-header-wrapper {
    background-color: var(--color-blue-500);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;

    img {
        width: 160px;
    }
}

/* ===== GENERIC CONTENT CARDS ===== */

.generic-content-container {
    .generic-content-column-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;

        .generic-card-list-wrapper {
            display: flex;
            justify-content: flex-start;
            gap: 2rem;
            margin-bottom: 1rem;

            .generic-third-card {
                width: calc((100% - 2rem) / 3);
                text-decoration: none;
                display: flex;
                flex-direction: column;
                gap: 1rem;
                padding: 0 0 1rem 0;
            }

            .generic-card-img {
                display: flex;
                justify-content: center;
                align-items: center;
                width: 100%;
                height: 200px;
                overflow: hidden;
                position: relative;

                img {
                    width: 100%;
                    height: 100%;
                    position: absolute;
                    object-fit: cover;
                    object-position: center;
                }
            }

            i {
                margin-left: auto;
                margin-top: auto;
            }
        }

        .card-red-border-bottom {
            border-bottom: 1px solid var(--color-red-500);
        }

        .card-white-border-bottom {
            border-bottom: 1px solid var(--color-white);
        }
    }
}


/* ===== ACERCA CARDS ===== */

.acerca-cards-container {
    display: flex;
    flex-direction: column;

    .acerca-cards-wrapper {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        width: 100%;

        .acerca-cards-row-wrapper {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;

            .acerca-card {
                display: flex;
                flex-direction: column;
                width: 24%;
                outline: 1px solid var(--color-neutral-100);
                border-radius: 1rem;
                overflow: hidden;
                margin-left: 0;

                .acerca-card-img {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 100%;
                    overflow: hidden;
                    height: 280px;

                    img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }

                .acerca-card-name {
                    display: flex;
                    flex-direction: column;
                    gap: 1rem;
                    width: 100%;
                    padding: 2rem;
                }
            }
        }
    }
}

/*EQUIPOS GALLERY*/


.gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: auto;
}

.galleryWrap {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    margin: auto;
    justify-content: space-between;

    a {
        width: 33%;
        height: 240px;
        position: relative;
        overflow: hidden;
        margin-bottom: 0.5rem;

        img {
            position: absolute;
            top: 0;
            left: 0;
            object-fit: cover;
            width: 100%;
            height: 100%;
            transition: all ease 500ms;
        }

        img:hover {
            filter: blur(2px);
        }

        .vertical-img {
            object-position: top;
        }
    }
}

/* ===== TOP BAR (MOBILE) ===== */
.topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: var(--color-red-500);
    color: white;
    z-index: 1100;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
}

.top-bar-logo {
    height: 50%;
}

.topbar .logo-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-decoration: none;
    color: white;
    font-weight: bold;
}

.toggle-btn,
.close-btn {
    cursor: pointer;
    font-size: 20px;
}

.close-btn {
    display: none;
}


/* ===== FOOTER ===== */

.section_footer {
    background-image: url(img/Rect-Light.svg);
    background-size: cover;
    background-position: 0 0;
    background-color: #F0F0F0;
    width: 100%;
    padding: 3rem 0;

    .body-regular-text {
        color: #4E4E4E;
    }

    .red-text {
        color: #be1f24;
        font-weight: 600;
    }


    .footer_line {
        width: 100%;
        height: 1px;
        background-color: white;
    }

    .footer_container {
        width: 85%;
        display: flex;
        padding: 3rem 6rem;
        justify-content: center;
        margin-left: auto;
        margin-right: auto;

        .footer_content {
            width: 24%;
            display: flex;
            flex-direction: column;
            gap: 1rem;

            .footer_subcontent {
                display: flex;
                flex-direction: column;
                margin-bottom: 1rem;

            }
        }
    }

    .footer_legal {
        width: 85%;
        margin: auto;

        .footer_legal_container {
            text-align: center;
            max-width: 85%;
            margin: auto;
        }


    }

    a {
        text-decoration: none;
    }

    a:hover {
        text-decoration: underline;
    }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .topbar {
        display: flex;
    }

    .sidebar {
        width: 100%;
        height: calc(100vh - 60px);
        top: 60px;
        /* opens BELOW top bar */
        transform: translateX(-101%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        margin-top: 60px;
    }

    .close-btn {
        display: none;
    }

    .galleryWrap {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        margin: auto;
        justify-content: space-between;

        a {
            width: 100%;
            height: 240px;
            position: relative;
            overflow: hidden;
            margin-bottom: 0.5rem;
        }
    }

    .footer_link {
        font-size: 1rem;
        color: white;
        font-weight: 500;
    }

    .section_footer {
        background-size: cover;
        background-position: 0 0;
        width: 100%;
        padding: 1rem 0 1rem 0;

        .footer_line {
            width: 100%;
            height: 1px;
            background-color: white;
        }

        .footer_container {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            padding: 3rem;
            justify-content: space-between;
            margin-left: auto;
            margin-right: auto;

            .footer_content {
                width: 48%;
                display: flex;
                flex-direction: column;
                gap: 2rem;

                .footer_subcontent {
                    display: flex;
                    flex-direction: column;
                    margin-bottom: 1rem;


                }
            }
        }

        .footer_legal {
            width: 100%;
            margin: auto;

            .footer_legal_container {
                text-align: center;
                max-width: 85%;
                margin: auto;
            }


        }

        a {
            text-decoration: none;
        }

        a:hover {
            text-decoration: underline;
        }
    }

    .top-logo-bar-section {
        background-color: var(--color-red-600);
        padding: 2rem 0;
        display: none;

        .top-logo-bar-container {
            display: flex;
            justify-content: space-around;
            align-items: center;
            flex-wrap: wrap;

            img {
                min-height: 48px;
            }
        }
    }

    .font-display {
        font-size: 1.6rem;
        line-height: 130%;
        font-family: 'DM Sans';
        font-weight: 700;
    }

    .font-display-small {
        font-family: 'DM Sans';
        font-size: 1.25rem;
        line-height: 150%;
        font-weight: 200;
    }

    .font-header {
        font-family: 'DM Sans';
        font-size: 1.4rem;
        line-height: 120%;
        font-weight: 700;
    }

    .font-subheader {
        font-family: 'DM Sans';
        font-size: 1.2rem;
        line-height: 140%;
        font-weight: 500;
    }

    .font-title {
        font-family: 'DM Sans';
        font-size: 1.2rem;
        line-height: 150%;
        font-weight: 700;
    }

    .hero-container {
        background:
            linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
            url(img/hero_placeholder.jpg);
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        background-attachment: fixed;
        height: 320px;
        width: 100%;
        color: white;

        .hero-wrapper {
            padding: 2rem;
            position: relative;
            width: 100%;
            height: 100%;

            .hero-text-content {
                position: absolute;
                bottom: 10%;
                width: 75%;
                left: 3rem;

            }
        }
    }

    .two-halves-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .half-container {
        width: 100%;
        display: flex;
    }


    .half-container-img {
        display: flex;
        justify-content: center;
        align-content: center;
        width: 100%;
        position: relative;
        height: 240px;
        overflow: hidden;

        .half-img-full {
            object-fit: cover;
            position: absolute;
            object-position: center;
            width: 100%;
            height: 100%;
        }

        .half-img-center {
            width: 100%;
            object-fit: contain;
            max-width: 280px;
        }

        .small-img-center {
            width: 100%;
            object-fit: contain;
            max-width: 240px;
        }
    }


    .half-text-container-left {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 0;
        width: 100%;

    }

    .half-text-container-right {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 0;
        width: 100%;
    }

    .text-content-container-right-padding {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding-right: 0;
    }

    /* ===== GENERIC CONTENT CARDS ===== */

    .generic-content-container {
        .generic-content-column-wrapper {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;

            .generic-card-list-wrapper {
                display: flex;
                justify-content: flex-start;
                gap: 2rem;
                margin-bottom: 1rem;
                flex-direction: column;

                .generic-third-card {
                    width: 100%;
                    text-decoration: none;
                    display: flex;
                    flex-direction: column;
                    gap: 1rem;
                    padding: 0 0 1rem 0;
                }

                .generic-card-img {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    width: 100%;
                    height: 200px;
                    overflow: hidden;
                    position: relative;

                    img {
                        width: 100%;
                        height: 100%;
                        position: absolute;
                        object-fit: cover;
                        object-position: center;
                    }
                }

                i {
                    margin-left: auto;
                    margin-top: auto;
                }
            }

            .card-red-border-bottom {
                border-bottom: 1px solid var(--color-red-500);
            }

            .card-white-border-bottom {
                border-bottom: 1px solid var(--color-white);
            }
        }
    }

    .full-width-img-wrapper {
        display: flex;
        justify-content: center;
        align-items: center;
        height: 280px;
        overflow: hidden;

        img {
            width: 100%;
            object-fit: cover;
        }
    }

    /* ===== ACERCA CARDS ===== */

    .acerca-cards-container {
        display: flex;
        flex-direction: column;

        .acerca-cards-wrapper {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            width: 100%;

            .acerca-cards-row-wrapper {
                display: flex;
                flex-wrap: wrap;
                gap: 1rem;

                .acerca-card {
                    display: flex;
                    flex-direction: column;
                    width: 100%;
                    outline: 1px solid var(--color-neutral-100);
                    border-radius: 1rem;
                    overflow: hidden;
                    margin-left: 0;

                    .acerca-card-img {
                        display: flex;
                        align-items: center;
                        justify-content: center;
                        width: 100%;
                        overflow: hidden;
                        height: 280px;

                        img {
                            width: 100%;
                            height: 100%;
                            object-fit: cover;
                        }
                    }

                    .acerca-card-name {
                        display: flex;
                        flex-direction: column;
                        gap: 1rem;
                        width: 100%;
                        padding: 2rem;
                    }
                }
            }
        }
    }
}