/* Jump & Fly – Wolken-Video (fixed, unter Slider/Nav/Inhalt) */

body.jf-body {
    background: transparent;
    --jf-blue-surface-gradient: linear-gradient(
        to right,
        rgba(13, 88, 127, 0) 0%,
        rgba(13, 88, 127, 0.7) 18%,
        rgba(13, 88, 127, 0.7) 82%,
        rgba(13, 88, 127, 0) 100%
    );
}

.jf-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.jf-bg-video__media {
    position: absolute;
    top: 50%;
    left: 50%;
    width: auto;
    height: auto;
    min-width: 100.5%;
    min-height: 100.5%;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Decoder für rVFC-Slow-Motion (sichtbar bleibt das Canvas mit .jf-bg-video__media) */
.jf-bg-video__decoder {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    left: 0;
    top: 0;
}

.jf-main {
    position: relative;
    z-index: 1;
}

.jf-body .ibl-main {
    padding-top: 0;
    min-height: 100vh;
}

/* colPos 0 (Hauptinhalt): 1200px zentriert */
.jf-body .jf-stage {
    position: relative;
    z-index: 2;
    box-sizing: border-box;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem);
}

.jf-body .ibl-content:not(.jf-content-main) > .ibl-content__inner {
    max-width: 1400px;
}

