.video-container {
    position: relative;
    width: 100%;
    height: 80vh; 
    overflow: visible; 
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--secondary-color);
    margin-bottom: 28rem; 
}

/* Dieser Trick färbt den Bereich unter dem Container blau */
.video-container::before {
    content: "";
    position: absolute;
    top: 100%; /* Startet genau unter dem Video */
    left: 0;
    width: 100%;
    height: 28rem;
    background-color: var(--light-primary-color_1);
    z-index: -1;
}

.video-container::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Nur so hoch wie das Video (80vh), nicht über das Padding hinaus */
    height: 80vh; 
    background-color: rgba(0, 0, 0, 0.15); 
    z-index: 1; 
}

/* das Video selbst hat keinen hohen z-index */
.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 0;
}

/* Das Overlay, das den Text positioniert */
.video-overlay {
    position: absolute;
    bottom: 20%; 
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none; 
    /* z-index 2 sorgt dafür, dass der Text ÜBER dem dunklen Filter liegt */
    z-index: 2; 
}

.video-overlay h1 {
    display: block !important; /* Sicherstellen, dass der Text immer da ist */
    text-align: center;
    color: white;
    z-index: 10;
}

/* Der eigentliche Text und die Animation */
.hero-title {
    color: var(--text-color);
    font-size: clamp(2rem, 5vw, 4rem); 
    text-align: center;
    line-height: 1.2;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.5); 
    font-weight: 300;
    
    /* Animationseigenschaften */
    opacity: 0;
    transform: translateX(100px); 
    animation: slideInRight 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    animation-delay: 0.5s; 
}

/* Die Schrift Sonja Korbula auf der ersten Seite */
.hero-title span {
    font-weight: 700; 
}


/* Die Animation von rechts nach links */
@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* zwei Boxen an der Unterseite des Videos */

/* Positionierung der Boxen-Gruppe */
.hero-info-boxes {
    position: absolute;
    bottom: 0;
    transform: translate(-50%, 90%); 
    left: 50%;
    display: flex;
    z-index: 99;
    width: 90%;
    max-width: 50rem; 
    gap: 0.8rem;
    justify-content: center;
}

/* --- Aktualisiertes Boxen-Styling --- */
.info-box {
    flex: 1;
    aspect-ratio: 1 / 1; /* Hält die Boxen quadratisch */
    max-width: 24rem; /* Maximale Größe pro Box */
    display: flex;
    align-items: stretch;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-color);
    border-radius: 0.3rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* --- Bild-Box: KEIN Rand, Bild füllt das Quadrat --- */
.image-box {
    padding: 0;
    border: none;
    background: none;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- Text-Box: Weisser Hintergrund, Schwarzer Text --- */
.text-box {
    background-color: #ffffff;
    color: #333333;
    padding: 1rem; /* Etwas mehr Platz für den Text */
    display: flex;
    flex-direction: column;
    justify-content:center;
}

/* --- Text-Styling innerhalb der Box --- */
.box-content h3 {
    color: #000000; /* Schwarze Überschrift */
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
    text-transform: none;
    letter-spacing: normal;
    border-bottom: 2px solid var(--main-brand-color);
}

.box-content p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: #333333; /* --- NEU: Dunkelgrau für den Haupttext --- */
    margin: 0;
}

/* --- Mobile Anpassung --- */
@media (max-width: 768px) {
    .video-container {
        margin-top: 10rem;
        margin-bottom: 0;

        height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        background-color: var(--secondary-color);
    }
    .hero-video {
        width: 100%;
        height: 30vh;
        min-height: 10rem;
        object-fit: cover;
        object-position: center;
    }

    /* Der Text-Container */
    .video-overlay {
        position: relative;
        height: auto;
        padding: 2rem 1.5rem;
        background-color: transparent;
        align-items: center;
        justify-content: center;
    }

    .hero-title {
        opacity: 1;
        transform: none;
        animation: none;
        color: var(--text-color) !important;
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .hero-title span {
        font-size: 1.8rem;
        display: block;
    }

    /* Die Info-Boxen - BEREICH FÜR ZENTRIERUNG UND ABSTAND NACH UNTEN */
    .hero-info-boxes {
        position: relative;
        left: 0;
        transform: none;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        width: 90%;
        max-width: 35rem;
        margin: 0 auto;
        margin-bottom: 4rem;
        overflow: visible; 
    }

    /* Die einzelnen Info-Boxen (Karten) */
    .info-box {
        aspect-ratio: auto;
        width: 100%;
        min-height: 120px;
        /* ABSTAND NACH UNTEN (ZWISCHEN BOXEN) */
        margin-bottom: 2rem; 
        /* KARTEN-STIL */
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 12px 40px rgba(0,0,0,0.08); /* Schatten etwas stärker für Mobile */
        border: 1px solid #eee;
    }

    .image-box {
        background-color: white;
    }

    /* Spezifisch für die Text-Box (letzte Box) */
    .text-box {
        background-color: #ffffff;
        color: #333333;
        padding: 2.5rem; /* Padding erhöht für Mobile */
        /* KEIN ABSTAND UNTEN, da es die letzte Box ist */
        margin-bottom: 0; 
    }

    /* Damit die Karte "schwebt", muss der Hintergrund dahinter weiss sein, falls das Video dort endet */
    #expertise_section {
        margin-top: 0; /* Nahtloser Übergang */
        padding-top: 4rem; /* Abstand von der Karte */
        background-color: #ffffff; /* Weisser Hintergrund hinter der Karte */
    }

    /* Responsive Anpassung für die nächste Sektion (Expertise) */
    .expertise-main-header h1 {
        font-size: 2rem;
    }

    /* Deaktivierung des "before"-Tricks */
    .row-blue {
        display: none;
    }

    .video-container::before {
        display: none;
    }
    
    /* Entfernt den dunklen Schleier über dem Video mobil */
    .video-container::after {
        display: none;
    }

}