@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Varela&display=swap');

body {
    font-family: "Montserrat", sans-serif;
    color: #4d4d4d;
    font-size: 1.1rem;
    line-height: 1.5;
    font-weight: 500;
    scroll-behavior: smooth;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.page-loaded {
    opacity: 1;
}

.fade-out {
    opacity: 0 !important;
    transition: opacity 0.2s ease-in-out;
}

#scroll-container {
    /* Verhindert unschöne Lücken */
    display: flow-root; 
}

/* 1. STANDARD ABSTAND FÜR ALLE SEITEN */
.page-content {
    /* Setzt sich aus Header-Höhe (100px) + Padding (20px) + Puffer zusammen */
    padding-top: 140px; 
    min-height: 50vh; /* Verhindert, dass der Footer bei wenig Content nach oben springt */
}

/* 2. OVERLAY-LOGIK FÜR HERO-ELEMENTE */
/* Wenn das allererste Element in .page-content ein Hero ist, 
   soll es den Abstand ignorieren und hinter den Header rutschen */
.page-content > :first-child.frame-type-mask-hero {
    margin-top: -140px;
}

/* 4. OPTIONAL: KORREKTUR FÜR ANKER-LINKS (Smooth Scroll) */
/* Damit beim Klick auf Anker der Text nicht unter dem Header landet */
:target::before {
    content: "";
    display: block;
    height: 140px;
    margin-top: -140px;
}

.frame:not(.frame-type-mask-hero, .frame-type-navigation, .frame-type-mask-logoslider) {
    max-width: 1320px;
    margin: 4.5rem auto;
}

.frame-type-mask-hero {
    position: relative;
}

h1, .h1, h2, .h2, h3, .h3 {
    font-family: "Montserrat", sans-serif;
    font-weight: 700;
    background: linear-gradient(0deg, #e8e5df 45%, rgba(217, 217, 217, 0) 45%);
    display: inline;
    line-height: 1.3;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    width: fit-content;
    color: #1f293e;
    margin: 0;
}

h1,.h1 {
    font-size: 4.5rem;
    line-height: 1.2
}

h2,.h2 {
    font-size: 2.5rem
}

.frame-type-mask-hero h1, .frame-type-mask-hero .h1 {
    display: inline;
    background: linear-gradient(0deg, #1f293e 45%, rgba(217, 217, 217, 0) 45%);
    line-height: 1.3;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    color: white;
}

@media (max-width: 990px) {
    .frame:not(.frame-type-mask-hero) {
        max-width: 100%;
        margin: 3rem auto;
        padding: 0 1em;
    }
    h1,.h1 {
        font-size: 2.5rem;
        line-height: 1.2;
        hyphens: auto;
    }
    h2,.h2 {
        font-size: 1.8rem
    }
    
}

.button {
    display: inline-block;
    background-color: #1f293e;
    color: white;
    text-decoration: none;
    margin-left: 40px;
    padding: 5px 20px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 600;
    transition: all 0.4s ease;
}

.button:hover {
    background-color: #1f293ec7;
    transition: all 0.4s ease;
}

hr.ce-div {
    background-color: #e8e5df;
    height: 1em;
    color: transparent;
    border: none;
}

.element-header {
    margin-bottom: 2rem;
}