/* Vista ricetta: hero bianco, descrizione pattern Club, brand rosso, video/suggerite bianco, procedimento fucsia scuro */

body.page-ricetta-vista {
    background-color: #7a1430;
}

.ricetta-view-page {
    --rv-brand: #7a1430;
    --rv-burgundy: #551d30;
    --rv-hero-ink: #2d181f;
    --rv-proc-bg: #4a0f22;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    background: var(--rv-brand);
    color: rgba(255, 255, 255, 0.95);
}

.ricetta-view-hero-band {
    background: #fff;
    color: var(--rv-hero-ink);
    padding: 20px 0 40px;
}

.ricetta-view-content-band {
    background: var(--rv-brand);
    color: rgba(255, 255, 255, 0.95);
    padding: 0px 0 0;
}

.ricetta-view-wrap {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.ricetta-view-wrap--hero {
    width: min(1100px, calc(100% - 32px));
}

.ricetta-view-wrap--content {
    width: min(1080px, calc(100% - 28px));
}

/* Breadcrumb rimosso su richiesta */

/* Hero: colonna foto = larghezza copertina; info subito a destra senza “buco” tra foto e titolo */
.ricetta-view-hero {
    display: grid;
    grid-template-columns: max-content minmax(260px, 1fr);
    gap: clamp(12px, 2vw, 28px);
    align-items: start;
}

/* Il riquadro (ombra/sfondo) segue la foto: non occupa tutta la colonna della griglia */
.ricetta-view-hero-media {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    background: #f4f0f2;
    box-shadow: 0 18px 40px rgba(45, 24, 31, 0.12);
    align-self: start;
    justify-self: start;
    width: fit-content;
    max-width: 70%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Copertina: proporzioni naturali; limite larghezza sul contenitore .ricetta-view-hero-media (max-width %) */
.ricetta-view-hero-image {
    display: block;
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: min(88vh, 960px);
    margin: 0;
    object-fit: contain;
    border: 0;
    vertical-align: middle;
}

.ricetta-view-hero-placeholder {
    box-sizing: border-box;
    min-width: min(100%, 280px);
    min-height: 240px;
    display: grid;
    place-items: center;
    color: rgba(85, 29, 48, 0.55);
    font-size: 15px;
    text-align: center;
    padding: 20px;
}

.ricetta-view-hero-aside {
    padding-top: 4px;
    min-width: 0;
}

.ricetta-view-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 16px;
    margin: 0 0 8px;
}

.ricetta-view-title {
    margin: 0;
    flex: 1 1 200px;
    min-width: 0;
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    font-size: clamp(30px, 4.2vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    color: #4a0f22;
}

.ricetta-view-gratis-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-top: 6px;
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #166534;
    background: linear-gradient(145deg, #e8f8ec 0%, #d4f0dc 100%);
    border: 1px solid rgba(26, 92, 46, 0.35);
}

.ricetta-view-gratis-badge__icon {
    display: flex;
    color: #15803d;
}

.ricetta-view-gratis-badge__text {
    line-height: 1;
}

.ricetta-view-meta-list {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
}

.ricetta-view-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.35;
    font-weight: 400;
    color: var(--rv-hero-ink);
}

.ricetta-view-meta-icon {
    width: 28px;
    flex-shrink: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

.ricetta-view-meta-svg {
    display: block;
    width: 24px;
    height: 24px;
}

.ricetta-view-meta-icon-img {
    display: block;
    width: 28px;
    height: 28px;
    object-fit: contain;
    object-position: center;
}

.ricetta-view-meta-icon--euro {
    font-size: 17px;
    font-weight: 700;
    color: var(--rv-burgundy);
    line-height: 1;
    font-family: system-ui, sans-serif;
}

.ricetta-view-meta-label {
    font-weight: 700;
    color: #4a0f22;
}

.ricetta-view-meta-value {
    color: var(--rv-hero-ink);
}

.ricetta-view-meta-row--intolleranze {
    align-items: flex-start;
}

.ricetta-view-meta-row--intolleranze .ricetta-view-meta-icon {
    color: #5a7568;
}

.ricetta-view-meta-value--intolleranze {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 160px;
    min-width: 0;
}

.ricetta-view-meta-intol {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2a3d32;
    background: linear-gradient(180deg, #e8f1ea 0%, #cddfd2 100%);
    border: 1px solid rgba(72, 105, 88, 0.38);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.ricetta-view-categories-block {
    margin-top: 28px;
}

.ricetta-view-cat-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--rv-burgundy);
}

.ricetta-view-cat-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--rv-burgundy);
    opacity: 0.45;
}