.jf-stage > .frame {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.jf-site-logo__link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

.jf-site-logo__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Logo in der Nav-Leiste (Desktop + Mobile) */
.jf-site-logo--bar {
    display: block;
    flex: 0 0 auto;
    margin-right: auto;
}

.jf-site-logo--bar .jf-site-logo__img {
    width: clamp(6.5rem, 36vw, 8.5rem);
    filter: none;
}

@media (min-width: 992px) {
    .jf-site-logo--bar .jf-site-logo__img {
        width: clamp(10.5rem, 16vw, 14rem);
    }
}

@media (max-width: 991px) {
    .jf-nav-below-slider .ibl-header__inner {
        justify-content: space-between;
        gap: 0.75rem;
    }
}

/* Layer-Slider: unterer Abstand kommt sonst von ids_layerslider (2rem) */
.jf-stage .ids-layer-slider,
.jf-body .jf-content-main .ids-layer-slider {
    margin: 0;
    border-radius: 0;
}

.jf-body .jf-content-main .ids-layer-slider__viewport {
    border-radius: 0;
}

.jf-stage .frame {
    overflow: visible;
}

.jf-nav-below-slider .ibl-header__inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Sticky unter dem Slider; kein fixed + Scroll-Hide (siehe navigation.js) */
.ibl-header.jf-nav-below-slider {
    position: sticky;
    top: 0;
    left: auto;
    right: auto;
    z-index: 100;
    pointer-events: auto;
}

.jf-nav-below-slider.is-header-hidden .ibl-header__bar {
    transform: none;
    pointer-events: auto;
}

.jf-nav-below-slider {
    margin-top: 0;
    box-shadow: none;
}

.jf-nav-below-slider .ibl-header__bar {
    background: var(--jf-blue-surface-gradient);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: none;
}

/* colPos 1 (Hero): volle Breite wie früher .jf-stage — Text auf Wolken-Video */
.jf-body .jf-content-main {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding: 0;
    background: transparent;
}

.jf-body .jf-content-main .ibl-content__inner {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    width: 100%;
    max-width: none;
    margin: 0;
    padding-block: 0;
    padding-inline: 0;
    background: transparent;
}

.jf-body .jf-content-main .frame,
.jf-body .jf-stage .frame {
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-size: 1.35rem;
    line-height: 1.55;
    color: #fff;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame h1 {
    font-size: clamp(2.4rem, 4.8vw, 2.85rem);
}

/* colPos 0: Seitenüberschrift (CE-Header h1, z. B. Startseite c7) — zentriert, viewport-bezogen */
.jf-body .jf-stage .frame > header:has(h1) {
    box-sizing: border-box;
    width: 100%;
    max-width: min(100%, 52rem);
    margin-inline: auto;
    padding-inline: clamp(0.5rem, 4vw, 2rem);
    text-align: center;
}

.jf-body .jf-stage .frame > header h1 {
    margin: 0 0 clamp(0.85rem, 2.5vw, 1.35rem);
    max-width: 100%;
    font-size: clamp(1.65rem, 5.2vw + 0.35rem, 2.85rem);
    line-height: 1.12;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Unterhalb H1: kleinere clamp-Werte als .frame h1 / .jf-stage header h1 (min. 1,65rem) */
.jf-body :is(.jf-content-main, .jf-stage) .frame h2 {
    font-size: clamp(1.35rem, 3.25vw + 0.25rem, 2.2rem);
    line-height: 1.15;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame h3 {
    font-size: 1.85rem;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame h4 {
    font-size: 1.65rem;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame h5 {
    font-size: 1.4rem;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame h6 {
    font-size: 1.3rem;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame :is(h1, h2, h3, h4, h5, h6, p, li, td, th, figcaption) {
    color: #fff;
    -webkit-text-stroke: 2px #0d587f;
    text-stroke: 2px #0d587f;
    paint-order: stroke fill;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.jf-body :is(.jf-content-main, .jf-stage) .frame figcaption,
.jf-body :is(.jf-content-main, .jf-stage) .frame .image-caption {
    font-size: 1rem;
    text-align: center;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame a:not(.ibl-nav-desktop__link) {
    color: #fff;
    -webkit-text-stroke: 2px #0d587f;
    text-stroke: 2px #0d587f;
    paint-order: stroke fill;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
    text-decoration: none;
    background-image: linear-gradient(#fff, #fff);
    background-position: left bottom;
    background-repeat: no-repeat;
    background-size: 0 2px;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    transition:
        color 0.2s ease,
        background-size 0.35s var(--ibl-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.jf-body :is(.jf-content-main, .jf-stage) .frame a:not(.ibl-nav-desktop__link):hover,
.jf-body :is(.jf-content-main, .jf-stage) .frame a:not(.ibl-nav-desktop__link):focus-visible {
    color: rgba(255, 255, 255, 0.92);
    background-size: 100% 2px;
}

/*
 * Galerie-Layout (Größe/Float/Flex): nur außerhalb ce-intext.
 * ce-intext (z. B. CE 7): kein jump-fly-Layout — nur content.css + Typo unten.
 */
.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-textpic:not(.ce-intext) :is(.ce-gallery, .ce-image, .ce-row),
.jf-body :is(.jf-content-main, .jf-stage) .frame :is(.ce-above, .ce-below, .ce-image) :is(.ce-gallery, .ce-row) {
    overflow: visible;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame:not(.frame-hero-box) .ce-textpic:not(.ce-intext) :is(img.image-embed-item, .ce-gallery img, .ce-textpic img, figure.image img),
.jf-body :is(.jf-content-main, .jf-stage) .frame :is(.ce-above, .ce-below, .ce-image) :is(img.image-embed-item, .ce-gallery img, figure.image img) {
    display: block;
    border-radius: 24px;
    box-shadow: 0 0 0 2px #0d587f, 0 8px 24px rgba(0, 0, 0, 0.25);
}

.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-textpic:not(.ce-intext) .ce-gallery,
.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-above .ce-gallery,
.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-below .ce-gallery,
.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-image .ce-gallery {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-textpic:not(.ce-intext) .ce-gallery .ce-row,
.jf-body :is(.jf-content-main, .jf-stage) .frame :is(.ce-above, .ce-below, .ce-image) .ce-gallery .ce-row {
    flex-wrap: nowrap;
    width: 100%;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-textpic:not(.ce-intext) .ce-row .ce-column,
.jf-body :is(.jf-content-main, .jf-stage) .frame :is(.ce-above, .ce-below, .ce-image) .ce-row .ce-column {
    float: none;
    margin-right: 0;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-textpic:not(.ce-intext) .ce-gallery .ce-column,
.jf-body :is(.jf-content-main, .jf-stage) .frame :is(.ce-above, .ce-below, .ce-image) .ce-gallery .ce-column {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-textpic:not(.ce-intext) :is(.ce-gallery img.image-embed-item, .ce-textpic img.image-embed-item, figure.image img.image-embed-item),
.jf-body :is(.jf-content-main, .jf-stage) .frame :is(.ce-above, .ce-below, .ce-image) :is(.ce-gallery img.image-embed-item, figure.image img.image-embed-item) {
    max-width: 100%;
    height: auto;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-textpic:not(.ce-intext) .ce-gallery img.image-embed-item,
.jf-body :is(.jf-content-main, .jf-stage) .frame :is(.ce-above, .ce-below, .ce-image) .ce-gallery img.image-embed-item {
    width: 100% !important;
    height: auto;
}

/* ce-intext: nur Typografie (keine width/flex/float/margin/padding/overflow in jump-fly.css) */
.jf-body :is(.jf-content-main, .jf-stage) .frame .ce-intext .ce-gallery :is(figcaption, .image-caption) {
    text-align: left;
}

@media (max-width: 768px) {
    .jf-body .jf-content-main .frame .ce-gallery .ce-row {
        flex-wrap: wrap;
    }

    .jf-body .jf-content-main .frame .ce-gallery .ce-column,
    .jf-body .jf-content-main .frame .ce-gallery .ce-column[style*="width"] {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
}

.jf-body :is(.jf-content-main, .jf-stage) .frame video.video-embed-item {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    box-shadow: 0 0 0 2px #0d587f, 0 8px 24px rgba(0, 0, 0, 0.25);
}

.jf-nav-below-slider__bar {
    width: 100%;
    max-width: none;
    margin: 0;
}

.jf-nav-below-slider .ibl-header__inner {
    box-sizing: border-box;
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
}

.jf-nav-below-slider .ibl-nav-desktop__link,
.jf-nav-below-slider .ibl-nav-desktop__toggle {
    color: #fff;
}

.jf-nav-below-slider .ibl-nav-desktop__item {
    background-image: linear-gradient(#fff, #fff);
}

.jf-nav-below-slider .ibl-nav-desktop__link:hover,
.jf-nav-below-slider .ibl-nav-desktop__toggle:hover,
.jf-nav-below-slider .ibl-nav-desktop__item:hover > .ibl-nav-desktop__link,
.jf-nav-below-slider .ibl-nav-desktop__item:hover > .ibl-nav-desktop__toggle,
.jf-nav-below-slider .ibl-nav-desktop__item.is-active > .ibl-nav-desktop__link,
.jf-nav-below-slider .ibl-nav-desktop__item.is-open > .ibl-nav-desktop__link {
    color: rgba(255, 255, 255, 0.92);
}

/* Aktuelle Seite: helles Blau auf blauer Leiste (kein Rot/Marken-Brand) */
.jf-nav-below-slider .ibl-nav-desktop__item.is-current > .ibl-nav-desktop__link,
.jf-nav-below-slider .ibl-nav-desktop__link.is-current,
.jf-nav-below-slider .ibl-nav-mobile__link.is-current {
    color: #b8e8ff;
}

.jf-nav-below-slider .ibl-nav-mobile__toggle-line {
    background: #fff;
}

.jf-footer {
    margin-top: 2rem;
}

.jf-footer .ibl-footer__contact {
    text-align: left;
}

@media (min-width: 768px) {
    .jf-footer .ibl-footer__contact {
        text-align: left;
    }

    .jf-footer .ibl-footer__contact .ce-bodytext table,
    .jf-footer .ibl-footer__contact table,
    .jf-footer .ibl-footer__contact figure.table {
        margin-left: 0;
    }
}

/* Original-Layout: Kontakt links, Footer-Menü rechts */
.jf-footer__grid {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .jf-footer__grid {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 2rem 3rem;
    }

    .jf-footer .ibl-footer__nav {
        text-align: right;
        justify-self: end;
    }

    .jf-footer .ibl-footer__menu {
        justify-content: flex-end;
    }
}

.jf-footer__text {
    margin: 0;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

/* Hero-Box (CE 21–23 u. a.): schmales Band, kein Abstand nach unten, Cover trotz Jump-Fly-Bildregeln */
.jf-body .jf-content-main .ibl-content__inner {
    gap: 0;
}

.jf-body .jf-content-main .frame-hero-box {
    margin: 0;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame-hero-box :is(.ce-gallery, .ce-textpic, .ce-image, .ce-row) {
    overflow: hidden;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame-hero-box.ce-above .ce-gallery,
.jf-body :is(.jf-content-main, .jf-stage) .frame-hero-box .ce-gallery {
    margin: 0;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame-hero-box .ce-textpic {
    position: relative;
    height: 100%;
}

.jf-body :is(.jf-content-main, .jf-stage) .frame-hero-box :is(.ce-gallery img.image-embed-item, .ce-textpic img.image-embed-item, figure.image img.image-embed-item) {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    border-radius: 0;
    box-shadow: none;
}

/* Hero-Box in .jf-stage: Vollbreite-Cover auch auf Mobile */
@media (max-width: 768px) {
    .jf-body .jf-stage .frame-hero-box .ce-column,
    .jf-body .jf-stage .frame-hero-box .ce-column[style*="width"] {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .jf-body .jf-stage .frame-hero-box .ce-gallery img,
    .jf-body .jf-stage .frame-hero-box .image-embed-item {
        max-width: none !important;
        width: 100% !important;
        margin-inline: 0;
    }
}
