/* Use the logo green for the native Bootstrap borders on the leisure page. */
.freizeit-alias .astroid-article-text .border {
    --bs-border-color: #7e9760;
}

/* Homepage hero: native Joomla custom module supplies the background image. */
.schauer-hero > .mod-custom {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
    aspect-ratio: 11403 / 4195;
    box-sizing: border-box;
    padding: 32px;
    background-size: 100% auto;
    background-position: left top;
    background-repeat: no-repeat;
    color: #fff;
}

/* Keep Joomla's native breadcrumb markup and wrapping; replace the demo border. */
.mod-breadcrumbs {
    --bs-breadcrumb-divider-color: #7e9760;
    --bs-breadcrumb-item-active-color: #5a482f;
    border: 0;
    border-radius: 0;
    background-color: #f7f5ef;
    color: #5a482f;
    font-size: 1rem;
    line-height: 1.6;
    margin-block: 16px;
}

.mod-breadcrumbs a {
    color: #53683f;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.mod-breadcrumbs a:is(:hover, :focus-visible) {
    color: #5a482f;
}

/* Shared header geometry keeps logo and navigation aligned on every page. */
.astroid-header-section {
    position: relative;
    /* Balance the menu above the inset ribbon; override native section-ID padding. */
    padding-block: 15px 27px !important;
}

/* Decorative ribbons stay below the header's existing logo/navigation layer. */
.astroid-header-section::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: -4px;
    height: 16px;
    z-index: 1;
    background-color: inherit;
    background-image: url("../images/header-linien.svg");
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    pointer-events: none;
}

#astroid-header {
    padding-block: 0;
}

#astroid-header > .d-flex {
    height: 72px;
}

#astroid-header .logo-wrapper {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    padding: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 18px rgb(28 38 23 / 10%);
    transform: translateY(56px);
}

@media (min-width: 992px) {
    #astroid-header .logo-wrapper {
        /* Match the visible sticky mark: 70px artwork in its 250px SVG box. */
        transform: translate(80px, 56px);
    }

}

#astroid-header .logo-wrapper :is(svg, img) {
    width: 168px;
    height: 168px;
    max-height: none;
    object-fit: contain;
}

/* Centre a white disc behind the sticky artwork, including wide SVG boxes. */
#astroid-sticky-header .logo-wrapper {
    position: relative;
    isolation: isolate;
}

#astroid-sticky-header .logo-wrapper::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    height: calc(100% + 8px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #fff;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

/* Without a hero, reserve room below the same overlapping logo for page content. */
body:not(:has(.schauer-hero)) .astroid-header-section {
    margin-bottom: 116px;
}

.astroid-section:has(.schauer-hero) > .container-fluid {
    padding-inline: 0;
}

/* Full-width brand-colour gradient behind centred desktop copy; sky stays clear. */
@media (min-width: 992px) {
    .schauer-hero > .mod-custom::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: linear-gradient(
            180deg,
            transparent 45%,
            rgb(126 151 96 / 10%) 65%,
            rgb(90 72 47 / 40%) 100%
        );
        pointer-events: none;
    }
}

.schauer-hero h1 {
    margin: 0 0 16px;
    color: inherit;
    line-height: 1.15;
    text-wrap: balance;
}

.schauer-hero p {
    margin: 0;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.6;
}

@media (max-width: 991.98px) {
    .schauer-hero h1 {
        max-width: 850px;
        font-size: clamp(2rem, 3.5vw, 3.5rem);
    }

    .schauer-hero p {
        max-width: 650px;
    }

    .schauer-hero > .mod-custom {
        /* Keep the complete photograph above the text on narrow screens. */
        aspect-ratio: auto;
        padding: calc(100% * 4195 / 11403 + 24px) 24px 24px;
        background-color: #f7f5ef;
        color: #5a482f;
    }

}

@media (max-width: 991.98px) {
    #astroid-header > .d-flex {
        height: 80px;
    }

    #astroid-header .logo-wrapper {
        padding: 7px;
        transform: translateY(30px);
    }

    #astroid-header .logo-wrapper :is(svg, img) {
        width: 100px;
        height: 100px;
    }

    body:not(:has(.schauer-hero)) .astroid-header-section {
        margin-bottom: 48px;
    }
}
