/* ========================================
   HERO FULL WIDTH MODE
   Hintergrundbild über volle Breite,
   Content bleibt in normaler Breite
   ======================================== */

/* ============================================
   FULL WIDTH FEATURE - NUR wenn .hero-full-width
   ============================================ */

/* Container auf volle Browserbreite - NUR bei .hero-full-width */
.elementor-widget-hero-text-container-modul .modul-container.hero-has-bg.hero-full-width {
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    max-width: 100vw !important;
    width: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Content bleibt in normaler Breite - NUR bei .hero-full-width */
.modul-container.hero-has-bg.hero-full-width .modul-container-inner {
    max-width: 1600px !important;
    padding-left: calc(22.6px + 10.4625vw) !important;
    padding-right: calc(22.6px + 10.4625vw) !important;
    padding-top: calc(13.6px + 5.4vw) !important;
    padding-bottom: calc(16.6px + 7.0875vw) !important;
    margin: 0 auto;
}

/* Responsive Padding - NUR bei .hero-full-width */
@media (min-width: 1600px) {
    .modul-container.hero-has-bg.hero-full-width .modul-container-inner {
        padding-left: 190px !important;
        padding-right: 190px !important;
        padding-top: 100px !important;
        padding-bottom: 130px !important;
    }
}

@media (max-width: 1220px) {
    .modul-container.hero-has-bg.hero-full-width .modul-container-inner {
        padding-left: calc(15.6px + 6.525vw) !important;
        padding-right: calc(15.6px + 6.525vw) !important;
    }
}

/* WICHTIG: Verhindere dass .hero-has-bg OHNE .hero-full-width die negative Margin bekommt */
.elementor-widget-hero-text-container-modul .modul-container.hero-has-bg:not(.hero-full-width) {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    width: auto !important;
}

/* ========================================
   HERO OVERLAY - Einfarbig & Gradient
   ======================================== */

.modul-container .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.modul-container.hero-has-bg {
    position: relative;
}

.modul-container.hero-has-bg .modul-container-inner {
    position: relative;
    z-index: 2;
}

/* Overlay-Positionierung Full Width AN */
.modul-container.hero-has-bg.hero-full-width > .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Overlay-Positionierung Full Width AUS (ohne Parallax) */
.modul-container.hero-has-bg:not(.hero-full-width):not(.parallax-bg) .modul-container-inner > .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   HERO TEXT CONTAINER MODUL - Custom Styles
   Full Width AUS (ohne Parallax)
   ======================================== */
.modul-container.hero-has-bg:not(.hero-full-width):not(.parallax-bg) .modul-container-inner {
    padding-top: calc(13.6px + 5.4vw);
    padding-bottom: calc(16.6px + 7.0875vw);
}

@media (min-width: 1600px) {
    .modul-container.hero-has-bg:not(.hero-full-width):not(.parallax-bg) .modul-container-inner {
        padding-top: 100px;
        padding-bottom: 130px;
    }
}

/* ========================================
   HERO PARALLAX EFFECT - requestAnimationFrame
   ======================================== */

/* Parallax Container Setup */
.modul-container.parallax-bg {
    overflow: hidden;
    position: relative;
}

/* Parallax Layer liegt ganz unten (hinter Overlay, hinter Text) */
.modul-container.parallax-bg .hero-parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll !important;

    will-change: transform;
    transform-origin: center center;

    z-index: 0;
}


/* Overlay liegt ÜBER Parallax Layer, UNTER Text */
.modul-container.parallax-bg .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1 !important;
    pointer-events: none;
}

/* Inner liegt über Overlay */
.modul-container.parallax-bg .modul-container-inner {
    position: relative;
    z-index: 2 !important;
}

/* Text liegt über allem */
.modul-container.parallax-bg .widget-text {
    position: relative;
    z-index: 3 !important;
}

/* Parallax OHNE Full Width: Inner braucht Padding */
.modul-container.hero-has-bg.parallax-bg:not(.hero-full-width) .modul-container-inner {
    padding-left: calc(22.6px + 10.4625vw);
    padding-right: calc(22.6px + 10.4625vw);
    padding-top: calc(13.6px + 5.4vw);
    padding-bottom: calc(16.6px + 7.0875vw);
}

@media (min-width: 1600px) {
    .modul-container.hero-has-bg.parallax-bg:not(.hero-full-width) .modul-container-inner {
        padding-left: 190px;
        padding-right: 190px;
        padding-top: 100px;
        padding-bottom: 130px;
    }
}

@media (max-width: 1220px) {
    .modul-container.hero-has-bg.parallax-bg:not(.hero-full-width) .modul-container-inner {
        padding-left: calc(15.6px + 6.525vw);
        padding-right: calc(15.6px + 6.525vw);
    }
}

/* Mobile: Parallax deaktivieren (Performance) */
@media (max-width: 768px) {
    .modul-container.parallax-bg .hero-parallax-layer {
        transform: translate3d(0, 0, 0) !important;
    }
}

/* FIX: Widget-Text muss über Overlay liegen (auch ohne Parallax) */
.modul-container.hero-has-bg .widget-text {
    position: relative;
    z-index: 3;
}
/* ========================================
   HERO TEXT COLOR SCHEMES
   Nur helle Schriftfarbe definieren
   Dunkle Farbe = Standard (wird nicht überschrieben)
   ======================================== */

/* Helle Schrift für dunkle Hintergründe (Weiß) */
.modul-container.text-light p,
.modul-container.text-light .topline {
    color: #ffffff !important;
}

