/*
 * Hofladen – 10 Kopfbild
 * Startseite › Elementgruppe „Start-Kopfbild“ (CSS-Klasse „kopfbild“, ID „start“).
 * Inhalt: Bild, Text (Überschrift h1 + Absatz), zwei Hyperlinks „knopf“, Text „telefon“.
 * Der Text steht rechts in einer 470 px breiten Spalte, das Foto füllt die ganze Fläche.
 */

.kopfbild {
    --rechts: max(var(--hl-rand), (100% - var(--hl-breite)) / 2);
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-end;
    min-height: min(78vh, 640px);
    padding: 48px var(--rechts) clamp(36px, 6vw, 72px) max(var(--hl-rand), 100% - var(--rechts) - 470px);
    overflow: hidden;
    color: #fff;
}

.kopfbild > * {
    position: relative;
    z-index: 1;
    flex: 0 0 100%;
}

.kopfbild > .content-hyperlink {
    flex: 0 0 auto;
}

/* Foto 12 % breiter, rechtsbündig: so rücken die Motive nach links und lassen rechts Platz für Text */
.kopfbild > .content-image {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.kopfbild > .content-image img {
    position: absolute;
    top: 0;
    right: 0;
    width: 112%;
    max-width: none;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

/* Abdunklung rechts, damit der Text lesbar bleibt */
.kopfbild::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(270deg, rgba(0, 0, 0, .7), rgba(0, 0, 0, .15) 60%),
        linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .3));
}

.kopfbild h1 em {
    color: var(--hl-gruen-zart);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .45);
}

.kopfbild p {
    max-width: 40ch;
    margin: 0 0 1.4em;
    font-size: 1.15rem;
}

/* Ruhiger Hinweis fürs Telefon unter den Knöpfen */
.kopfbild .telefon p {
    margin: .6em 0 0;
    font-size: 1rem;
}

.kopfbild .telefon a {
    color: var(--hl-gruen-zart);
    font-weight: 600;
    white-space: nowrap;
}

/* Handy: ganzes Foto, Ausschnitt auf die Hühner, Text links */
@media (max-width: 520px) {
    .kopfbild {
        padding-left: var(--hl-rand);
    }

    .kopfbild > .content-image img {
        width: 100%;
        object-position: 38% center;
    }

    .kopfbild::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, .15), rgba(0, 0, 0, .65));
    }
}
