/*
 * Copyright (c) 2025 microdat GmbH. Alle Rechte vorbehalten.
 *
 * Dieser Code ist Eigentum von microdat GmbH und darf in keiner Weise
 * verwendet, kopiert, modifiziert, verteilt, lizenziert, vermarktet oder anderweitig
 * genutzt werden. Jegliche unbefugte Nutzung ist strengstens untersagt und wird
 * rechtlich verfolgt.
 *
 * Keine Garantie oder Haftung für Fehler, Schäden oder Verluste, die durch diesen Code entstehen.
 */

/* Titel der Hauptseite */
.home {
    & .carousel {
        & .col-md-7 {
            position: relative;
            z-index: 0;

            display: flex;
            flex-direction: column;
            gap: 1em;

            width: unset;
            font-size: min(2vw, 2dvh) !important;

            border-radius: var(--glass-border-radius);
            padding: 1em 1em 0em 1em;

            background: var(--glass-background);
            backdrop-filter: var(--glass-backdrop-filter);

            &::before {
                content: "";
                position: absolute;
                z-index: -1;
                inset: 0;
                border-radius: inherit;
                border: var(--glass-border-width) solid transparent;
                background: var(--glass-before-background);
                mask: var(--glass-before-mask);
                opacity: var(--glass-before-opacity);
            }

            & > * {
                margin: 0 !important;
                text-align: left !important;
                font-family: inherit !important;
                font-style: normal !important;
                font-size: inherit !important;
                white-space: nowrap;
            }

            & > .buttons:last-child {
                margin-block: 1em !important;

                & > a {
                    transition: background-color 0.3s ease-in-out;
                    background-color: #e5003baa;

                    -webkit-box-shadow: none !important;
                    box-shadow: none !important;

                    display: flex;
                    flex-direction: column;
                    font-size: 150% !important;
                    padding-block: 0.5em !important;

                    border-radius: 0.5em !important;

                    &:hover {
                        background-color: #e5003bff;
                    }
                }
            }

            & > h1 > #rodat-title {
                display: block;
                font-weight: normal !important;
                text-align: center !important;
                margin-inline: 1em !important;
            }

            & > span.sub-title {

                display: flex;
                flex-direction: column;
                gap: 1em;

                margin-inline: 1em !important;

                & > *:nth-child(1) {
                    font-size: 240% !important;
                    line-height: 1;
                    font-weight: bold;
                }

                & > *:nth-child(2) {
                    font-size: 130% !important;;
                    line-height: 1.3;
                    font-weight: bold;
                }

                & > *:nth-child(3) {
                    font-size: 120% !important;;
                    line-height: 1.2;
                    margin-left: 2.5em;
                    margin-bottom: 0;
                    padding-left: 0;
                    font-weight: bold;
                }
            }
        }
    }
}

.home {
    /**
        "Beratung anfordern" Knopf kommt nicht auf der Startseite
    */

    & header .contact-container {
        display: none;
    }

    /**
        Die erste Section auf der Hauptseite hat ein spezielles Padding
     */

    & .main-raised section:first-of-type {
        padding-top: 35px !important;
    }
}

/**
    Hintergrundbild Hochhaus für die vier Boxen
 */
#start-section.section-image {
    background-image: url(/wp-content/uploads/2022/07/city-scaled-1.jpg);
}

/**
    Jene Boxen, welche auf der Hauptseite die Links zu den Unterseiten anbieten.
 */
.root-product-box {
    overflow: hidden;

    flex: 1 1 auto;

    width: 525px;
    max-width: 60rem;
    min-width: min(90dvw, 45rem);
    font-size: min(16px, 2vw, 2dvh) !important;

    padding: 1.875rem;
    border-radius: 0.9375rem;

    & > div:first-child {
        gap: 3rem;
        display: flex;
        align-items: start;
        justify-content: space-between;
        margin-bottom: 1.40625rem;

        & > div:first-child {
            text-align: left;

            & > h3 {
                font-size: 300%;
                color: #fff;
                margin: 0;
            }

            & > p {
                margin: 0.46875rem 0 0 0;
                font-weight: bold;
                font-size: 165%;
                color: #fff;
                white-space: nowrap;
            }
        }

        & > p {
            font-size: 300%;
            flex-shrink: 0;
        }
    }

    & > a.feature-button {
        display: block;
        text-decoration: none;

        transition: background-color 0.3s ease-in-out !important;

        margin-top: 1.40625rem;
        padding: 0.9375rem 1.875rem;

        color: #fff;
        opacity: 1 !important;
        background-color: var(--color-microdat-opaque);

        font-size: 150%;
        text-align: center;
        border-radius: var(--button-border-radius);

        &:hover {
            background-color: var(--color-microdat);
        }
    }
}

.test-for-60-days-button {
    transition: background-color 0.3s ease-in-out !important;
    display: block;
    font-size: 200%;
    opacity: 1 !important;
    color: #fff !important;
    border-radius: var(--button-border-radius);
    background-color: var(--color-microdat-opaque);
    padding: 0.5em 0.5em;

    &:hover {
        background-color: var(--color-microdat);
    }
}

.testimonial {
    /**
        Das Bild der Testimonials bekommt runde Ecken und einen leichten Schlagschatten.
     */

    & > figure.wp-block-media-text__media {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
        border-radius: 0.5em;
        overflow: hidden;
    }
}

.table-warum-besser > table {
    min-width: 600px;
    overflow: scroll;

    & > tbody > tr {
        &:nth-child(2n) {
            background: white;
        }

        & > td:first-child {
            background: inherit;
            position: sticky;
            left: 0;
        }
    }
}