/* ========================================
   HERO BUTTONS - Primary & Secondary Styling
   ======================================== */

/* Primary Button: Orange gefüllt mit weißer Schrift */
.hero-buttons .more-button.primary {
    background-color: #ff5554 !important;
    color: #ffffff !important;
    border: 1px solid #ff5554 !important;
}

.hero-buttons .more-button.primary:hover {
    background-color: #e64444 !important;
    border-color: #e64444 !important;
}

/* Secondary Button: Weißer Hintergrund mit oranger Schrift und orangem Rand */
.hero-buttons .more-button.secondary {
    background-color: #ffffff !important;
    color: #ff5554 !important;
    border: 1px solid #ff5554 !important;
}

.hero-buttons .more-button.secondary:hover {
    background-color: #ff5554 !important;
    color: #ffffff !important;
}

/* Abstand NUR wenn zwei Buttons nebeneinander sind */
.hero-buttons .more-button.primary + .more-button.secondary {
    margin-left: 15px;
}

/* Responsive: Auf Mobile untereinander */
@media (max-width: 767px) {
    .hero-buttons .more-button.primary + .more-button.secondary {
        margin-left: 0;
        margin-top: 15px;
    }
}

/* ========================================
   GLOBALE SEMANTISCHE KORREKTUR - Überschriften
   H1 war bisher ungenutzt und zu klein
   Jetzt: H1 > H2 > H3 > P (semantisch korrekt)
   ======================================== */

/* ---- GLOBALE REGELN ---- */

/* H1 wird zur Hauptüberschrift (bisher war H2 die größte) */
.elementor h1,
.elementor-widget h1 {
    font-family: BrandonGrotesqueMedium, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: calc(35px + 15 * ((100vw - 390px) / 1210)) !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
    color: #ff5554 !important;
    margin: 0 !important;
    margin-bottom: calc(6.6px + 1.4625vw) !important;
}

@media screen and (max-width: 390px) {
    .elementor h1,
    .elementor-widget h1 {
        font-size: 35px !important;
    }
}

@media screen and (min-width: 1600px) {
    .elementor h1,
    .elementor-widget h1 {
        font-size: 50px !important;
        margin-bottom: 30px !important;
    }
}

/* H2 wird zur zweiten Hierarchiestufe */
.elementor h2,
.elementor-widget h2 {
    font-family: BrandonGrotesqueMedium, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: calc(25px + 5 * ((100vw - 390px) / 1210)) !important;
    text-transform: uppercase !important;
    line-height: 1.1 !important;
    color: #ff5554 !important;
    margin: 0 !important;
    margin-bottom: calc(7.1px + 1.74375vw) !important;
}

@media screen and (max-width: 390px) {
    .elementor h2,
    .elementor-widget h2 {
        font-size: 25px !important;
    }
}

@media screen and (min-width: 1600px) {
    .elementor h2,
    .elementor-widget h2 {
        font-size: 30px !important;
        margin-bottom: 35px !important;
    }
}

/* H3 wird kleiner, aber noch größer als Fließtext */
.elementor h3,
.elementor-widget h3 {
    font-family: BrandonGrotesqueMedium, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: calc(18px + 6 * ((100vw - 390px) / 1210)) !important;
    text-transform: uppercase !important;
    line-height: 1.2 !important;
    color: #ff5554 !important;
    margin: 0 !important;
    margin-bottom: calc(6px + 1.2vw) !important;
}

@media screen and (max-width: 390px) {
    .elementor h3,
    .elementor-widget h3 {
        font-size: 18px !important;
    }
}

@media screen and (min-width: 1600px) {
    .elementor h3,
    .elementor-widget h3 {
        font-size: 24px !important;
        margin-bottom: 25px !important;
    }
}


/* ========================================
   AUSNAHMEN - Widgets mit eigenem Styling
   Diese überschreiben die globalen Regeln
   ======================================== */

/* Widget Handwriting - behält Handschrift-Font */
.widget-handwriting h3 {
    font-family: BreathingRegular, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: calc(25px + 35 * ((100vw - 390px) / 1210)) !important;
    color: #1f3e50 !important;
    text-transform: none !important;
    text-align: center !important;
    line-height: normal !important;
    margin: 0 auto !important;
}

@media screen and (max-width: 390px) {
    .widget-handwriting h3 {
        font-size: 25px !important;
    }
}

@media screen and (min-width: 1600px) {
    .widget-handwriting h3 {
        font-size: 60px !important;
    }
}

/* Widget Accordion - behält Accordion-Styling */
.widget-accordion .accordion-container.level-1 h3 {
    font-family: BrandonGrotesqueRegular, sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    font-size: calc(22px + 8 * ((100vw - 390px) / 1210)) !important;
    line-height: 1 !important;
    letter-spacing: 0.04em !important;
    color: #1f3e50 !important;
    text-align: left !important;
    text-transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    margin-top: calc(6.6px + 1.4625vw) !important;
    margin-bottom: calc(6.6px + 1.4625vw) !important;
    cursor: pointer !important;
    position: relative !important;
}

@media screen and (max-width: 390px) {
    .widget-accordion .accordion-container.level-1 h3 {
        font-size: 22px !important;
    }
}

@media screen and (min-width: 1600px) {
    .widget-accordion .accordion-container.level-1 h3 {
        font-size: 30px !important;
        margin-top: 30px !important;
        margin-bottom: 30px !important;
    }
}