/* ==================================================
   WALLISER ENGINEERING
   HERO + LEISTUNGSBOXEN + MOBILE NAVIGATION
================================================== */


/* ==================================================
   ZENTRALE VARIABLEN
================================================== */

:root {

    /* Header */
    --we-header-height: 50px;
    --we-mobile-header-height: 116px;

    /* Farben */
    --we-blue: #2c5799;
    --we-blue-dark: #234779;

    --we-text: #111827;
    --we-text-secondary: #5f6368;

    --we-grey: #f3f3f3;
    --we-grey-hover: #e9e9e9;

    /* Rundungen */
    --we-radius: 18px;

    /* Breite der linken hellen Fläche */
    --we-hero-left-area: 46%;


    /* ==================================================
       DESKTOP HERO-HÖHE

       NUR DIESEN WERT ÄNDERN

       Beispiele:
       65vh
       70vh
       75vh
       78vh
       80vh
    ================================================== */

    --we-hero-height: 65vh;
}


/* ==================================================
   HEADER
================================================== */

.sticky-header {
    position: fixed !important;

    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    z-index: 9999 !important;

    background: #ffffff !important;
}


/* ==================================================
   HERO – BASIS
================================================== */

#start {
    position: relative !important;

    z-index: 1 !important;

    display: block !important;

    /*
     * Hero immer exakt Bildschirmbreite.
     */
    width: 100vw !important;
    max-width: none !important;

    /*
     * Falls #start innerhalb eines Contao-Containers
     * liegt, wird er damit auf volle Viewportbreite
     * herausgezogen.
     */
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding: 0 !important;

    overflow: hidden !important;

    background: #ffffff !important;
}


/* ==================================================
   CONTAO-INNENCONTAINER
================================================== */

#start > .inside {
    position: relative !important;

    display: block !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    overflow: hidden !important;
}


/* ==================================================
   HERO-BILDER
================================================== */

.hero-desktop {
    display: block !important;
}

.hero-tablet,
.hero-mobile {
    display: none !important;
}


/* ==================================================
   ALTES HERO-SYSTEM DEAKTIVIEREN
================================================== */

#start .we-scroll-panel,
#start .we-scroll-panel__content,
#start .we-cross-reveal,
#start .we-swiss-cross {
    display: none !important;
}

#start .we-scroll-panel::before,
#start .we-scroll-panel::after {
    content: none !important;
    display: none !important;
}


/* ==================================================
   HERO-TYPOGRAFIE
================================================== */

#start .we-hero-text {
    margin: 0 !important;
    padding: 0 !important;

    text-align: left !important;
}

#start .we-hero-text h1 {
    width: 100% !important;

    margin: 0 0 20px 0 !important;
    padding: 0 !important;

    font-family: 'Inter', sans-serif !important;

    font-size: clamp(
        34px,
        2.8vw,
        56px
    ) !important;

    font-weight: 700 !important;

    line-height: 1.08 !important;
    letter-spacing: -0.03em !important;

    color: var(--we-text) !important;

    text-align: left !important;
}

#start .we-hero-text p {
    width: 100% !important;

    margin: 0 0 26px 0 !important;
    padding: 0 !important;

    font-family: 'Inter', sans-serif !important;

    font-size: clamp(
        15px,
        1.05vw,
        19px
    ) !important;

    font-weight: 400 !important;

    line-height: 1.5 !important;

    color: var(--we-text-secondary) !important;

    text-align: left !important;
}


/* ==================================================
   HERO-BUTTON
================================================== */

#start .we-hero-buttons {
    display: flex !important;

    align-items: center !important;
    justify-content: flex-start !important;

    width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;
}

#start .we-hero-button {
    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    min-height: 48px !important;

    padding: 0 25px !important;

    border-radius: 24px !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 15px !important;
    font-weight: 500 !important;

    line-height: 1 !important;

    text-decoration: none !important;

    white-space: nowrap !important;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease !important;
}

#start .we-hero-button--primary {
    color: #ffffff !important;

    background: var(--we-blue) !important;

    border: 1px solid var(--we-blue) !important;
}

#start .we-hero-button--primary:hover {
    color: #ffffff !important;

    background: var(--we-blue-dark) !important;

    border-color: var(--we-blue-dark) !important;

    transform: translateY(-1px) !important;
}


/* ==================================================
   DESKTOP HERO
   AB 1200px
================================================== */

