/* ============================================================
   SERATE — archive-evento.php e single-evento.php
   Riusa token e componenti di home.css (.gr-hero, .gr-btn, .gr-head,
   .gr-carta__*, .gr-cta…): il menu della serata è la stessa sezione
   della carta, quindi qui ci sono solo la data, le schede e l'archivio.
   ============================================================ */

/* ── Hero ──────────────────────────────────────────────────── */
.gr-events__hero,
.gr-event__hero { padding: 172px 0 64px; }

/* L'archivio delle serate ha la stessa cover della pagina Aziende: testo a
   sinistra, foto a destra con una scheda che le esce dall'angolo. La foto
   è quella della prossima serata (vedi archive-evento.php), quindi la
   pagina cambia faccia da sola a ogni serata nuova. */
.gr-events__hero { padding-bottom: 92px; }

.gr-events__hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 64px;
    align-items: center;
}
.gr-events__hero-intro { position: relative; }
.gr-events__hero .gr-hero__lead { max-width: 520px; }

.gr-events__hero-media { position: relative; }

.gr-events__hero-photo {
    position: relative;
    aspect-ratio: 9 / 10;
    border-radius: var(--gr-r-lg);
    overflow: hidden;
    background: var(--gr-green);
    box-shadow: var(--gr-shadow);
}

/* La scheda della prossima serata: esce dal bordo della foto in basso a
   sinistra, come il cartellino dei prezzi nella pagina Aziende. */
.gr-events__hero-card {
    position: absolute;
    left: -30px;
    bottom: -26px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: calc(100% + 24px);
    padding: 16px 24px 16px 18px;
    border-radius: var(--gr-r-md);
    background: var(--gr-green);
    color: #fff;
    box-shadow: var(--gr-shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
}
.gr-events__hero-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--gr-shadow);
}

.gr-events__hero-card-date {
    display: grid;
    justify-items: center;
    gap: 2px;
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: var(--gr-r-sm);
    background: var(--gr-lime);
    color: var(--gr-green);
    line-height: 1;
}
.gr-events__hero-card-date strong {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}
.gr-events__hero-card-date small {
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gr-events__hero-card-body {
    display: grid;
    gap: 3px;
    min-width: 0;
}
.gr-events__hero-card-label {
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gr-lime);
}
.gr-events__hero-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.01em;
    /* Il titolo di una serata può essere lungo: nella scheda si ferma a due
       righe, sotto continua per esteso. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gr-events__hero-card-meta {
    font-size: .82rem;
    color: rgba(255, 255, 255, .7);
}

@media (max-width: 980px) {
    .gr-events__hero { padding-bottom: 76px; }
    .gr-events__hero-grid { grid-template-columns: 1fr; gap: 52px; }
    .gr-events__hero-media { max-width: 520px; }
    .gr-events__hero-photo { aspect-ratio: 4 / 3.2; }
    .gr-events__hero-card { left: auto; right: 0; bottom: -24px; }
}
@media (max-width: 560px) {
    .gr-events__hero-card {
        left: 0;
        right: 0;
        max-width: none;
        padding: 14px 18px 14px 14px;
    }
}

.gr-event__hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 60px;
    align-items: center;
}
.gr-event__title { font-size: clamp(2.3rem, 5vw, 3.6rem); }

/* Data, prezzo e posti in fila sotto al titolo. */
.gr-event__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}
.gr-event__fact {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--gr-line);
    background: var(--gr-white);
    font-weight: 700;
    font-size: .92rem;
    color: var(--gr-green);
}
.gr-event__fact strong { font-weight: 700; }
.gr-event__fact small { font-weight: 500; color: var(--gr-muted); }

.gr-event__hero .gr-hero__cta { margin-top: 30px; }

