/* ==================================================
   CSS VARIABLEN
================================================== */
.gw-fsm-widget {
    --gw-fsm-line-shift: 10px;
    --gw-fsm-divider-width: 1px;
    --gw-fsm-divider-color: rgba(255, 255, 255, 0.2);
    --gw-fsm-submenu-icon-size: 0.8em;
    --gw-fsm-submenu-icon-gap: 0.35em;
    --gw-fsm-bg-animation-duration: 10s;
}

/* ==================================================
   HEADER BAR, LOGO & CTA
================================================== */
.gw-fsm-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    z-index: 10001;
    background-color: transparent;
    transition: background-color 0.4s ease, transform 0.4s ease, padding 0.4s ease;
}

.gw-fsm-header-left,
.gw-fsm-header-center,
.gw-fsm-header-right {
    display: flex;
    align-items: center;
}

.gw-fsm-header-left { flex: 1; justify-content: flex-start; }
.gw-fsm-header-center { flex: 1; justify-content: center; }
.gw-fsm-header-right { flex: 1; justify-content: flex-end; gap: 30px; }

/* LOGO BASIS STYLING */
.gw-fsm-logo-link {
    display: block;
    line-height: 0;
    flex-shrink: 0;
}
.gw-fsm-logo-link img {
    /* width: 100%; */
    max-width: 100%;
    height: auto;
    object-fit: contain;
    transition: opacity 0.3s;
}
.gw-fsm-logo-sticky { display: none; }

/* LOGO POSITION (NORMAL) */
.gw-fsm-header-bar[data-logo-pos="left"] .gw-fsm-header-center .gw-fsm-logo-link { display: none; }
.gw-fsm-header-bar[data-logo-pos="center"] .gw-fsm-header-left .gw-fsm-logo-link { display: none; }

/* HEADER CTA BUTTON */
.gw-fsm-header-cta {
    display: inline-block;
    padding: 12px 28px;
    background-color: #e4003a;
    color: #fff;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.gw-fsm-header-cta:hover {
    opacity: 0.9;
}

/* ==================================================
   STICKY HEADER VERHALTEN
================================================== */
.gw-fsm-header-bar.is-sticky {
    position: fixed;
    background-color: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    padding: 10px 40px;
}
.gw-fsm-header-bar.is-scrolled-down {
    transform: translateY(-100%);
}

/* LOGO BILD-WECHSEL (STICKY) */
.gw-fsm-header-bar.is-sticky:not(.is-open-header) .gw-fsm-logo-main { display: none !important; }
.gw-fsm-header-bar.is-sticky:not(.is-open-header) .gw-fsm-logo-sticky { display: block !important; }

/* LOGO POSITION (STICKY) */
.gw-fsm-header-bar.is-sticky:not(.is-open-header)[data-logo-pos-sticky="left"] .gw-fsm-header-center .gw-fsm-logo-link { display: none !important; }
.gw-fsm-header-bar.is-sticky:not(.is-open-header)[data-logo-pos-sticky="left"] .gw-fsm-header-left .gw-fsm-logo-link { display: block !important; }

.gw-fsm-header-bar.is-sticky:not(.is-open-header)[data-logo-pos-sticky="center"] .gw-fsm-header-left .gw-fsm-logo-link { display: none !important; }
.gw-fsm-header-bar.is-sticky:not(.is-open-header)[data-logo-pos-sticky="center"] .gw-fsm-header-center .gw-fsm-logo-link { display: block !important; }

/* ==================================================
   SICHTBARKEIT DES LOGOS (DATA-ATTRIBUTES)
================================================== */
.gw-fsm-widget[data-show-logo-normal="no"]:not(.is-open) .gw-fsm-header-bar:not(.is-sticky) .gw-fsm-logo-link { display: none !important; }
.gw-fsm-widget[data-show-logo-sticky="no"]:not(.is-open) .gw-fsm-header-bar.is-sticky .gw-fsm-logo-link { display: none !important; }
.gw-fsm-widget[data-show-logo-overlay="no"].is-open .gw-fsm-header-bar .gw-fsm-logo-link { display: none !important; }

.gw-fsm-widget[data-show-logo-overlay="yes"].is-open .gw-fsm-header-bar .gw-fsm-logo-main { display: block !important; }
.gw-fsm-widget[data-show-logo-overlay="yes"].is-open .gw-fsm-header-bar .gw-fsm-logo-sticky { display: none !important; }