.ricetta-view-cat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ricetta-view-cat-pill {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rv-burgundy);
    background: linear-gradient(180deg, #fdeef4 0%, #f5dce6 100%);
    border: 1px solid rgba(85, 29, 48, 0.14);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

/* Full-bleed band (video, procedimento, suggerite) */
.ricetta-view-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    box-sizing: border-box;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
}

.ricetta-view-bleed--white {
    background: #fff;
    color: var(--rv-hero-ink);
    padding-top: 28px;
    padding-bottom: 32px;
}

.ricetta-view-bleed--procedimento {
    background: #faf6f8;
    color: var(--rv-proc-bg);
    padding-top: 28px;
    padding-bottom: clamp(44px, 6vw, 64px);
    margin-top: 4px;
}

.ricetta-view-bleed--suggested {
    margin-top: 0;
    padding-top: 32px;
    padding-bottom: 48px;
}

/* Descrizione: fascia bianca + pattern a tutta larghezza, testo più largo del blocco centrale */
.ricetta-view-bleed--descrizione {
    padding-top: 28px;
    padding-bottom: 32px;
    margin-bottom: 8px;
    background-color: #fff;
    background-image: url("../images/ricette-dolci-pattern.jpeg");
    background-repeat: repeat;
    background-size: 480px 360px;
    color: #2d2724;
}

.ricetta-view-wrap--descrizione-wide {
    width: min(1200px, calc(100% - 8px));
    margin: 0 auto;
}