/* Al posto del pulsante, quando non si può più prenotare. */
.gr-event__badge {
    display: inline-flex;
    align-items: center;
    padding: 14px 24px;
    border-radius: 999px;
    border: 1.5px dashed var(--gr-line);
    background: rgba(255, 255, 255, .6);
    font-weight: 700;
    color: var(--gr-muted);
}
.gr-event__badge--full {
    border-style: solid;
    border-color: rgba(180, 80, 46, .35);
    background: rgba(180, 80, 46, .08);
    color: var(--gr-carne);
}

/* ── Foto e bollino della data ─────────────────────────────── */
.gr-event__media { position: relative; }
.gr-event__photo {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: var(--gr-r-lg);
    background: var(--gr-green);
    box-shadow: var(--gr-shadow);
}

/* Senza foto: il verde del locale con il nome in corsivo. */
.gr-event__placeholder,
.gr-event-card__placeholder {
    position: relative;
    display: grid;
    place-items: center;
    height: 100%;
    background:
        radial-gradient(circle at 25% 15%, rgba(182, 217, 76, .30), rgba(182, 217, 76, 0) 55%),
        radial-gradient(circle at 85% 95%, rgba(224, 163, 43, .22), rgba(224, 163, 43, 0) 50%),
        var(--gr-green);
}
.gr-event__placeholder::before,
.gr-event-card__placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .09) 1.5px, transparent 1.6px);
    background-size: 18px 18px;
}
.gr-event__placeholder span,
.gr-event-card__placeholder span {
    position: relative;
    font-family: var(--gr-serif);
    font-style: italic;
    font-size: 2.6rem;
    color: rgba(255, 255, 255, .85);
}
.gr-event-card__placeholder span { font-size: 1.9rem; }

/* Il bollino della data esce dalla foto, come un timbro. */
.gr-event__date {
    position: absolute;
    left: -18px;
    bottom: 28px;
    display: grid;
    justify-items: center;
    gap: 2px;
    padding: 16px 20px;
    border-radius: var(--gr-r-md);
    background: var(--gr-lime);
    color: var(--gr-green);
    box-shadow: var(--gr-shadow-sm);
    line-height: 1;
}
.gr-event__date-weekday,
.gr-event__date-month {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.gr-event__date-day {
    font-size: 2.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

/* ── Presentazione ─────────────────────────────────────────── */
.gr-event__story {
    padding: 72px 0 0;
    background: var(--gr-cream);
}
.gr-event__text {
    max-width: 720px;
    font-size: 1.06rem;
    color: var(--gr-muted);
}
.gr-event__text > * + * { margin-top: 18px !important; }
.gr-event__text strong { color: var(--gr-ink); }
.gr-event__text h2,
.gr-event__text h3 {
    margin-top: 32px !important;
    color: var(--gr-ink);
    font-weight: 700;
}
.gr-event__text a {
    color: var(--gr-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gr-event__text img { border-radius: var(--gr-r-md); }
.gr-event__text ul,
.gr-event__text ol { padding-left: 20px !important; }
.gr-event__text li { list-style: disc; margin-top: 6px; }

.gr-event__menu .gr-head__lead { max-width: 620px; }

/* ── Il ticket ─────────────────────────────────────────────────
   Un biglietto vero: a sinistra cosa comprende, a destra la matrice
   verde col prezzo, separate da una linea tratteggiata con due tacche
   (i cerchi hanno il colore dello sfondo della sezione). */
.gr-event__ticket {
    --gr-ticket-bg: var(--gr-cream);
    background: var(--gr-ticket-bg);
}

.gr-ticket {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    max-width: 860px;
    margin-top: 44px;
    border-radius: var(--gr-r-lg);
    background: var(--gr-white);
    box-shadow: var(--gr-shadow);
    overflow: hidden;
}

.gr-ticket__main { padding: 40px 44px 42px; }

.gr-ticket__name {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
    color: var(--gr-ink);
}
.gr-ticket__lead {
    margin-top: 6px !important;
    font-size: .95rem;
    color: var(--gr-muted);
}

.gr-ticket__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 24px;
    margin-top: 24px;
}
.gr-ticket__item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--gr-ink);
}
.gr-ticket__check {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gr-lime);
    color: var(--gr-green);
}
.gr-ticket__check svg { width: 15px; height: 15px; }

