/* public/css/restaurant-home.css v 1.2
   TruePine - Blocchi Home Ristorante (mobile-first) */

.tprb-home-hero,
.tprb-home-intro,
.tprb-home-gallery,
.tprb-home-events {
    --tprb-home-primary: #818b52; /* sovrascritto inline da ogni blocco */
    box-sizing: border-box;
}

/* ------------------------- HERO ------------------------- */
.tprb-home-hero {
    position: relative;
    min-height: 60vh;
    max-height: 600px; /* <- altezza massima hero, regolabile */
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: var(--tprb-home-primary);
    width: 100vw !important;
    max-width: none !important;
    left: 50%;
    right: 50%;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
}
.tprb-home-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    animation: tprb-home-kenburns 18s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes tprb-home-kenburns {
    from { transform: scale(1); }
    to   { transform: scale(1.08); }
}
.tprb-home-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.05) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.65) 100%);
}
.tprb-home-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 48px 20px 40px;
    text-align: center;
    color: #fff;
}
.tprb-home-hero__title {
    margin: 0 0 6px;
    font-size: clamp(1.8rem, 6vw, 3rem) !important;
    line-height: 1.15;
    color: #fff !important;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}
.tprb-home-hero__tagline {
    margin: 0 0 20px;
    font-size: clamp(.95rem, 3vw, 1.15rem);
    opacity: .92;
    text-shadow: 0 1px 8px rgba(0,0,0,.35);
}
.tprb-home-cta {
    display: inline-block;
    padding: 13px 34px;
    background: var(--tprb-home-primary);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .3px;
    box-shadow: 0 4px 16px rgba(0,0,0,.28);
    transition: transform .25s ease, box-shadow .25s ease;
}
.tprb-home-cta:active { transform: scale(.97); }
.tprb-home-cta:hover { color: #fff !important; }
.tprb-home-hero__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.tprb-home-cta--menu,
.tprb-home-cta--phone {
    background: var(--tprb-home-primary);
    border: 2px solid #fff;
    backdrop-filter: blur(4px);
}
.tprb-home-cta--menu:active, .tprb-home-cta--phone:active { transform: scale(.97); }

@media (hover:hover) {
    .tprb-home-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.32); background: rgba(255,255,255,.25); }
    .tprb-home-cta--menu:hover,
    .tprb-home-cta--phone:hover { background: rgba(255,255,255,.24); transform: translateY(-2px); }
}

/* ------------------------- INTRO ------------------------- */
.tprb-home-intro {
    max-width: 760px;
    margin: 0 auto;
    padding: 34px 20px 10px;
    text-align: center;
}
.tprb-home-intro__text {
    margin: 0 0 18px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: #444;
}
.tprb-home-intro__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.tprb-home-chip {
    display: inline-block;
    padding: 5px 14px;
    border: 1px solid var(--tprb-home-primary);
    color: var(--tprb-home-primary);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .2px;
    background: transparent;
}
.tprb-home-chip--price {
    background: var(--tprb-home-primary);
    color: #fff;
}

/* ------------------------- GALLERY ------------------------- */
.tprb-home-gallery { padding: 26px 14px; }
.tprb-home-gallery__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 960px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .tprb-home-gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
}
.tprb-home-gallery__item {
    margin: 0;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
}
.tprb-home-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.tprb-home-gallery__item:active img { transform: scale(1.06); }
@media (hover:hover) {
    .tprb-home-gallery__item:hover img { transform: scale(1.06); }
}

/* ------------------------- EVENTS ------------------------- */
.tprb-home-events { padding: 30px 16px 36px; }

/* ------------------- SCROLL REVEAL ------------------- */
/* Stato nascosto applicato SOLO se il JS è attivo (classe su <html>) */
html.tprb-home-js .tprb-home-reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .6s ease, transform .6s ease;
}
html.tprb-home-js .tprb-home-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ------------------------- LIGHTBOX ------------------------- */
.tprb-home-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,.93);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility 0s linear .25s;
}
.tprb-home-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .25s ease;
}
.tprb-home-lightbox__img {
    max-width: 92vw;
    max-height: 84vh;
    border-radius: 6px;
    user-select: none;
}
.tprb-home-lightbox__btn {
    position: absolute;
    background: rgba(255,255,255,.12);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tprb-home-lightbox__close { top: 14px; right: 14px; }
.tprb-home-lightbox__prev  { left: 10px; top: 50%; transform: translateY(-50%); }
.tprb-home-lightbox__next  { right: 10px; top: 50%; transform: translateY(-50%); }
.tprb-home-lightbox__counter {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.75);
    font-size: .85rem;
}

/* --------------------- ACCESSIBILITÀ --------------------- */
@media (prefers-reduced-motion: reduce) {
    .tprb-home-hero__bg { animation: none; }
    html.tprb-home-js .tprb-home-reveal { opacity: 1; transform: none; transition: none; }
    .tprb-home-gallery__item img { transition: none; }
}

/* ------------------- HEADING DI SEZIONE (titolo + divisore) ------------------- */
.tprb-home-heading {
    text-align: center;
    margin: 0 0 22px;
}
.tprb-home-heading__divider {
    margin-bottom: 14px;
    line-height: 0;
}
.tprb-home-divider {
    display: inline-block;
    max-width: 220px;
    height: auto;
    vertical-align: middle;
}
.tprb-home-divider--line {
    width: 100px;
    height: 2px;
    border-radius: 1px;
}
.tprb-home-heading__title {
    margin: 0;
    font-size: 1.5rem;   /* default se il modulo menù non imposta la dimensione */
    line-height: 1.2;
    text-align: center;
}

/* Divisore dell'Intro (senza titolo) */
.tprb-home-intro__divider {
    text-align: center;
    margin: 0 0 18px;
    line-height: 0;
}