/*
 * Site-owned homepage hero (index.php). Image, highlight and dates: inc/hero.php.
 * Accent colour comes from the active palette via .id-color.
 *
 * .hero--photo   default image, fills the screen; text in a calm band (top or bottom)
 * .hero--poster  highlight / Betriebsurlaub image, never cropped; text beside it
 * Below 993px (the theme's mobile breakpoint) both stack: image first, text below.
 */

.hero {
    position: relative;
    padding: 0;
    overflow: hidden;
    background: #0b0b0c;
    color: #fff;
}

.hero img {
    display: block;
}

/*
 * Animated with CSS, not WOW: on window load js/designesia.js fades every .animated
 * element to opacity 0 and only restores those within 300px of the top, which hid
 * the heading on phones once it moved below the image. Keyframes come from animate.css.
 */
.hero h1.style-3 {
    margin: 0;
    font-size: clamp(26px, 2.8vw, 38px);
    line-height: 1.15;
    letter-spacing: .12em;
    text-align: inherit;
    animation: zoomIn 1s .2s both;
}

@media (prefers-reduced-motion: reduce) {
    .hero h1.style-3 {
        animation: none;
    }
}

.hero__tagline {
    margin: 8px 0 0;
    font-size: 18px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .92);
}

.hero__hours {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .9);
}

.hero__highlight {
    margin: 0 0 22px;
    padding: 4px 0 4px 16px;
    border-left: 3px solid currentColor;
}

.hero__highlight-title {
    display: block;
    font-size: 19px;
    line-height: 1.35;
}

.hero__highlight-text {
    margin: 6px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: #fff;
}

.hero__highlight .btn-line {
    margin-top: 14px;
}

.hero--photo .hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- desktop ---------- */
@media (min-width: 993px) {
    .hero--photo {
        height: 100vh;
        min-height: 600px;
    }

    .hero--photo .hero__media {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
    }

    .hero--photo .hero__body {
        position: absolute;
        right: 0;
        left: 0;
        text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
    }

    /* the theme header is fixed and 80px tall on desktop */
    .hero--photo.hero--text-top .hero__body {
        top: 80px;
        padding: 44px 0 110px;
        background: linear-gradient(to bottom, rgba(0, 0, 0, .78), rgba(0, 0, 0, .4) 60%, rgba(0, 0, 0, 0));
    }

    .hero--photo.hero--text-bottom .hero__body {
        bottom: 0;
        padding: 130px 0 48px;
        background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, .5) 60%, rgba(0, 0, 0, 0));
    }

    .has-opal-promo .hero--photo.hero--text-bottom .hero__body {
        padding-bottom: calc(40px + var(--opal-promo-height));
    }

    .hero--photo .hero__text {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 48px;
    }

    .hero--photo.hero--text-top .hero__text {
        align-items: flex-start;
    }

    .hero--photo .hero__details {
        text-align: right;
    }

    .hero--poster {
        display: flex;
        align-items: center;
        min-height: 100vh;
        padding: 112px 0 40px;
    }

    .has-opal-promo .hero--poster {
        padding-bottom: calc(32px + var(--opal-promo-height));
    }

    .hero--poster .hero__body {
        width: 100%;
    }

    .hero--poster .hero__grid {
        display: flex;
        align-items: center;
        gap: 48px;
    }

    .hero--poster .hero__poster {
        flex: 0 1 auto;
        max-width: 62%;
        margin: 0;
    }

    .hero--poster .hero__poster img {
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: calc(100vh - 160px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, .6);
    }

    .has-opal-promo .hero--poster .hero__poster img {
        max-height: calc(100vh - 152px - var(--opal-promo-height));
    }

    .hero--poster .hero__text {
        flex: 1 1 0;
        min-width: 300px;
    }

    .hero--poster .hero__details {
        margin-top: 24px;
    }
}

/* ---------- tablet and phone: image first, text below, nothing overlaid ---------- */
@media (max-width: 992px) {
    .hero--photo .hero__media {
        position: relative;
        height: 75vw;          /* 4:3 */
        max-height: 60vh;
    }

    .hero--photo .hero__media img {
        position: absolute;
        top: 0;
        left: 0;
    }

    .hero__body {
        padding: 22px 0 36px;
        text-align: center;
    }

    .hero--poster .hero__body {
        padding-top: 0;
    }

    .hero--poster .hero__poster {
        margin: 0 -15px 22px;
    }

    .hero--poster .hero__poster img {
        width: 100%;
        height: auto;
    }

    .hero__details {
        margin-top: 18px;
    }

    .hero__highlight {
        display: inline-block;
        max-width: 520px;
        padding: 12px 0 0;
        border-top: 3px solid currentColor;
        border-left: 0;
    }
}