.gr-ticket__stub {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 36px 24px;
    background:
        radial-gradient(circle at 80% 10%, rgba(182, 217, 76, .22), rgba(182, 217, 76, 0) 55%),
        var(--gr-green);
    color: #fff;
    text-align: center;
    border-left: 2px dashed rgba(255, 255, 255, .35);
}

/* Le due tacche del biglietto, sopra e sotto la linea tratteggiata. */
.gr-ticket__stub::before,
.gr-ticket__stub::after {
    content: '';
    position: absolute;
    left: -15px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gr-ticket-bg);
}
.gr-ticket__stub::before { top: -14px; }
.gr-ticket__stub::after  { bottom: -14px; }

.gr-ticket__stub-label {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}
.gr-ticket__price {
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--gr-lime);
    font-variant-numeric: tabular-nums;
}
.gr-ticket__price--soon {
    font-size: 1.3rem;
    letter-spacing: 0;
}

.gr-ticket__more {
    margin-top: 26px !important;
    font-weight: 600;
    color: var(--gr-muted);
}
.gr-ticket__more a {
    font-weight: 700;
    color: var(--gr-green);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gr-ticket__note { margin-top: 26px !important; max-width: 860px; }

@media (max-width: 700px) {
    .gr-ticket { grid-template-columns: 1fr; margin-top: 32px; }
    .gr-ticket__main { padding: 30px 24px 32px; }

    /* Da telefono la matrice va sotto: tratteggio e tacche in orizzontale. */
    .gr-ticket__stub {
        padding: 28px 24px 30px;
        border-left: 0;
        border-top: 2px dashed rgba(255, 255, 255, .35);
    }
    .gr-ticket__stub::before,
    .gr-ticket__stub::after { top: -15px; bottom: auto; }
    .gr-ticket__stub::before { left: -14px; }
    .gr-ticket__stub::after  { left: auto; right: -14px; }
    .gr-ticket__price { font-size: 2.9rem; }
}

/* ── Schede delle serate ───────────────────────────────────── */
.gr-events__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 30px;
    margin-top: 44px;
}
.gr-events__more { background: var(--gr-cream-2); }
.gr-events__more .gr-events__grid { margin-top: 0; }

/* Poche schede sotto a un titolo centrato: si centrano anche loro, invece di
   restare appoggiate a sinistra in una riga mezza vuota. */
.gr-events__grid--few {
    grid-template-columns: repeat(auto-fit, minmax(310px, 360px));
    justify-content: center;
}

.gr-event-card { height: 100%; }
.gr-event-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: var(--gr-r-lg);
    background: var(--gr-white);
    box-shadow: var(--gr-shadow-sm);
    transition: transform .3s ease, box-shadow .3s ease;
}
.gr-event-card__link:hover {
    transform: translateY(-4px);
    box-shadow: var(--gr-shadow);
}
.gr-js .gr-event-card:hover .gr-event-card__link { transition: transform .25s ease, box-shadow .25s ease; }

.gr-event-card__media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--gr-green);
}
.gr-event-card__media img { transition: transform .6s ease; }
.gr-event-card__link:hover .gr-event-card__media img { transform: scale(1.04); }