@media (min-width: 1200px) {

    /* ==================================================
       HERO-GESAMTHÖHE
    ================================================== */

    #start {
        width: 100vw !important;

        height: var(--we-hero-height) !important;

        min-height: 0 !important;
        max-height: none !important;
    }


    #start > .inside {
        width: 100% !important;
        height: 100% !important;
    }


    /* ==================================================
       HERO-BILDCONTAINER
    ================================================== */

    #start .ce_image {
        position: absolute !important;

        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        z-index: 1 !important;

        display: block !important;

        width: 100vw !important;
        height: 100% !important;

        min-width: 100vw !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;

        transform: none !important;
    }


    /* ==================================================
       BILD-WRAPPER
    ================================================== */

    #start .ce_image figure,
    #start .ce_image .image_container,
    #start .hero-picture {
        position: relative !important;

        display: block !important;

        width: 100vw !important;
        height: 100% !important;

        min-width: 100vw !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;
    }


    /* ==================================================
       HERO-BILD

       WICHTIG:
       - Breite immer komplette Bildschirmbreite
       - Höhe entspricht Hero-Höhe
       - Bild wird proportional skaliert
       - Überschuss wird beschnitten
    ================================================== */

    #start .hero-picture img {
        position: absolute !important;

        top: 0 !important;
        left: 0 !important;

        display: block !important;

        width: 100vw !important;
        height: 100% !important;

        min-width: 100vw !important;
        max-width: none !important;

        margin: 0 !important;
        padding: 0 !important;

        object-fit: cover !important;
        object-position: center center !important;

        transform: none !important;
    }


    /* ==================================================
       HERO-TEXTBEREICH
    ================================================== */

    #start .we-hero-content {
        position: absolute !important;

        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        z-index: 20 !important;

        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: var(--we-hero-left-area) !important;
        height: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        pointer-events: none !important;
    }


    #start .we-hero-text {
        width: 78% !important;
        max-width: 610px !important;

        pointer-events: auto !important;
    }
}


/* ==================================================
   LEISTUNGSBEREICH UNTER DEM HERO
================================================== */

.we-hero-services-section {
    position: relative !important;

    z-index: 30 !important;

    width: 100vw !important;
    max-width: none !important;

    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;

    padding:
        28px
        clamp(30px, 5vw, 100px)
        32px
        clamp(30px, 5vw, 100px) !important;

    box-sizing: border-box !important;

    background: #ffffff !important;
}


/* ==================================================
   LEISTUNGS-GRID
================================================== */

.we-hero-services {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    gap: 14px !important;

    width: 100% !important;
    max-width: 1600px !important;

    margin: 0 auto !important;
    padding: 0 !important;
}


/* ==================================================
   EINZELNE LEISTUNGSBOX
================================================== */

.we-hero-service {
    display: flex !important;

    align-items: center !important;
    justify-content: center !important;

    min-width: 0 !important;
    min-height: 76px !important;

    padding: 15px 20px !important;

    box-sizing: border-box !important;

    background: var(--we-grey) !important;

    border: none !important;
    border-radius: var(--we-radius) !important;

    font-family: 'Inter', sans-serif !important;

    font-size: 16px !important;
    font-weight: 600 !important;

    line-height: 1.25 !important;

    color: #1d1d1f !important;

    text-align: center !important;
    text-decoration: none !important;

    transition:
        background-color 0.2s ease,
        transform 0.2s ease !important;
}

.we-hero-service:hover {
    background: var(--we-grey-hover) !important;

    transform: translateY(-2px) !important;
}


/* ==================================================
   TABLET
   BIS 1199px

   VORERST BESTEHENDES VERHALTEN
================================================== */

@media (max-width: 1199px) {

    .hero-desktop {
        display: none !important;
    }

    .hero-tablet {
        display: block !important;
    }

    .hero-mobile {
        display: none !important;
    }


    #start {
        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
    }


    #start > .inside {
        height: auto !important;
    }


    #start .ce_image {
        position: relative !important;

        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    #start .ce_image figure,
    #start .ce_image .image_container,
    #start .hero-picture {
        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    #start .hero-picture img {
        display: block !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;

        object-fit: contain !important;
    }


    #start .we-hero-content {
        position: absolute !important;

        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        z-index: 20 !important;

        display: flex !important;

        align-items: center !important;
        justify-content: center !important;

        width: 49% !important;
        height: 100% !important;

        pointer-events: none !important;
    }


    #start .we-hero-text {
        width: 80% !important;
        max-width: 520px !important;

        pointer-events: auto !important;
    }


    #start .we-hero-text h1 {
        margin-bottom: 16px !important;

        font-size: clamp(
            29px,
            3.7vw,
            44px
        ) !important;
    }


    #start .we-hero-text p {
        margin-bottom: 20px !important;

        font-size: clamp(
            14px,
            1.55vw,
            17px
        ) !important;
    }


    #start .we-hero-button {
        min-height: 44px !important;

        padding: 0 19px !important;

        font-size: 14px !important;
    }


    .we-hero-services-section {
        width: 100% !important;

        margin: 0 !important;

        padding:
            24px
            32px
            28px
            32px !important;
    }


    .we-hero-services {
        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 12px !important;
    }


    .we-hero-service {
        min-height: 68px !important;

        font-size: 15px !important;
    }
}


