/* Gallery – stesso stile della pagina Risultati (font Rosario, rosso #99433D) */
.tgl {
	--tgl-accent: #99433d;
	--tgl-text: #7a7a7a;
	--tgl-strong: #1f2124;
	--tgl-border: #d5d8dc;
	color: var(--tgl-text);
	font-family: var(--e-global-typography-text-font-family, "Rosario"), sans-serif;
	font-variant-numeric: lining-nums tabular-nums;
	font-feature-settings: "lnum" 1, "tnum" 1;
	font-size: 16px;
	line-height: 1.5;
}

/* ricerca */
.tgl-search { margin: 0 0 1rem; }
.tgl-search-label { display: block; font-weight: 900; color: var(--tgl-accent); margin-bottom: .35rem; }
.tgl .tgl-search-input {
	width: 100%; max-width: 420px; box-sizing: border-box;
	padding: .6rem .8rem; border: 1px solid var(--tgl-border); border-radius: 4px;
	font: inherit; color: var(--tgl-strong); background: #fff;
}
.tgl .tgl-search-input:focus { outline: 2px solid var(--tgl-accent); outline-offset: 1px; border-color: var(--tgl-accent); }
.tgl-search-info { margin: .4rem 0 0; font-size: .875rem; min-height: 1.3em; }

/* anni a fisarmonica */
.tgl-year { border: 1px solid var(--tgl-border); margin: 0 0 -1px; background: #fff; }
.tgl-year[hidden] { display: none; }
.tgl-year-summary {
	list-style: none; cursor: pointer;
	display: flex; align-items: center; justify-content: center; gap: .75rem;
	padding: .65rem 1rem; color: var(--tgl-strong); user-select: none;
}
.tgl-year-summary::-webkit-details-marker { display: none; }
.tgl-year-summary:hover .tgl-year-title, .tgl-year[open] .tgl-year-title { color: var(--tgl-accent); }
.tgl-year-summary:focus-visible { outline: 2px solid var(--tgl-accent); outline-offset: -2px; }
.tgl-year-title { font-weight: 500; font-size: 1rem; order: 2; }
.tgl-year-meta { font-size: .8rem; color: var(--tgl-text); order: 3; }
.tgl-toggle { order: 1; position: relative; width: 12px; height: 12px; flex: none; }
.tgl-toggle::before, .tgl-toggle::after {
	content: ""; position: absolute; left: 0; top: 5px; width: 12px; height: 2px; background: currentColor; transition: transform .2s;
}
.tgl-toggle::after { transform: rotate(90deg); }
.tgl-year[open] .tgl-toggle::after { transform: rotate(0deg); }
.tgl-panel { padding: .25rem 1rem 1rem; border-top: 1px solid var(--tgl-border); }

/* album di foto */
.tgl-album { margin: 1rem 0 1.25rem; }
.tgl .tgl-album-title {
	font-family: inherit; font-size: 1rem; font-weight: 900; color: var(--tgl-accent);
	margin: 0 0 .5rem; padding-bottom: .35rem; border-bottom: 2px solid var(--tgl-accent); line-height: 1.3;
}
.tgl-album-meta { font-weight: 400; font-size: .8rem; color: var(--tgl-text); margin-left: .35rem; }
.tgl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; }
.tgl-thumb { display: block; aspect-ratio: 1; overflow: hidden; background: #f1efee; border-radius: 3px; }
.tgl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s, opacity .25s; }
.tgl-thumb:hover img { transform: scale(1.04); }
.tgl-thumb:focus-visible { outline: 3px solid var(--tgl-accent); outline-offset: 2px; }

/* video */
.tgl-vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 1rem 0 .25rem; }
.tgl-vcard { margin: 0; }
.tgl .tgl-vplay {
	position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 4px;
	overflow: hidden; background: #2a2a2a; cursor: pointer;
}
.tgl-vplay img, .tgl-vnoimg { width: 100%; height: 100%; object-fit: cover; display: block; }
.tgl-vicon {
	position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%;
	background: rgba(153, 67, 61, .9); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); transition: transform .2s;
}
.tgl-vicon::after {
	content: ""; position: absolute; left: 20px; top: 15px; border-style: solid; border-width: 11px 0 11px 17px; border-color: transparent transparent transparent #fff;
}
.tgl-vplay:hover .tgl-vicon { transform: scale(1.1); }
.tgl-vplay:focus-visible { outline: 3px solid var(--tgl-accent); outline-offset: 2px; }
.tgl-vdur {
	position: absolute; right: 6px; bottom: 6px; padding: 1px 6px; border-radius: 3px;
	background: rgba(0, 0, 0, .75); color: #fff; font-size: .75rem; line-height: 1.5;
}
.tgl-vinfo { padding: .45rem .1rem 0; }
.tgl .tgl-vtitle { font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--tgl-strong); margin: 0; line-height: 1.3; }
.tgl-vmeta { margin: .15rem 0 0; font-size: .82rem; color: var(--tgl-accent); }
.tgl-vnote { margin: .1rem 0 0; font-size: .8rem; }

/* visore a tutto schermo */
.tgl-noscroll { overflow: hidden; }
.tgl-box {
	position: fixed; inset: 0; z-index: 100000; background: rgba(15, 15, 15, .94);
	display: flex; flex-direction: column; font-family: var(--e-global-typography-text-font-family, "Rosario"), sans-serif;
}
.tgl-box[hidden] { display: none; }
.tgl-box-stage { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 3rem 3.5rem .5rem; }
.tgl-box-stage img, .tgl-box-stage video { max-width: 100%; max-height: 100%; object-fit: contain; box-shadow: 0 4px 30px rgba(0, 0, 0, .5); }
.tgl-box-stage video { width: 100%; background: #000; }
.tgl-box-bar { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: .6rem 1rem 1rem; color: #ddd; font-size: .9rem; }
.tgl-box-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tgl-box-dl { color: #fff; text-decoration: underline; flex: none; }
.tgl-box button {
	position: absolute; border: 0; background: transparent; color: #fff; cursor: pointer; line-height: 1; padding: .3rem .6rem;
	font-size: 2.6rem; opacity: .85;
}
.tgl-box button:hover, .tgl-box button:focus-visible { opacity: 1; outline: none; color: #e7b4b0; }
.tgl-box-close { top: .4rem; right: .6rem; font-size: 2.4rem; }
.tgl-box-prev { left: .3rem; top: 50%; transform: translateY(-50%); }
.tgl-box-next { right: .3rem; top: 50%; transform: translateY(-50%); }
.tgl-box button[hidden] { display: none; }

@media (max-width: 767px) {
	.tgl-panel { padding: .25rem .6rem .75rem; }
	.tgl-year-summary { justify-content: flex-start; }
	.tgl-grid { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 4px; }
	.tgl-vgrid { grid-template-columns: 1fr 1fr; gap: .75rem; }
	.tgl-box-stage { padding: 3rem .25rem .25rem; }
	.tgl-box-prev, .tgl-box-next { top: auto; bottom: .2rem; transform: none; }
}
@media (max-width: 420px) {
	.tgl-vgrid { grid-template-columns: 1fr; }
}
