/* 1. GRUNDGERÜST & RESET (Deine Original-Werte) */
body {
    font-family: inter !important;
    padding: 0 !important;
    margin: 0 !important;
    color: rgb(71, 85, 105); /* --text-main */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

:root {
  --primary-color: rgb(46, 135, 198);
  --text-main: rgb(71, 85, 105);
  --text-sub: #555;
  --bg-white: #ffffff;
  --cyan: #3389c7;
  --current-accent: var(--cyan);
}

/* Der Standard-Zustand des Inhalts */
main {
    transition: filter 0.4s ease, opacity 0.4s ease;
    filter: blur(0);
    opacity: 1;
}

/* Der Zustand, wenn die Navigation gehovert wird */
body.nav-is-hovered main {
    filter: blur(2px) grayscale(30%); /* Ein wenig Farbe rausnehmen wirkt sehr edel */
    opacity: 0.7;
}

/* 2. TYPOGRAFIE (Deine massiven Überschriften) */
.h1, .h2 {
    font-weight: 300 !important;
}

/* 3. UTILITY CLASSES (Abstände & Hintergründe) */
.mt-0  { margin-top: 0 !important; }
.mt-10 { margin-top: 2.5rem !important; }
.mt-20 { margin-top: 5rem !important; }
.mb-0  { margin-bottom: 0 !important; }
.mb-10 { margin-bottom: 2.5rem !important; }
.mb-20 { margin-bottom: 5rem !important; }

.bg-white    { background-color: #ffffff; }
.bg-slate-50  { background-color: #f8fafc; }
.bg-slate-900 { background-color: #0f172a; color: #ffffff; }

/* 4. HEADER & NAVIGATION (Verschachtelt, aber mit deinen Größen) */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);

    .logo { width: 140px; }
    .header-wrapper {
        padding: 0 50px;
        display: flex;
        align-items: center;
        min-height: 80px;
    }
}

/* --- DESKTOP NAVIGATION (Ab 992px) --- */
@media (min-width: 992px) {
    .main-nav {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        display: flex;
        justify-content: center;

        .dropdown:hover > .dropdown-menu {
            display: block !important;
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-item {
            padding:0
        }

        ul.rex-navi1 {
            display: flex;
            & > li {
                position: relative;
                --local-color: var(--current-accent);

                & > a {
                    display: block;
                    padding: 25px 20px;
                    text-decoration: none;
                    color: var(--text-main);
                    font-weight: 600;
                    text-transform: uppercase;
                    font-size: 18px;
                    letter-spacing: 0.5px;
                    transition: color 0.3s ease;
                    border-top: 1px solid transparent;
                }

                &:hover > a, &.rex-active > a {
                    color: var(--local-color);
                    border-top: 1px solid var(--local-color);
                }

                /* Dropdown Desktop Hover Logik */
                & ul {
                    border-radius: 0;
                    display: block;
                    position: absolute;
                    top: 100%;
                    left: 0;
                    min-width: 240px;
                    width: max-content;
                    background: #fff;
                    flex-direction: column;
                    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
                    z-index: 999;
                    padding: 0;
                    border-top: 1px solid var(--local-color);
                    border-bottom: 10px solid var(--local-color);
                    
                    /* Verstecken */
                    opacity: 0;
                    visibility: hidden;
                    transform: translateY(15px);
                    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                    pointer-events: none;
                    margin-left: 15px;

                    & li a {
                        display: block;
                        padding: 12px 25px;
                        text-decoration: none;
                        color: var(--text-sub);
                        font-size: 14px;
                        transition: all 0.2s ease;
                        &:hover, .rex-active {
                            background-color: #f8f9fa;
                            color: var(--local-color);
                            padding-left: 30px;
                            padding-right: 20px; 
                        }
                    }

                    .rex-active a {
                        background-color: #f8f9fa;
                        color: var(--local-color);
                        padding-left: 30px;
                        padding-right: 20px; 
                    }
                }

                &:hover > ul {
                    opacity: 1;
                    visibility: visible;
                    transform: translateY(0);
                    pointer-events: auto;
                }
            }
        }
    }
}

/* --- MOBILE NAVIGATION (< 992px) --- */
@media (max-width: 991.98px) {
    header .header-wrapper { 
        padding: 0 20px; 
    }

    /* Das Hauptmenü (Burger-Collapse) */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 20px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        max-height: 85vh;
        overflow-y: auto;
    }

    ul.rex-navi1 {
        flex-direction: column;
        display: block; 
        padding: 0;
        
        & > li {
            width: 100%;
            list-style: none;

            & > a {
                padding: 15px 0;
                font-size: 18px;
                font-weight: 600;
                color: var(--text-main);
                border-bottom: 1px solid #eee;
                display: flex;
                justify-content: space-between;
                align-items: center;
                text-decoration: none;
            }
        }

        /* --- DER SLIDE-EFFEKT OHNE SPRINGEN --- */
        .dropdown-menu {
            display: block !important; 
            position: static;
            width: 100%;
            float: none;
            
            max-height: 0;
            overflow: hidden;
            padding: 0 !important; 
            margin: 0;
            
            transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);

            border: none;
            border-radius: 0;
            box-shadow: none;

            li a {
                padding-left: 10px;
            }

            li:last-child { 
                padding-bottom: 20px;
            }
        }

        .dropdown-menu.show {
            max-height: 1000px;
            border-bottom: 1px solid #eee;
        }

        .dropdown-item {
            list-style: none;
            padding-left: 0;
            padding-right: 0;

            a {
                padding: 5px 0px;
                display: block;
                color: var(--text-sub);
                text-decoration: none;
                font-size: 16px;
                transition: background 0.2s;
            }

            &:hover, &:active {
                background: transparent;
            }
        }

        a.dropdown-item {
            padding: 5px 0px;
        }
    }

    .dropdown-toggle {
        pointer-events: auto !important;
    }

    /* Pfeil-Optik */
    .dropdown-toggle::after {
        display: inline-block;
        content: '+';
        border: none;
        font-family: monospace;
        font-size: 22px;
        line-height: 1;
        transition: transform 0.3s ease;
        margin-left: 10px;
    }

    .dropdown-toggle.show::after {
        content: '-';
    }

    .dropdown-toggle.show {
        border-bottom: 1px solid #fff;
    }

    .navbar-toggler {
        border-radius: 0;
    }
}

/* 5. BUTTONS & INTERACTION */
a, button, .button-aeyvis {
    transition: all 0.3s ease-in-out;
}

.own-btn {
    display: inline-block;
    background-color: #1e293b;
    color: #ffffff !important;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;

    @media (max-width: 575.98px) {
        width: 100%;
        text-align: center;
    }

    &.light {
        background-color: var(--current-accent);
    }

    &:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        background-color: var(--current-accent);
        &.light {
            background-color: #1e293b;
        }
    }

    &.to-top {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        border-radius: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        z-index: 999;

        &.show {
            opacity: 1;
            visibility: visible;
        }
    }
}

.btn-green {
    background-color: #10b981 !important;
    color: white !important;
    border-color: #10b981 !important;
}

/* 6. REVEAL ANIMATION (Struktur behalten, Performance verbessert) */
.reveal {
    opacity: 1;
    & > * {
        opacity: 0;
        transform: translateY(30px);
        /* Korrektur: Kein 'all' mehr! */
        transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), 
                    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); 

        &.is-visible {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* 7. SECTION FRAMEWORK */
.section {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.section-container {
    max-width: 90%;
     @media (max-width: 991.98px) {
        max-width: 100%;
    }

    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;

    &.section-container-center {
        text-align: center;
    }
}

/* Globale Glow-Effekte */
.card-glow {
    position: absolute; /* Das hat im Footer gefehlt! */
    border-radius: 50%;
    filter: blur(48px);
    z-index: 1;
    pointer-events: none; /* Damit man nicht versehentlich draufklickt */
    transition: background-color 0.4s ease;
}


.dropdown-item.active, .dropdown-item:active {
    background: unset;
    color: unset;
}

.text-normal {
    text-transform: none;
}