.gr-event-card__badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    display: grid;
    justify-items: center;
    padding: 9px 13px;
    border-radius: 14px;
    background: var(--gr-lime);
    color: var(--gr-green);
    line-height: 1;
}
.gr-event-card__badge strong {
    font-size: 1.4rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.gr-event-card__badge small {
    margin-top: 3px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.gr-event-card__flag {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(21, 32, 25, .78);
    color: #fff;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    backdrop-filter: blur(4px);
}
.gr-event-card__flag--full { background: var(--gr-carne); }

.gr-event-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 22px 24px 24px;
}
.gr-event-card__when {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--gr-muted);
}
.gr-event-card__title {
    margin-top: 8px !important;
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--gr-ink);
}
.gr-event-card__text {
    margin-top: 10px !important;
    font-size: .95rem;
    color: var(--gr-muted);
}
.gr-event-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 14px;
    margin-top: auto;
    padding-top: 20px;
}
.gr-event-card__price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--gr-green);
}
.gr-event-card__price small {
    font-size: .78rem;
    font-weight: 600;
    color: var(--gr-muted);
}
.gr-event-card__more {
    font-weight: 700;
    font-size: .92rem;
    color: var(--gr-green);
}
.gr-event-card__link:hover .gr-btn__arrow { transform: translateX(4px); }

/* Le serate passate restano leggibili ma non tirano l'occhio. */
.gr-event-card--past .gr-event-card__media img { filter: grayscale(.45); }

/* ── Nessuna serata ────────────────────────────────────────── */
.gr-events__none {
    max-width: 560px;
    margin: 0 auto;
    padding: 56px 32px;
    border-radius: var(--gr-r-lg);
    border: 1.5px dashed var(--gr-line);
    background: var(--gr-white);
    text-align: center;
}
.gr-events__none-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 20px;
    background: var(--gr-cream-2);
    color: var(--gr-green);
}
.gr-events__none-icon svg { width: 32px; height: 32px; }
.gr-events__none-title {
    font-family: var(--gr-serif);
    font-size: 1.9rem;
    font-weight: 400;
    color: var(--gr-ink);
}
.gr-events__none p {
    margin-top: 10px !important;
    color: var(--gr-muted);
}
.gr-events__none .gr-btn { margin-top: 26px; }
.gr-events__none .gr-admin-note { margin-top: 26px; }

/* ── Archivio delle serate passate ─────────────────────────── */
.gr-events__archive { background: var(--gr-cream-2); }
.gr-events__list {
    display: grid;
    gap: 12px;
    margin-top: 40px;
}
.gr-events__row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 22px;
    border-radius: var(--gr-r-md);
    border: 1px solid var(--gr-line);
    background: var(--gr-white);
    transition: border-color .2s ease, transform .2s ease;
}
.gr-events__row:hover {
    border-color: var(--gr-green);
    transform: translateX(3px);
}
.gr-events__row-date {
    display: grid;
    justify-items: center;
    flex: none;
    width: 56px;
    padding: 8px 0;
    border-radius: 14px;
    background: var(--gr-cream-2);
    color: var(--gr-green);
    line-height: 1;
}
.gr-events__row-date strong {
    font-size: 1.2rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.gr-events__row-date small {
    margin-top: 3px;
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.gr-events__row-body { flex: 1 1 auto; min-width: 0; }
.gr-events__row-title {
    display: block;
    font-weight: 700;
    color: var(--gr-ink);
}
.gr-events__row-when {
    display: block;
    margin-top: 2px;
    font-size: .88rem;
    color: var(--gr-muted);
}
.gr-events__row-more {
    flex: none;
    font-weight: 700;
    font-size: .9rem;
    color: var(--gr-green);
}
.gr-events__row:hover .gr-btn__arrow { transform: translateX(4px); }

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .gr-events__hero,
    .gr-event__hero { padding: 132px 0 48px; }

    .gr-event__hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    /* La foto prima del testo farebbe scendere il titolo sotto la piega. */
    .gr-event__media { order: 2; }
    .gr-event__photo { aspect-ratio: 4 / 3; }
    .gr-event__date { left: 16px; bottom: 16px; padding: 12px 16px; }
    .gr-event__date-day { font-size: 2rem; }

    .gr-event__story { padding-top: 56px; }
}

@media (max-width: 560px) {
    .gr-events__grid { grid-template-columns: 1fr; }
    .gr-events__row { flex-wrap: wrap; gap: 12px 16px; }
    .gr-events__row-more { width: 100%; }
    .gr-events__none { padding: 40px 22px; }
}
