/* Cascina Bonfiglio — SEZIONE: Listing Hero (Figma 23:1166 + 23:1604 + 23:1605).
   Vector 1 sfondo + titolo + breadcrumb sopra. */

.cb-listing-hero {
    position: relative;
    background-color: #FFF5E6;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    color: var(--cb-white);
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1845 / 616;
    max-height: 480px;
    min-height: 280px;
}
.cb-listing-hero__media {
    position: absolute;
    inset: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 0;
}
.cb-listing-hero img.cb-listing-hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    display: block;
    pointer-events: none;
}
/* Onda bianca Figma 23:1166 — copre il bordo inferiore del banner */
.cb-listing-hero__wave {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
    display: block;
}
/* Overlay scuro per garantire leggibilità del testo bianco sopra qualsiasi foto. */
.cb-listing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.18) 0%, rgba(0,0,0,.42) 100%);
    pointer-events: none;
    z-index: 1;
}

.cb-listing-hero__content {
    position: absolute;
    left: 0; right: 0;
    bottom: 20%;
    text-align: center;
    padding: 0 var(--cb-gutter);
    pointer-events: none;
    z-index: 4;
}

/* Figma 23:1604 — "Confetture" Nunito Sans Regular 53.4px / "Siciliane" Authority 76.7px.
   Authority non è disponibile come font web: usiamo Yellowtail (Google Font) che ha lo stesso
   feeling brush-script spesso e lineare del Figma. */
.cb-listing-hero__title {
    margin: 0 0 16px;
    font-family: var(--cb-font-body);
    font-weight: 400;
    font-size: 53.4px;
    line-height: 1.1;
    letter-spacing: 1.17px;
    color: var(--cb-white);
    text-shadow: 0 2px 16px rgba(0,0,0,.3);
}
.cb-listing-hero__title-accent {
    font-family: var(--cb-font-accent); font-style: italic;
    font-weight: 400;
    font-size: 76.7px;
    letter-spacing: 0;
    padding: 0 .08em;
}

/* Figma 23:1605 — Home > confetture, Nunito Sans Bold 14px uppercase tracking 1.17px. */
.cb-listing-hero__crumbs {
    font-family: var(--cb-font-body);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1.17px;
    text-transform: uppercase;
    color: var(--cb-white);
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.cb-listing-hero__crumbs a { color: inherit; }
.cb-listing-hero__crumbs a:hover { opacity: .8; }

@media (max-width: 1024px) {
    .cb-listing-hero { height: clamp(280px, 42vw, 480px); }
    .cb-listing-hero__title { font-size: 40px; }
    .cb-listing-hero__title-accent { font-size: 56px; }
}

@media (max-width: 640px) {
    /* Mobile: hero più compatto e orizzontale per migliore leggibilità.
       Aspect 16:10 (~440x275) invece del precedente quadrato 440x398
       che tagliava la foto nel centro mostrando solo dettagli sfocati. */
    .cb-listing-hero {
        height: auto !important;
        aspect-ratio: 15 / 10;
        min-height: 220px;
        max-height: 320px;
    }
    .cb-listing-hero__media {
        align-items: center;
        justify-content: center;
    }
    .cb-listing-hero__bg {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover !important;
        object-position: center 35% !important;
    }
    /* Overlay più scuro per leggibilità testo bianco sopra foto sfocata */
    .cb-listing-hero::after {
        background: linear-gradient(to bottom, rgba(0,0,0,.35) 0%, rgba(0,0,0,.55) 100%);
    }
    /* Titolo allineato in basso anche su tablet/mobile (coerente col desktop). */
    .cb-listing-hero__content {
        top: auto;
        bottom: 20%;
        transform: none;
        text-align: center;
        padding: 0 var(--cb-gutter);
    }
    .cb-listing-hero__title {
        font-size: 28px;
        line-height: 1.05;
        letter-spacing: 0.5px;
        margin: 0 0 10px;
        text-shadow: 0 2px 14px rgba(0,0,0,.5);
    }
    .cb-listing-hero__title-accent {
        font-size: 40px;
    }
    .cb-listing-hero__crumbs {
        font-size: 12px;
        letter-spacing: 1.17px;
        text-shadow: 0 2px 10px rgba(0,0,0,.5);
    }
}

@media (max-width: 380px) {
    .cb-listing-hero { aspect-ratio: 16 / 11; min-height: 200px; }
    .cb-listing-hero__title { font-size: 24px; }
    .cb-listing-hero__title-accent { font-size: 34px; }
    .cb-listing-hero__crumbs { font-size: 11px; }
}
