/* ═══════════════════════════════════════════════════════════
   REZEPT-EINZELSEITE
   Farben/Schriften kommen aus den Design-Einstellungen
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   REZEPT-EINZELSEITE
   ═══════════════════════════════════════════════════════════ */

.rzs-article {
    font-family: var(--rz-font, 'Inter', sans-serif);
    color: var(--rz-color-text, #1a1a1a);
    width: 90%;
    max-width: 1290px;
    margin: 0 auto;
    padding: 48px 0 80px;
    line-height: 1.6;
}

/* ── HERO ─────────────────────────────────────────────────── */

.rzs-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
    margin-bottom: 72px;
}

.rzs-hero-text {
    padding-top: 8px;
}

/* Zurück-Link */
.rzs-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--rz-color-muted, #8a8a8a);
    text-decoration: none;
    margin-bottom: 28px;
    transition: color 0.18s;
    letter-spacing: 0.01em;
}
.rzs-back:hover { color: var(--rz-color-text, #1a1a1a); }
.rzs-back-arrow { transition: transform 0.18s; display: inline-block; }
.rzs-back:hover .rzs-back-arrow { transform: translateX(-3px); }

/* Tags */
.rzs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.rzs-tag {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--rz-color-muted, #8a8a8a);
}
.rzs-tag + .rzs-tag::before {
    content: '·';
    margin-right: 10px;
    color: #ddd;
}

/* Titel */
.rzs-title {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: clamp(30px, 4.2vw, 46px);
    font-weight: var(--rz-weight-heading, 600);
    line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0 0 20px;
    color: var(--rz-color-text, #1a1a1a);
}

/* Beschreibung */
.rzs-summary {
    font-size: 16px;
    line-height: 1.7;
    color: var(--rz-color-muted, #8a8a8a);
    font-weight: var(--rz-weight-body, 300);
    margin-bottom: 32px;
}
.rzs-summary p { margin: 0 0 14px; }
.rzs-summary p:last-child { margin-bottom: 0; }

/* Meta-Leiste */
.rzs-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid var(--rz-color-line, #e8e8e8);
    border-bottom: 1px solid var(--rz-color-line, #e8e8e8);
    padding: 20px 0;
    margin-bottom: 28px;
}
.rzs-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 32px;
    margin-right: 32px;
    border-right: 1px solid var(--rz-color-line, #e8e8e8);
}
.rzs-meta-item:last-child {
    border-right: none;
    padding-right: 0;
    margin-right: 0;
}
.rzs-meta-label {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--rz-color-muted, #8a8a8a);
    font-weight: 500;
}
.rzs-meta-value {
    font-size: 15px;
    font-weight: var(--rz-weight-heading, 600);
    color: var(--rz-color-text, #1a1a1a);
}

/* Aktionen */
.rzs-hero-actions {
    display: flex;
    gap: 12px;
}
.rzs-btn {
    font-family: var(--rz-font, 'Inter', sans-serif);
    font-size: 13px;
    font-weight: 500;
    padding: 11px 24px;
    border-radius: var(--rz-btn-radius, 0px);
    border: 1.5px solid var(--rz-color-accent, #1a1a1a);
    background: transparent;
    color: var(--rz-color-text, #1a1a1a);
    cursor: pointer;
    transition: all 0.18s;
    letter-spacing: 0.01em;
}
.rzs-btn:hover {
    background: var(--rz-color-accent, #1a1a1a);
    color: #fff;
}

/* Hero-Bild
   Die Höhe gibt die Grösse vor, die Breite ergibt sich aus dem
   Seitenverhältnis. So bleibt das Bild auf grossen Bildschirmen
   handlich und das Format stimmt immer. */
.rzs-hero-img-wrap {
    justify-self: center;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--rz-img-radius, 0px);
    line-height: 0;
}
/* Kein fester Rahmen mehr: Das Bild behält sein eigenes Format
   (quadratisch, hoch oder quer) und wird nur in Höhe und Breite
   begrenzt, nie zugeschnitten. */
.rzs-hero-img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(520px, 58vh);
}

/* ── BODY: Zutaten + Zubereitung ───────────────────────────── */

.rzs-body {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 72px;
    align-items: start;
    margin-bottom: 88px;
}

.rzs-section-title {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: 25px;
    font-weight: var(--rz-weight-heading, 600);
    margin: 0 0 24px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--rz-color-accent, #1a1a1a);
    color: var(--rz-color-text, #1a1a1a);
}

.rzs-group-name {
    font-family: var(--rz-font, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rz-color-muted, #8a8a8a);
    margin: 26px 0 12px;
}
.rzs-group-name:first-of-type { margin-top: 0; }

/* ── Zutaten ── */

.rzs-ingredients-inner {
    position: sticky;
    top: 32px;
}

.rzs-ing-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rzs-ing-item {
    border-bottom: 1px solid var(--rz-color-line, #e8e8e8);
}
.rzs-ing-item:last-child { border-bottom: none; }

.rzs-ing-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    cursor: pointer;
    transition: opacity 0.18s;
}
.rzs-ing-check {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.rzs-ing-box {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--rz-color-line, #e8e8e8);
    border-radius: var(--rz-btn-radius, 0px);
    margin-top: 3px;
    position: relative;
    transition: all 0.15s;
}
.rzs-ing-check:checked + .rzs-ing-box {
    background: var(--rz-color-accent, #1a1a1a);
    border-color: var(--rz-color-text, #1a1a1a);
}
.rzs-ing-check:checked + .rzs-ing-box::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.rzs-ing-check:checked ~ .rzs-ing-text {
    opacity: 0.35;
    text-decoration: line-through;
}

.rzs-ing-text {
    font-size: 15px;
    line-height: 1.5;
    transition: opacity 0.18s;
}
.rzs-ing-amount {
    font-weight: var(--rz-weight-heading, 600);
    color: var(--rz-color-text, #1a1a1a);
    margin-right: 5px;
}
.rzs-ing-name {
    font-weight: 400;
    color: var(--rz-color-text, #1a1a1a);
}
.rzs-ing-notes {
    display: block;
    font-size: 13px;
    color: var(--rz-color-muted, #8a8a8a);
    font-style: italic;
    margin-top: 2px;
}

/* ── Zubereitung ── */

.rzs-step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: step;
}
.rzs-step {
    display: flex;
    gap: 22px;
    padding: 0 0 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid var(--rz-color-line, #e8e8e8);
}
.rzs-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.rzs-step-no {
    flex-shrink: 0;
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: 22px;
    font-weight: var(--rz-weight-heading, 600);
    color: #ddd;
    line-height: 1;
    width: 34px;
    padding-top: 2px;
}

.rzs-step-text {
    font-size: 16px;
    line-height: 1.75;
    color: var(--rz-color-text, #1a1a1a);
    font-weight: var(--rz-weight-body, 300);
}
.rzs-step-text p { margin: 0 0 12px; }
.rzs-step-text p:last-child { margin-bottom: 0; }

/* ── Notizen ── */

.rzs-notes {
    background: var(--rz-color-bg-soft, #fafafa);
    border-left: 2.5px solid var(--rz-color-accent, #1a1a1a);
    padding: 24px 28px;
    margin-top: 44px;
}
.rzs-notes-title {
    font-family: var(--rz-font, 'Inter', sans-serif);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rz-color-text, #1a1a1a);
    margin: 0 0 12px;
}
.rzs-notes-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--rz-color-muted, #8a8a8a);
    font-weight: var(--rz-weight-body, 300);
}
.rzs-notes-text p { margin: 0 0 10px; }
.rzs-notes-text p:last-child { margin-bottom: 0; }

/* ── Quelle ── */

.rzs-credits {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--rz-color-line, #e8e8e8);
}
.rzs-source,
.rzs-copyright {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--rz-color-muted, #8a8a8a);
}
.rzs-source    { font-style: italic; }
.rzs-copyright { margin-top: 3px; }

/* ── WEITERE REZEPTE ───────────────────────────────────────── */

.rzs-related {
    border-top: 1px solid var(--rz-color-line, #e8e8e8);
    padding-top: 56px;
}
.rzs-related-title {
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 36px;
}

.rzs-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.rzs-related-card {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.22s ease;
}
.rzs-related-card:hover {
    transform: translateY(-4px);
    color: inherit;
}

.rzs-related-img-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f2f2f2;
    margin-bottom: 14px;
    border-radius: var(--rz-img-radius, 0px);
}
.rzs-related-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.rzs-related-card:hover .rzs-related-img-wrap img {
    transform: scale(1.04);
}
.rzs-related-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: #f5f5f5;
}

.rzs-related-name {
    font-family: var(--rz-font-heading, 'Inter', sans-serif);
    font-size: 16px;
    font-weight: var(--rz-weight-heading, 600);
    line-height: 1.35;
    margin: 0 0 6px;
    color: var(--rz-color-text, #1a1a1a);
}
.rzs-related-time {
    font-size: 12px;
    color: var(--rz-color-muted, #8a8a8a);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 980px) {
    .rzs-hero {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .rzs-hero-img-wrap {
        order: -1;
        justify-self: center;
    }
    .rzs-hero-img {
        max-width: min(100%, 560px);
        max-height: 70vh;
    }
    .rzs-body {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .rzs-ingredients-inner { position: static; }
}

@media (max-width: 640px) {
    .rzs-article { padding: 28px 0 56px; }
    .rzs-meta {
        gap: 18px 0;
    }
    .rzs-meta-item {
        flex: 0 0 50%;
        padding-right: 16px;
        margin-right: 0;
        border-right: none;
    }
    .rzs-related-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .rzs-step { gap: 14px; }
    .rzs-step-no { font-size: 21px; width: 26px; }
}

/* ═══════════════════════════════════════════════════════════
   DRUCK
   ═══════════════════════════════════════════════════════════ */

@media print {

    /* Nur Theme-Elemente ausblenden.
       Ein blankes "header" würde auch .rzs-hero treffen, in dem
       Titelbild, Titel und Zeiten stecken. */
    .rzs-back,
    .rzs-hero-actions,
    .rzs-related,

    /* Divi: klassischer Header/Footer und Theme-Builder-Bereiche */
    #main-header, #top-header, #et-top-navigation,
    #main-footer, #footer-widgets, #footer-bottom, #et-footer-nav,
    .et-l--header, .et-l--footer,
    .et_pb_menu, .et-social-icons, .et_pb_scroll_top,

    /* Andere Themes */
    .site-header, .site-footer, #colophon, #masthead,
    [role="banner"], [role="contentinfo"],

    /* Jeder footer-Tag ist sicher: das Rezept selbst enthält keinen.
       Beim header geht das nicht, weil .rzs-hero ein header ist. */
    footer, nav,
    body > header,

    /* Cookie-Banner und Admin-Leiste */
    #wpadminbar, .cmplz-cookiebanner, #cookie-notice, #BorlabsCookieBox,
    .cky-consent-container, #CybotCookiebotDialog {
        display: none !important;
    }

    /* Divi reserviert oben Platz für den festen Header */
    #page-container, #et-main-area, #main-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }
    html { margin-top: 0 !important; }

    /* Kopfbereich des Rezepts gehört ausdrücklich mit aufs Papier */
    .rzs-hero,
    .rzs-hero-text,
    .rzs-hero-img-wrap {
        display: block !important;
        visibility: visible !important;
    }

    /* Bilder und Flächen mitdrucken, statt sie wegzulassen */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .rzs-article {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    /* Kopf zweispaltig: Bild links, Text rechts */
    .rzs-hero {
        display: grid !important;
        grid-template-columns: 200px 1fr;
        gap: 22px;
        margin-bottom: 26px;
        align-items: start;
        break-inside: avoid;
    }
    .rzs-hero-text { order: 2; padding-top: 0; }

    .rzs-hero-img-wrap {
        order: 1;
        break-inside: avoid;
    }
    .rzs-hero-img {
        display: block !important;
        width: auto !important;
        height: auto !important;
        max-width: 200px !important;
        max-height: 240px !important;
    }

    .rzs-title   { font-size: 20pt; margin-bottom: 10px; }
    .rzs-summary { font-size: 10pt; margin-bottom: 14px; }
    .rzs-meta    { padding: 10px 0; margin-bottom: 0; }

    .rzs-body {
        grid-template-columns: 240px 1fr;
        gap: 32px;
    }
    .rzs-ingredients-inner { position: static !important; }

    .rzs-ing-box   { display: none; }
    .rzs-ing-label { gap: 0; }
    .rzs-step      { break-inside: avoid; }
    .rzs-notes     { break-inside: avoid; }
    .rzs-credits   { break-inside: avoid; margin-top: 24px; }

    /* Umbrüche an sinnvollen Stellen */
    .rzs-section-title { break-after: avoid; }
}
