/*  Hier wird der Grid für die Startseite festgelegt  */

/* Mobile First, hier werden die Elemente für mobile Geräte definiert */
/* 568px - 767px, Mindestweite für die Ansicht ist 568px */
header {
    .compliance-background {
        background: var(--hauptBg);
        border-bottom: 1px solid var(--borderColor);

        .compliance {
            display: flex;
            justify-content: end;
            flex-wrap: wrap;
            max-width: 568px;
            min-height: 36px;
            margin: 0 auto;
            text-align: right;
            font-size: 10pt;
            line-height: 36px;
            padding: 0px 10px 0px 10px;
            gap: 8px;

            .seo-line {
                display: flex;
                /* "none" wenn Cockies akzeptiert wurden */
                flex-direction: row;
                align-items: center;
                flex-wrap: wrap;
                text-align: left;
                justify-content: start;

                button {
                    background: var(--hoverBlau);
                    border: 1px solid #FFF;
                    color: #FFF;
                    cursor: pointer;
                    margin-bottom: 3px;
                    margin-left: 5px;
                    padding: 8px 12px;
                    white-space: nowrap;

                    &:hover {
                        background: #207cca;
                    }
                }

                a {
                    white-space: nowrap;
                    text-decoration: none;
                    font-size: 0.90em;
                    margin: 0 5px;
                    cursor: pointer;

                    &:hover {
                        color: var(--hoverBlau);
                    }
                }

                .seo-text {
                    white-space: wrap;
                    font-size: 0.90em;
                }
            }

            .sh-text {
                font-size: 10pt;
            }
        }
    }

    .top-navigation-background {
        border-bottom: 1px solid var(--borderColor);
        background-color: var(--hellerBg);

        .top-navigation {
            display: flex;
            flex-direction: column;
            max-width: 568px;
            margin: 0 auto;
            justify-content: space-between;
            align-items: center;

            a {
                margin: 7px 0;
                cursor: pointer;

                img {
                    width: 295px;
                    /* 360 */
                    height: 65px;
                    /* 77 */
                }
            }

            ul {
                display: flex;
                flex-direction: row;

                li {
                    display: flex;
                    list-style: none;
                    width: 142px;
                    height: 77px;
                    text-align: center;
                    justify-content: center;
                    align-items: center;
                    padding: auto;
                    border-top: 1px solid var(--borderColor);
                    border-left: 1px solid var(--borderColor);
                    border-right: 1px solid var(--borderColor);

                    a {
                        text-decoration: none;
                        color: #000;
                        display: block;
                        cursor: pointer;

                        &:hover {
                            color: var(--hoverBlau);
                        }
                    }
                }
            }
        }
    }

    .titel-login-background {
        border-bottom: 1px solid #d8d8d8;

        .titel-login {
            display: flex;
            flex-direction: column;
            max-width: 568px;
            margin: 5px auto;
            justify-content: space-between;
            align-items: center;

            .titel-login-img {
                margin-left: 20px;
            }

            .kundenlogin {
                background: #FFFFFF;
                border: 1px solid #d8d8d8;
                border-radius: 8px;
                padding: 10px 10px;
                margin: 20px auto;
                justify-content: space-between;
                align-items: center;
                text-align: center;
                height: 314px;
                width: 550px;
            }
        }
    }

    .navigation {
        .navigationsleiste-background {
            background: linear-gradient(to bottom, #5d5d5d 0%, #2b2b2b 100%);
            border: 1px solid var(--borderColor);
            height: 40px;
            color: #FFF;
            display: flex;
            flex-direction: row;

            .navigationsleiste-mobil {
                margin: 0 auto;
                width: 568px;
                display: flex;
                flex-direction: row;
                justify-content: start;
                align-items: center;
                color: #FFF;

                button {
                    margin-left: 36px;
                    background: none;
                    border: none;
                    cursor: pointer;
                    padding: 0;
                    color: #FFFFFF;

                    svg {
                        width: 24px;
                        height: 24px;
                    }
                }

                .navigation-mobil {
                    position: fixed;
                    top: 0;
                    right: -300px;
                    width: 280px;
                    height: 100vh;
                    background: #2b2b2b;
                    transition: right 0.3s ease;
                    z-index: 2000;
                    padding: 60px 0 0 0;
                    overflow-y: auto;

                    .menu {
                        list-style: none;
                        margin: 0;
                        padding: 0;

                        li {
                            border-bottom: 1px solid #444;
                            position: relative;

                            a {
                                display: block;
                                padding: 12px 20px;
                                color: white;
                                text-decoration: none;

                                &:hover {
                                    background: var(--hoverBlau);
                                }
                            }

                            ul {
                                display: none;
                                list-style: none;
                                margin: 0;
                                padding: 0;
                                background: #3a3a3a;

                                li {
                                    border-bottom: 1px solid #555;

                                    a {
                                        padding-left: 35px;
                                    }
                                }
                            }

                            &:has(ul)>a::after {
                                content: " ▼";
                                font-size: 10px;
                                float: right;
                            }

                            &.active>a::after {
                                content: " ▲";
                            }

                            &.active>ul {
                                display: block;
                            }
                        }
                    }
                }
            }

            .navigationsleiste {
                margin: 0 auto;
                max-width: 568px;
                display: none;
                flex-direction: row;
                align-items: center;
                gap: 15px;
                position: relative;

                a {
                    color: #FFFFFF;
                    text-decoration: none;
                    cursor: pointer;
                }

                ul.menu {
                    display: flex;
                    flex-direction: row;
                    list-style: none;
                    height: 38px;
                    align-items: center;

                    li {
                        display: flex;
                        flex-direction: row;
                        border-left: 3px solid var(--hoverBlau);
                        padding: 0 15px;
                        height: 38px;
                        align-items: center;
                        transition: background-color 80ms ease-in-out;
                        cursor: pointer;
                        position: relative;

                        &:hover {
                            text-decoration: none;
                            background: var(--hoverBlau);
                        }

                        svg {
                            margin-right: 4px;
                            height: 12px;
                            width: 12px;
                        }

                        a {
                            color: #FFFFFF;
                            text-decoration: none;
                            cursor: pointer;
                            display: flex;
                            flex-direction: row;
                        }

                        /* Das DROPDOWN (Untermenü) */
                        ul {
                            display: none;
                            position: absolute;
                            top: 100%;
                            left: 0;
                            background-color: #f1f1f3;
                            border: 1px solid var(--borderColor);
                            min-width: 220px;
                            list-style: none;
                            margin: 0;
                            padding: 0;
                            height: auto;
                            flex-direction: column;
                            z-index: 1000;

                            li {
                                display: block;
                                border-left: none;
                                border-bottom: 1px solid #555;
                                padding: 0;
                                height: auto;
                                cursor: default;

                                &:hover {
                                    background: none;
                                }

                                a {
                                    display: block;
                                    padding: 10px 16px;
                                    white-space: nowrap;
                                    color: #000000;

                                    &:hover {
                                        background: var(--hoverBlau);
                                        color: #FFFFFF;
                                    }

                                    &:before {
                                        color: #db6101;
                                        content: "»";
                                        margin-right: 4px;
                                    }
                                }
                            }
                        }

                        /* Die letzten beiden Untermenüs öffnen weiter links */
                        &:nth-last-child(-n+2)>ul {
                            left: auto;
                            right: 0;
                        }
                    }
                }

                /* ========== DROPDOWN ÖFFNEN BEI HOVER ========== */
                .menu>li:hover>ul {
                    display: block;
                }
            }
        }

        .breadcrumb-sozial-background {
            border-bottom: 1px solid var(--borderColor);
            background-color: var(--hellerBg);

            .breadcrumb-sozial {
                display: flex;
                flex-direction: column-reverse;
                width: 568px;
                /* height: 40px; */
                justify-content: space-between;
                align-items: center;
                margin: 0 auto;
                font-size: 16px;

                .breadcrumb {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    justify-content: flex-start;
                    height: 40px;
                    width: 550px;

                    a {
                        text-decoration: none;
                        color: #000000;

                        &:hover {
                            color: var(--hoverBlau);
                        }
                    }
                }

                .mobil-container {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    justify-content: space-between;
                    height: 40px;
                    border-bottom: 1px solid var(--borderColor);
                    width: 550px;

                    .sozialmedia {
                        font-weight: 700;
                        margin-left: 2px;
                        margin-right: 12px;
                    }

                    .sozial-icons {
                        display: flex;
                        flex-direction: row;
                        gap: 1.5px;
                        margin-right: 2px;

                        a {
                            cursor: pointer;

                            img {
                                width: 34px;
                                height: 34px;
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (min-width: 768px) {

    /* Hier werden die Elemente für Tablets definiert */
    /* 768px - 1239px */
    header {
        .compliance-background {
            .compliance {
                flex-direction: row;
                align-items: center;
                justify-content: end;
                flex-wrap: wrap;
                text-align: right;
                max-width: 768px;
                padding: 0px 20px;
                gap: 2px;

                .seo-line {

                    button {
                        padding: 3px 6px;
                        margin: 0;
                    }

                    a {
                        padding: 4px 0;
                    }

                    .seo-text {
                        white-space: nowrap;
                        /* Tablet wieder in einer Zeile */

                    }
                }
            }
        }

        .top-navigation-background {
            .top-navigation {
                flex-direction: row;
                max-width: 768px;
                align-items: left;

                a {
                    margin: 0 20px;
                }

                ul {
                    li {
                        width: 100px;
                        border-top: none;

                        a {
                            font-size: 0.95em;
                            margin: 0;
                        }
                    }
                }
            }
        }

        .titel-login {
            flex-direction: column;
            max-width: 768px;
            gap: 20px;

            .kundenlogin {
                margin: 20px 0;
            }
        }

        .navigation {
            .navigationsleiste-background {

                .navigationsleiste-mobil {
                    display: none;

                    .navigation-mobil {
                        display: none;
                    }
                }

                .navigationsleiste {
                    margin: 0 auto;
                    max-width: 768px;
                    display: flex;
                    flex-direction: row;

                    ul.menu {
                        li {
                            svg {
                                display: none;
                            }
                        }
                    }
                }
            }

            .breadcrumb-sozial-background {
                .breadcrumb-sozial {
                    flex-direction: column-reverse;
                    width: 768px;
                    font-size: 14px;

                    .breadcrumb {
                        width: 768px;
                    }

                    .mobil-container {
                        width: 768px;

                        .sozialmedia {
                            margin-left: 0px;
                            margin-right: 25px;
                        }

                        .sozial-icons {
                            gap: 5px;
                            margin-right: 0px;

                            a {
                                img {
                                    width: 24px;
                                    height: 24px;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

@media (min-width: 1240px) {

    /* Hier werden die Elemente für Desktop definiert */
    /* Ab 1240px */
    header {
        .compliance-background {
            .compliance {
                max-width: 1240px;
                max-height: 40px;
                padding: 0px 16px;
                gap: 8px;

                .seo-line {
                    button {
                        padding: 3px 6px;
                    }

                    a {
                        font-size: 0.90em;
                    }

                    .seo-text {
                        white-space: nowrap;
                    }
                }
            }
        }

        .top-navigation-background {
            .top-navigation {
                max-width: 1240px;

                ul {
                    li {
                        width: 140px;

                        a {
                            font-size: 1em;
                        }
                    }
                }
            }
        }

        .titel-login-background {
            .titel-login {
                flex-direction: row;
                max-width: 1240px;
                gap: 20px;
            }
        }

        .navigation {
            .navigationsleiste-background {

                .navigationsleiste-mobil {
                    display: none;
                }

                .navigationsleiste {
                    margin: 0 auto;
                    max-width: 1240px;
                    display: flex;
                    flex-direction: row;

                    ul.menu {
                        li {
                            svg {
                                display: flex;
                            }
                        }
                    }
                }
            }

            .breadcrumb-sozial-background {
                .breadcrumb-sozial {
                    width: 1240px;
                    flex-direction: row;

                    .breadcrumb {
                        width: auto;
                    }

                    .mobil-container {
                        width: auto;

                        .sozialmedia {}

                        .sozial-icons {}
                    }
                }
            }
        }
    }
}