.ricetta-view-section--descrizione {
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.ricetta-view-section--descrizione .ricetta-view-text {
    color: #2d2724;
}

.ricetta-view-section-title--pattern {
    color: var(--rv-burgundy);
}

/* Ingredienti a sinistra, video a destra — colonna video più larga (~58% della riga) */
.ricetta-view-ingredienti-video-row {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(340px, 1.28fr);
    gap: 0;
    align-items: start;
}

.ricetta-view-section--ingredienti {
    padding: 28px 20px 32px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0;
}

.ricetta-view-video-aside {
    background: #fff;
    color: var(--rv-hero-ink);
    border-left: 1px solid rgba(85, 29, 48, 0.12);
    padding: 16px 14px 20px 16px;
    align-self: start;
    min-width: 0;
}

.ricetta-view-video-aside .ricetta-view-section--video-block {
    display: block;
}

.ricetta-view-section--on-brand {
    padding: 28px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ricetta-view-wrap--content>.ricetta-view-ingredienti-video-row:first-child .ricetta-view-section--ingredienti {
    border-top: 0;
    padding-top: 8px;
}

/* Fascia ingredienti + video: brand, testo bianco come il resto della pagina, video 9:16 vicino al testo */
.ricetta-view-bleed--ingredienti-video {
    background: var(--rv-brand);
    color: rgba(255, 255, 255, 0.95);
    padding-top: clamp(28px, 4vw, 48px);
    padding-bottom: clamp(32px, 5vw, 56px);
    margin-top: 0;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-ingredienti-video-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: clamp(6px, 1.2vw, 16px);
    align-items: start;
    justify-content: start;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-section--on-brand .ricetta-view-section-title {
    color: #fff;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-ingredient-line {
    margin-bottom: 10px;
    line-height: 1.72;
    color: rgba(255, 255, 255, 0.96);
    font-size: inherit;
    font-family: inherit;
    font-weight: 400;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-section--ingredienti {
    border-top: 0;
    padding: 8px 8px 8px 0;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-section--on-brand {
    border-top: 0;
    padding-top: 8px;
    padding-bottom: 8px;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-video-aside {
    background: transparent;
    border-left: 0;
    padding: 8px 0 8px 4px;
    color: rgba(255, 255, 255, 0.95);
    justify-self: start;
    width: max-content;
    max-width: 100%;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-video-player {
    aspect-ratio: 9 / 16;
    max-height: min(78vh, 640px);
    width: 360px;
    max-width: 100%;
    margin-left: 0;
    margin-right: auto;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-link--ingredienti-video-band {
    color: #fff;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-link--ingredienti-video-band:hover {
    color: #fdeef2;
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-muted--ingredienti-video-band {
    color: rgba(255, 255, 255, 0.72);
}

.ricetta-view-bleed--ingredienti-video .ricetta-view-muted-on-light.ricetta-view-muted--ingredienti-video-band {
    color: rgba(255, 255, 255, 0.72);
}

.ricetta-view-section--last {
    padding-bottom: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ricetta-view-section-title {
    margin: 0 0 14px;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.2;
    font-weight: 700;
}

.ricetta-view-section--on-brand .ricetta-view-section-title {
    color: #fff;
}

.ricetta-view-section-title--on-light {
    color: var(--rv-burgundy);
}

.ricetta-view-section--video-block {
    padding: 0;
}

/* Player 16:9 a tutta larghezza colonna (video verticali Vimeo: bande laterali sono dentro l’embed 16:9) */
.ricetta-view-video-player {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #0f0f0f;
    box-shadow: 0 8px 28px rgba(45, 24, 31, 0.18);
}

.ricetta-view-video-player .ricetta-view-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.ricetta-view-video-player video.ricetta-view-video {
    object-fit: contain;
    background: #000;
}

.ricetta-view-text {
    white-space: pre-wrap;
    line-height: 1.72;
}

a.ricetta-view-text-link {
    color: var(--rv-brand);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    word-break: break-word;
}

a.ricetta-view-text-link:hover {
    color: var(--rv-burgundy);
}

a.ricetta-view-text-link:focus-visible {
    outline: 2px solid var(--rv-brand);
    outline-offset: 2px;
}

.ricetta-view-text--on-dark a.ricetta-view-text-link {
    color: #fff;
}

.ricetta-view-text--on-dark a.ricetta-view-text-link:hover {
    color: #fdeef2;
}

.ricetta-view-text--on-dark a.ricetta-view-text-link:focus-visible {
    outline-color: #fff;
}

.ricetta-view-ingredients {
    margin: 0;
    padding: 0;
}

.ricetta-view-ingredient-line {
    margin-bottom: 8px;
    line-height: 1.75;
    padding-left: 0;
}

.ricetta-view-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.ricetta-view-panel {
    border-radius: 12px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ricetta-view-panel h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

/* iframe video usato solo dentro .ricetta-view-video-player */
.ricetta-view-video {
    border: 0;
    background: #000;
}

.ricetta-view-link {
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ricetta-view-link:hover {
    color: #fdeef2;
}

.ricetta-view-link-on-light {
    color: var(--rv-burgundy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ricetta-view-link-on-light:hover {
    color: #7a1430;
}

.ricetta-view-muted {
    color: rgba(255, 255, 255, 0.72);
}

.ricetta-view-muted-on-light {
    color: rgba(85, 29, 48, 0.65);
}

/* Procedimento: sfondo chiarissimo, testo colore fucsia scuro originario */
.ricetta-view-section--procedimento-inner {
    padding: 0 0 8px;
}

.ricetta-view-section--procedimento-inner .ricetta-view-section-title--procedimento {
    color: var(--rv-proc-bg);
}

.ricetta-view-step {
    border-radius: 0;
    border: 0;
    background: transparent;
    padding: 22px 0;
    margin-bottom: 0;
    border-top: 1px solid rgba(74, 15, 34, 0.12);
}

.ricetta-view-step:first-of-type {
    border-top: 0;
    padding-top: 8px;
}

.ricetta-view-step-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.ricetta-view-step-photo {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(74, 15, 34, 0.06);
    aspect-ratio: 4 / 3;
    min-height: 0;
}

.ricetta-view-step-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border: 0;
    vertical-align: middle;
}

.ricetta-view-step-num {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: var(--rv-proc-bg);
    border: 1px solid rgba(74, 15, 34, 0.35);
    line-height: 1;
}

.ricetta-view-text--procedimento {
    color: var(--rv-proc-bg);
}

.ricetta-view-muted-proc {
    color: rgba(74, 15, 34, 0.62);
}

.ricetta-view-conservazione-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(20px, 4vw, 40px);
    align-items: start;
}

.ricetta-view-conservazione-heading {
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(17px, 2vw, 20px);
    font-weight: 700;
}

.ricetta-view-conservazione-col .ricetta-view-text--on-dark {
    color: rgba(255, 255, 255, 0.94);
}

.ricetta-view-section--conservazione-blocco.ricetta-view-section--on-brand {
    margin-top: clamp(12px, 2vw, 24px);
    padding-top: clamp(32px, 4.5vw, 56px);
    padding-bottom: clamp(14px, 2vw, 22px);
}

.ricetta-view-section--recensioni.ricetta-view-section--on-brand {
    margin-top: clamp(28px, 4vw, 52px);
    padding-top: clamp(24px, 3.5vw, 40px);
    padding-bottom: clamp(12px, 2vw, 20px);
}

/* Ricette suggerite: 4 card, foto in formato verticale + titolo */
.ricetta-view-section--suggested-block {
    padding: 0;
}

.ricetta-view-suggested-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 2.5vw, 22px);
}

.ricetta-view-suggested-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-decoration: none;
    color: var(--rv-burgundy);
    border-radius: 14px;
    overflow: hidden;
    background: #fdf8fa;
    border: 1px solid rgba(85, 29, 48, 0.14);
    box-shadow: 0 6px 20px rgba(45, 24, 31, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ricetta-view-suggested-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(45, 24, 31, 0.12);
    color: #7a1430;


}

.ricetta-view-suggested-card__media {
    position: relative;
    aspect-ratio: 3 / 4;
    width: 100%;
    background: #f0e8ec;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ricetta-view-suggested-card__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.ricetta-view-suggested-card__placeholder {
    font-size: 13px;
    font-weight: 600;
    color: rgba(85, 29, 48, 0.45);
}

.ricetta-view-suggested-card__title {
    display: block;
    padding: 12px 12px 14px;
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(14px, 1.35vw, 17px);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    color: inherit;
}

@media (max-width: 900px) {
    .ricetta-view-hero {
        grid-template-columns: 1fr;
    }

    .ricetta-view-hero-aside {
        order: 2;
    }

    .ricetta-view-hero-media {
        order: 1;
        justify-self: center;
        max-width: min(70%, 100%);
    }

    .ricetta-view-grid-2 {
        grid-template-columns: 1fr;
    }

    .ricetta-view-ingredienti-video-row {
        grid-template-columns: 1fr;
    }

    .ricetta-view-bleed--ingredienti-video .ricetta-view-ingredienti-video-row {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .ricetta-view-section--ingredienti {
        padding: 24px 0 20px;
    }

    .ricetta-view-bleed--ingredienti-video .ricetta-view-section--ingredienti {
        padding: 20px 0 8px;
    }

    .ricetta-view-video-aside {
        border-left: 0;
        border-top: 1px solid rgba(85, 29, 48, 0.12);
        padding: 22px 16px 26px;
    }

    .ricetta-view-bleed--ingredienti-video .ricetta-view-video-aside {
        width: 100%;
        max-width: 100%;
        justify-self: center;
        padding: 24px 0 0;
        border-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .ricetta-view-bleed--ingredienti-video .ricetta-view-video-player {
        margin-left: auto;
        margin-right: auto;
    }

    .ricetta-view-conservazione-grid {
        grid-template-columns: 1fr;
    }

    /* Procedimento: resta 3 colonne anche su mobile */
    .ricetta-view-step-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .ricetta-view-step-num {
        top: 5px;
        left: 5px;
        min-width: 24px;
        height: 24px;
        font-size: 11px;
        padding: 0 6px;
    }

    /* Ricette suggerite: scorrimento orizzontale, 2 card visibili */
    .ricetta-view-suggested-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        overscroll-behavior-x: contain;
        padding-bottom: 8px;
    }

    .ricetta-view-suggested-card {
        flex: 0 0 calc(50% - 5px);
        min-width: calc(50% - 5px);
        max-width: calc(50% - 5px);
        scroll-snap-align: start;
    }
}

@media (max-width: 520px) {
    .ricetta-view-hero-band {
        padding: 16px 0 28px;
    }

    .ricetta-view-bleed--descrizione {
        padding-top: 22px;
        padding-bottom: 24px;
    }
}