/* ==================================================
   MOBILE – BLURRED PANEL SCROLLS OVER HERO
================================================== */

@media (max-width: 767px) {

    /* ==================================================
       HERO SCROLL-CONTAINER
    ================================================== */

    #start {
        position: relative !important;

        display: flex !important;
        flex-direction: column !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: visible !important;
    }


    /* Wichtig für position: sticky */
    #start > .inside {
        position: relative !important;

        display: flex !important;
        flex-direction: column !important;

        width: 100% !important;
        height: auto !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: visible !important;
    }


    /* ==================================================
       HERO-BILD
       Bleibt beim Scrollen stehen
    ================================================== */

    #start > .hero-picture {
        order: 1 !important;

        position: sticky !important;

        top: var(--we-mobile-header-height) !important;

        z-index: 1 !important;

        width: 100% !important;

        /*
         * MOBILE HERO-HÖHE
         *
         * Zweiter Wert ist die wichtigste Stellschraube.
         */
        height: clamp(
            360px,
            50svh,
            440px
        ) !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;
    }


    /* ==================================================
       AKTUELLES MOBILE-HERO-BILD
    ================================================== */

    #start > .hero-picture img {
        display: block !important;

        width: 100% !important;
        height: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        object-fit: cover !important;
        object-position: center center !important;

        transform: none !important;
    }


    /* ==================================================
       BLUR-PANEL
       Scrollt über das sticky Hero-Bild
    ================================================== */

    #start .we-hero-content {
    order: 2 !important;

    position: relative !important;

    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;

    z-index: 5 !important;

    display: flex !important;

    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;

    width: 100% !important;

    /*
     * Same height as the Hero image
     */
    height: clamp(
        360px,
        50svh,
        440px
    ) !important;

    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;

    box-sizing: border-box !important;

    background:
        rgba(255, 255, 255, 0.60) !important;

    -webkit-backdrop-filter:
        blur(24px) !important;

    backdrop-filter:
        blur(24px) !important;

    transform: none !important;

    pointer-events: auto !important;
}


    /* ==================================================
       TEXT INNERHALB DES BLUR-PANELS
    ================================================== */

    #start .we-hero-text {
        position: relative !important;

        width: 100% !important;
        max-width: 500px !important;

        margin: 0 auto !important;
        padding: 24px !important;

        box-sizing: border-box !important;

        background: transparent !important;

        text-align: center !important;

        /*
         * Negative Zahl = Text weiter nach oben.
         */
        transform: none !important;
    }


    #start .we-hero-text h1,
    #start .we-hero-text p {
        text-align: center !important;
    }


    #start .we-hero-buttons {
        justify-content: center !important;
    }

}

/* ==================================================
   MOBILE MENU – OPEN / CLOSED STATE
================================================== */

@media (max-width: 991.98px) {

    /* Header-Container als Bezugspunkt */
    .sticky-header .header-container {
        position: relative !important;
    }

    /* Navigation geschlossen */
    .sticky-header .header-navigation {
        position: absolute !important;

        top: 100% !important;
        left: 0 !important;
        right: 0 !important;

        width: 100% !important;
        height: auto !important;
        max-height: 0 !important;

        display: block !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;

        background: #ffffff !important;

        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;

        transform: translateY(-8px) !important;

        z-index: 10000 !important;

        transition:
            max-height 0.3s ease,
            opacity 0.2s ease,
            transform 0.2s ease,
            visibility 0.2s ease !important;
    }


    /* Navigation geöffnet */
    .sticky-header .header-navigation.is-open {
        display: block !important;

        height: auto !important;
        max-height: 600px !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        transform: translateY(0) !important;
    }


    /* Navigation selbst */
    .sticky-header .header-navigation nav,
    .sticky-header .header-navigation .mod_navigation {
        display: block !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 18px 0 !important;

        background: #ffffff !important;
    }


    /* Menü-Liste */
    .sticky-header .header-navigation ul.level_1 {
        display: flex !important;
        flex-direction: column !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;

        list-style: none !important;

        background: #ffffff !important;
    }


    /* Einzelne Links */
    .sticky-header .header-navigation ul.level_1 > li {
        display: block !important;

        width: 100% !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    .sticky-header .header-navigation ul.level_1 > li > a {
        display: block !important;

        width: 100% !important;

        padding: 14px 28px !important;

        box-sizing: border-box !important;

        color: #111827 !important;

        text-decoration: none !important;

        background: #ffffff !important;
    }

}

/* ==================================================
   MOBILE HERO-BILD
   Bleibt beim Scrollen stehen
================================================== */

@media (max-width: 767px) {

    #start > .hero-picture {
        order: 1 !important;

        position: sticky !important;

        /* Höhe des geschrumpften Sticky-Headers */
        top: var(--we-header-height) !important;

        z-index: 1 !important;

        width: 100% !important;

        height: clamp(
            360px,
            50svh,
            440px
        ) !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;
    }

}