.gw-fsm-widget[data-show-logo-overlay="yes"].is-open .gw-fsm-header-bar[data-logo-pos="left"] .gw-fsm-header-left .gw-fsm-logo-link { display: block !important; }
.gw-fsm-widget[data-show-logo-overlay="yes"].is-open .gw-fsm-header-bar[data-logo-pos="left"] .gw-fsm-header-center .gw-fsm-logo-link { display: none !important; }

.gw-fsm-widget[data-show-logo-overlay="yes"].is-open .gw-fsm-header-bar[data-logo-pos="center"] .gw-fsm-header-center .gw-fsm-logo-link { display: block !important; }
.gw-fsm-widget[data-show-logo-overlay="yes"].is-open .gw-fsm-header-bar[data-logo-pos="center"] .gw-fsm-header-left .gw-fsm-logo-link { display: none !important; }

/* ==================================================
   ZUSTAND: OVERLAY OFFEN (ALLGEMEIN)
================================================== */
.gw-fsm-widget.is-open .gw-fsm-header-bar {
    background-color: transparent !important;
    box-shadow: none !important;
}
.gw-fsm-widget.is-open .gw-fsm-toggle { color: #fff !important; }

/* ==================================================
   TOGGLE / HAMBURGER ICON
================================================== */
.gw-fsm-widget .gw-fsm-toggle {
    position: relative;
    z-index: 10001;
    cursor: pointer;
    border: 0;
    background: transparent;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
}

.gw-fsm-widget .gw-fsm-toggle-lines {
    width: 35px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}

.gw-fsm-widget .gw-fsm-toggle-lines span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    transition: all 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

.gw-fsm-widget.is-open .gw-fsm-toggle-lines span:nth-child(1) { transform: translateY(var(--gw-fsm-line-shift)) rotate(45deg); }
.gw-fsm-widget.is-open .gw-fsm-toggle-lines span:nth-child(2) { transform: translateY(calc(var(--gw-fsm-line-shift) * -1)) rotate(-45deg); }
.gw-fsm-widget .gw-fsm-toggle-label { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.03em; }

/* ==================================================
   OVERLAY & HINTERGRUND
================================================== */
.gw-fsm-overlay {
    position: fixed;
    top: -130%;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 10000;
    transition: top 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    overflow: hidden;
    isolation: isolate;
}

/* --- Hintergrund Überlagerung --- */
.gw-fsm-overlay-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gw-fsm-overlay.gw-fsm-no-transition { transition: none !important; }
.gw-fsm-overlay.gw-fsm-overlay-default { background: linear-gradient(135deg, #f39200 0%, #e4003a 50%, #b4006e 100%); }

.gw-fsm-overlay.gw-fsm-bg-animated {
    background-size: 200% 200%;
    animation: gw-fsm-gradient-shift var(--gw-fsm-bg-animation-duration) ease infinite;
}

@keyframes gw-fsm-gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gw-fsm-widget.is-open .gw-fsm-overlay { top: 0; }

/* ==================================================
   OVERLAY CONTENT (SPLIT SCREEN)
================================================== */
.gw-fsm-overlay-content {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 100%;
}

.gw-fsm-left-panel,
.gw-fsm-right-panel {
    display: flex;
    align-items: center;
    padding: 5%;
}

.gw-fsm-left-panel {
    flex: 1.2;
    justify-content: flex-end;
    border-right: var(--gw-fsm-divider-width) solid var(--gw-fsm-divider-color);
}

.gw-fsm-right-panel {
    flex: 0.8;
    justify-content: flex-start;
}

/* ==================================================
   MENÜ STYLING
================================================== */
.gw-fsm-nav-menu ul {
    list-style: none;
    text-align: right;
    margin: 0;
    padding: 0;
}

.gw-fsm-nav-menu > ul > li > a {
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
    display: inline-block;
    position: relative;
    padding: 10px calc(var(--gw-fsm-submenu-icon-size) + var(--gw-fsm-submenu-icon-gap)) 10px 0;
    transition: color 0.3s, opacity 0.3s;
}

/* --- DROPDOWN ICONS (ANIMATED) --- */
.gw-fsm-submenu-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 50%;
    margin-left: 0;
    color: currentColor;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.4s cubic-bezier(0.7, 0, 0.3, 1);
}

.gw-fsm-icon-normal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.gw-fsm-icon-active {
    display: none !important;
}

.gw-fsm-nav-menu .menu-item-has-children.submenu-open > a .gw-fsm-submenu-indicator {
    transform: translateY(-50%) rotate(-90deg);
}

/* SUBMENU ICON GRÖSSEN */
.gw-fsm-submenu-indicator i { font-size: 0.8em; }
.gw-fsm-submenu-indicator svg { width: 0.8em; height: 0.8em; fill: currentColor; }
.gw-fsm-submenu-indicator img { width: 0.8em; height: 0.8em; object-fit: contain; }

/* --- SVG FARBANPASSUNGEN --- */
.gw-fsm-widget svg *[stroke]:not([stroke="none"]) { stroke: currentColor !important; }
.gw-fsm-widget svg *[fill]:not([fill="none"]) { fill: currentColor !important; }
.gw-fsm-widget svg *:not([fill="none"]):not([stroke]) { fill: currentColor !important; }

/* SUBMENU */
.gw-fsm-nav-menu .sub-menu {
    display: none;
    margin: 0;
    padding: 0 0 15px;
}

.gw-fsm-nav-menu .sub-menu li a {
    font-size: 1.5rem;
    font-weight: 400;
    display: inline-block;
    padding-right: calc(var(--gw-fsm-submenu-icon-size) + var(--gw-fsm-submenu-icon-gap) + 0.35em);
    transition: color 0.3s, opacity 0.3s;
}

.gw-fsm-nav-menu .sub-menu li a:hover { opacity: 1; }

/* ==================================================
   RECHTE SPALTE (INFO BLÖCKE)
================================================== */
.gw-fsm-info { color: #fff; }
.gw-fsm-block { margin-bottom: 30px; }
.gw-fsm-block h5 {
    letter-spacing: 2px;
    margin: 0 0 8px;
    opacity: 0.7;
}
.gw-fsm-block p {
    color: #fff;
    text-decoration: none;
    margin: 0;
}

.gw-fsm-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px 24px;
    background-color: #fff;
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

.gw-fsm-button:hover { transform: translateY(-2px); }
.gw-fsm-button-icon { width: 1.2em; height: 1.2em; object-fit: contain; }

/* ==================================================
   RESPONSIVE DESIGN (ELEMENTOR BREAKPOINTS)
================================================== */
@media (max-width: 1024px) {
    .gw-fsm-overlay-content {
        flex-direction: column;
        overflow-y: auto;
    }

    .gw-fsm-left-panel {
        border-right: none;
        border-bottom: var(--gw-fsm-divider-width) solid var(--gw-fsm-divider-color);
        justify-content: center;
        padding-top: 100px;
    }

    .gw-fsm-right-panel {
        justify-content: center;
        text-align: center;
    }

    /* Zentrierung für Mobile & Tablet */
    .gw-fsm-nav-menu ul {
        text-align: center !important;
    }

    /* WICHTIG für funktionierendes JS-Toggle: Block-Elemente bleiben */
    .gw-fsm-nav-menu > ul > li {
        display: block;
    }

    /* Um das Icon an den Text zu heften: Link wird Inline-Block */
    .gw-fsm-nav-menu > ul > li > a {
        display: inline-block !important;
        position: relative !important;
        padding-right: calc(var(--gw-fsm-submenu-icon-size) + 15px) !important;
        padding-left: 0 !important;
    }

    /* Das Icon klebt nun am Ende des Inline-Block-Links */
    .gw-fsm-submenu-indicator {
        position: absolute !important;
        right: 0 !important;
        left: auto !important;
    }
}

@media (max-width: 768px) {
    .gw-fsm-header-bar { padding: 15px 20px; }
    .gw-fsm-header-bar.is-sticky { padding: 10px 20px; }

    .gw-fsm-header-left,
    .gw-fsm-header-center,
    .gw-fsm-header-right {
        flex: auto;
    }

    .gw-fsm-header-right { gap: 15px; }
    .gw-fsm-header-cta { display: none; }

    .gw-fsm-widget .gw-fsm-toggle-lines {
        height: 15px;
    }
}