/* YT Area Membri – parte pubblica. Colori presi dal tema (Extendable). */

.ytam-empty { text-align: center; opacity: .8; }

/* ---------- Prossimi eventi ---------- */
.ytam-upcoming { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.ytam-month {
	margin: 0; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; opacity: .75;
}
.ytam-sep { border: 0; border-top: 1px solid currentColor; opacity: .18; margin: 4px 0; width: 100%; }
.ytam-event { display: grid; grid-template-columns: 90px 110px 1fr; gap: 24px; align-items: start; }
.ytam-event__date { text-align: right; line-height: 1.1; }
.ytam-event__date strong { display: block; font-size: 30px; margin-bottom: 4px; }
.ytam-event__date span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.ytam-event__poster { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; }
.ytam-event__poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
a.ytam-event__poster:hover img { transform: scale(1.05); }
.ytam-event__poster--empty {
	border: 2px dashed currentColor; opacity: .35; display: flex; align-items: center; justify-content: center;
}
.ytam-event__poster--empty span { font-family: Georgia, serif; font-size: 2.5rem; font-weight: 700; }
.ytam-event__title { margin: 0; font-size: 28px; line-height: 1.15; }
.ytam-event__title a { color: inherit; text-decoration: none; }
.ytam-event__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ytam-upcoming--past .ytam-event__title { font-size: 24px; }
.ytam-upcoming--past .ytam-event__poster img { filter: saturate(.85); }
.ytam-upcoming--past a.ytam-event__poster:hover img { filter: none; }
.ytam-event__place { margin: 6px 0; font-size: 14px; }
.ytam-event__meta { margin: 0 0 4px; font-size: 13px; opacity: .85; }
.ytam-event__meta--soft { font-style: italic; }
.ytam-event__cta { margin: 8px 0 0; font-size: 13px; font-weight: 600; }

@media (max-width: 600px) {
	.ytam-event { grid-template-columns: 56px 1fr; gap: 14px; }
	.ytam-event__date strong { font-size: 24px; }
	.ytam-event__poster { grid-column: 2; grid-row: 2; max-width: 160px; }
	.ytam-event__body { grid-column: 2; grid-row: 1; }
	.ytam-event__title { font-size: 22px; }
}

/* ---------- Indice gallerie ---------- */
.ytam-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.ytam-card {
	border-radius: 14px; overflow: hidden; padding-bottom: 24px;
	background: var(--wp--preset--color--tertiary, rgba(127,127,127,.12));
	display: flex; flex-direction: column;
}
.ytam-card__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; }
.ytam-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ytam-card__img:hover img { transform: scale(1.05); }
.ytam-card__body { padding: 14px 24px 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ytam-card__title { margin: 0; font-size: 20px; }
.ytam-card__sub { margin: 0; font-size: 14px; opacity: .85; }
.ytam-card .wp-block-buttons { margin-top: auto; padding-top: 12px; }

/* ---------- Singolo evento ---------- */
.ytam-single-info { text-align: center; margin: 0 auto 2rem; }
.ytam-single-info__main { font-size: 1.1rem; font-weight: 600; margin: 0 0 6px; }
.ytam-single-info__sub { margin: 0 0 4px; opacity: .85; }
.ytam-single-info__cta { justify-content: center; margin-top: 16px; }
.ytam-single-poster { max-width: 520px; margin: 0 auto 2rem; }
.ytam-single-poster img { width: 100%; border-radius: 14px; display: block; }

/* Stile A: griglia uniforme a 4 colonne con zoom al passaggio */
.ytam-gallery {
	display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
	max-width: 1200px; margin: 2rem auto 0;
}
.ytam-gallery__heading { text-align: center; margin: 3rem 0 0; font-size: 1.4rem; }
.ytam-gallery__heading + .ytam-gallery { margin-top: 1.2rem; }
.ytam-gallery__item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; }
.ytam-gallery__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.ytam-gallery__item:hover img { transform: scale(1.06); }
@media (max-width: 900px) { .ytam-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .ytam-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* ---------- Lightbox ---------- */
.ytam-lb {
	position: fixed; inset: 0; z-index: 100000; background: rgba(10, 8, 6, .94);
	display: flex; align-items: center; justify-content: center;
}
.ytam-lb[hidden] { display: none; }
.ytam-lb img { max-width: 94vw; max-height: 88vh; object-fit: contain; border-radius: 4px; }
.ytam-lb button {
	position: absolute; background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px;
	width: 48px; height: 48px; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ytam-lb button:hover, .ytam-lb button:focus-visible { background: rgba(255,255,255,.25); outline: none; }
.ytam-lb__close { top: 16px; right: 16px; }
.ytam-lb__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.ytam-lb__next { right: 16px; top: 50%; transform: translateY(-50%); }
.ytam-lb__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.75); font-size: 13px; }
