/* Gestore Comunicati GSWeb – frontend */
.gcg {
	--gcg-accent: #2b5fff;
	--gcg-pdf: #f20c0c;
	--gcg-ink: #14213d;
	--gcg-muted: #667085;
	--gcg-line: #e6e9f0;
	--gcg-bg: #f5f7fb;
	box-sizing: border-box;
	font-family: inherit;
	color: var(--gcg-ink);
}
.gcg *, .gcg *::before, .gcg *::after { box-sizing: border-box; }
.gcg ul, .gcg ol { list-style: none; margin: 0; padding: 0; }
.gcg li { margin: 0; padding: 0; }
.gcg .gcg-ico { display: block; flex: none; height: auto; }
.gcg .gcg-ico-pdf { width: 26px; color: var(--gcg-pdf); }
.gcg .gcg-ico-box { width: 26px; color: var(--gcg-accent); }
.gcg .gcg-ico-wrap { display: flex; flex: 0 0 26px; width: 26px; padding-top: 2px; }

/* ---------- Lista (ultimi N) ---------- */
.gcg-lista .gcg-link,
.gcg-lista .gcg-all {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 9px 0;
	line-height: 1.5;
	color: var(--gcg-accent);
	text-decoration: none;
	box-shadow: none;
	border: 0;
}
.gcg-lista .gcg-link:hover .gcg-title,
.gcg-lista .gcg-link:focus-visible .gcg-title,
.gcg-lista .gcg-all:hover .gcg-title,
.gcg-lista .gcg-all:focus-visible .gcg-title { text-decoration: underline; }
.gcg-lista .gcg-txt { display: flex; flex-direction: column; min-width: 0; }
.gcg-lista .gcg-title { overflow-wrap: anywhere; }
.gcg-lista .gcg-date { color: var(--gcg-muted); font-size: .85em; }
.gcg-lista .gcg-all { margin-top: 10px; align-items: center; }
.gcg-lista .gcg-all .gcg-ico-wrap { padding-top: 0; }
.gcg-vuoto { margin: 0; padding: 8px 0; color: var(--gcg-muted); }
.gcg-admin-note {
	margin: 0 0 8px;
	padding: 8px 12px;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
	color: #50131a;
	font-size: .9em;
}

/* ---------- Archivio ---------- */
.gcg-archivio { width: 100%; }

.gcg-filtri {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 14px 16px;
	align-items: end;
	margin: 0 0 18px;
	padding: 18px;
	background: var(--gcg-bg);
	border: 1px solid var(--gcg-line);
	border-radius: 16px;
}
.gcg-filtri .gcg-field-q { grid-column: span 2; }
.gcg-filtri .gcg-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gcg-filtri label {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--gcg-muted);
}
.gcg-filtri input[type="search"],
.gcg-filtri select {
	width: 100%;
	height: 46px;
	margin: 0;
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
	color: var(--gcg-ink);
	background-color: #fff;
	border: 1px solid #d3d9e6;
	border-radius: 10px;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.gcg-filtri input[type="search"]:focus,
.gcg-filtri select:focus {
	outline: none;
	border-color: var(--gcg-accent);
	box-shadow: 0 0 0 3px rgba(43, 95, 255, .18);
}
.gcg-actions { display: flex; align-items: center; gap: 14px; }
.gcg-btn {
	height: 46px;
	padding: 0 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background: var(--gcg-accent);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	transition: filter .15s, transform .05s;
}
.gcg-btn:hover { filter: brightness(1.08); }
.gcg-btn:active { transform: translateY(1px); }
.gcg-reset { color: var(--gcg-accent); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }

.gcg-count { margin: 0 0 6px; font-size: 14px; color: var(--gcg-muted); }

.gcg-anno { margin: 22px 0 0; }
.gcg-anno-title {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 12px;
	font-size: 15px;
	font-weight: 800;
	letter-spacing: .08em;
	color: var(--gcg-ink);
}
.gcg-anno-title::after { content: ""; flex: 1; height: 1px; background: var(--gcg-line); }
.gcg-anno-title span {
	display: inline-block;
	padding: 5px 14px;
	color: #fff;
	background: var(--gcg-ink);
	border-radius: 999px;
	line-height: 1.2;
}

.gcg-cards { display: flex; flex-direction: column; gap: 10px; }
.gcg-card-link {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	background: #fff;
	border: 1px solid var(--gcg-line);
	border-radius: 14px;
	color: var(--gcg-ink);
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(20, 33, 61, .04);
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.gcg-card-link:hover,
.gcg-card-link:focus-visible {
	border-color: var(--gcg-accent);
	box-shadow: 0 6px 18px rgba(20, 33, 61, .09);
	transform: translateY(-1px);
}
.gcg-card .gcg-ico-wrap { padding-top: 0; flex-basis: 30px; width: 30px; }
.gcg-card .gcg-ico-pdf { width: 30px; }
.gcg-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.gcg-card-title { font-size: 16px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.gcg-card-link:hover .gcg-card-title { color: var(--gcg-accent); }
.gcg-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13px; color: var(--gcg-muted); }
.gcg-card-date { margin-right: 4px; }
.gcg-badge {
	display: inline-block;
	padding: 3px 10px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--gcg-accent);
	background: #e8eeff;
	background: color-mix(in srgb, var(--gcg-accent) 12%, #fff);
	border-radius: 999px;
}
.gcg-badge-tipo { color: var(--gcg-ink); background: #eceff5; }
.gcg-badge-more { color: var(--gcg-muted); background: #eceff5; }
.gcg-card-cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	flex: none;
	font-size: 14px;
	font-weight: 700;
	color: var(--gcg-accent);
}

.gcg-empty {
	margin: 10px 0 0;
	padding: 36px 20px;
	text-align: center;
	background: var(--gcg-bg);
	border: 1px dashed #cfd6e4;
	border-radius: 14px;
	color: var(--gcg-muted);
}
.gcg-empty p { margin: 0 0 10px; }

.gcg-pagination { margin: 26px 0 0; }
.gcg-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gcg-pagination a,
.gcg-pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	font-size: 14px;
	font-weight: 600;
	color: var(--gcg-ink);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--gcg-line);
	border-radius: 10px;
}
.gcg-pagination a:hover { border-color: var(--gcg-accent); color: var(--gcg-accent); }
.gcg-pagination .current { color: #fff; background: var(--gcg-accent); border-color: var(--gcg-accent); }
.gcg-pagination .dots { border-color: transparent; background: transparent; }

@media (max-width: 640px) {
	.gcg-filtri { grid-template-columns: 1fr 1fr; padding: 14px; gap: 12px; }
	.gcg-filtri .gcg-field-q,
	.gcg-filtri .gcg-field-t,
	.gcg-actions { grid-column: 1 / -1; }
	.gcg-actions .gcg-btn { flex: 1; }
	.gcg-card-link { padding: 12px 14px; gap: 12px; }
	.gcg-card-cta { display: none; }
	.gcg-card-title { font-size: 15px; }
}
@media (max-width: 380px) {
	.gcg-filtri { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.gcg-card-link, .gcg-btn { transition: none; }
}

/* ---------- Titolo sopra gli elenchi ---------- */
.gcg-list-title { margin: 0 0 6px; font-size: 1.05em; font-weight: 700; color: var(--gcg-ink); }

/* ---------- page-flip: stili di base (la libreria non li include) ---------- */
.stf__parent { position: relative; display: block; box-sizing: border-box; transform: translateZ(0); -ms-touch-action: pan-y; touch-action: pan-y; }
.stf__wrapper { position: relative; width: 100%; box-sizing: border-box; }
.stf__parent canvas { position: absolute; width: 100%; height: 100%; left: 0; top: 0; }
.stf__block { position: absolute; width: 100%; height: 100%; box-sizing: border-box; perspective: 2000px; }
.stf__item { display: none; position: absolute; transform-style: preserve-3d; }
.stf__outerShadow, .stf__innerShadow, .stf__hardShadow, .stf__hardInnerShadow { position: absolute; left: 0; top: 0; }

/* ---------- Giornalino sfogliabile ---------- */
.gcg-flip { position: relative; margin: 0 0 8px; border-radius: 6px; overflow: hidden; background: #fff; outline: none; }
.gcg-flip-view { position: relative; min-height: 260px; padding: 22px 12px; overflow: auto; text-align: center; background: #4b4e52; }
.gcg-flip-box { display: block; margin: 0 auto; max-width: none; }
.gcg-flip .gcg-flip-stage { position: relative; }
.gcg-flip-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; color: #fff; font-size: 15px; text-align: center; pointer-events: none; }
.gcg-flip-msg a { color: #fff; text-decoration: underline; pointer-events: auto; }
.gcg-flip .stf__parent .gcg-pg { background: #fff; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.gcg-flip .stf__parent .gcg-pg canvas { position: static; display: block; width: 100%; height: 100%; }
.gcg-pg-load { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 3px solid #d9dde5; border-top-color: var(--gcg-accent); border-radius: 50%; animation: gcg-spin .8s linear infinite; }
@keyframes gcg-spin { to { transform: rotate(360deg); } }

.gcg-flip-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 4px; padding: 8px 10px; background: #fff; border-top: 1px solid var(--gcg-line); }
.gcg .gcg-fb { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; margin: 0; color: var(--gcg-ink); background: transparent; border: 0; border-radius: 10px; cursor: pointer; text-decoration: none; box-shadow: none; transition: background .15s, color .15s; }
.gcg .gcg-fb:hover, .gcg .gcg-fb:focus-visible { background: #eef1f7; color: var(--gcg-accent); }
.gcg-flip-pages { min-width: 78px; text-align: center; font-size: 14px; font-weight: 600; color: var(--gcg-ink); font-variant-numeric: tabular-nums; }
.gcg-flip-sep { width: 1px; height: 22px; margin: 0 6px; background: var(--gcg-line); }
.gcg-flip-title { margin: 0; padding: 0 12px 10px; text-align: center; font-size: 13px; color: var(--gcg-muted); background: #fff; }

.gcg-flip.is-full, .gcg-flip.is-fake-full { display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0; border-radius: 0; background: #4b4e52; }
.gcg-flip.is-fake-full { position: fixed; inset: 0; z-index: 999999; }
.gcg-flip.is-full .gcg-flip-view, .gcg-flip.is-fake-full .gcg-flip-view { flex: 1; display: flex; align-items: center; justify-content: center; padding: 12px; }
.gcg-flip.is-full .gcg-flip-title, .gcg-flip.is-fake-full .gcg-flip-title { display: none; }
html.gcg-noscroll, html.gcg-noscroll body { overflow: hidden; }

/* ---------- Numeri precedenti ---------- */
.gcg-sec-title { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; margin: 38px 0 22px; font-size: 16px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--gcg-ink); }
.gcg-sec-title::before, .gcg-sec-title::after { content: ""; flex: 1; height: 4px; border-top: 1px solid var(--gcg-line); border-bottom: 1px solid var(--gcg-line); }
.gcg-sec-title span { display: inline-flex; align-items: center; gap: 12px; text-align: center; }
.gcg-sec-title span::before, .gcg-sec-title span::after { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gcg-accent); }

.gcg-issues { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 30px 20px; }
.gcg-issue { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.gcg .gcg-issue-main { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--gcg-ink); text-decoration: none; }
.gcg-issue-main .gcg-ico-big { width: 52px; color: var(--gcg-pdf); transition: transform .15s; }
.gcg-issue-main:hover .gcg-ico-big { transform: translateY(-3px); }
.gcg-issue-title { font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.gcg-issue-date { font-size: 14px; color: var(--gcg-muted); text-transform: capitalize; }
.gcg-issue-acts { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.gcg .gcg-issue-open, .gcg .gcg-issue-dl { display: inline-block; padding: 7px 16px; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.2; border-radius: 999px; text-decoration: none; cursor: pointer; box-shadow: none; }
.gcg .gcg-issue-open { color: #fff; background: var(--gcg-accent); border: 1px solid var(--gcg-accent); }
.gcg .gcg-issue-dl { color: var(--gcg-accent); background: #fff; border: 1px solid #c9d3f5; }
.gcg .gcg-issue-open:hover { filter: brightness(1.08); }
.gcg .gcg-issue-dl:hover { border-color: var(--gcg-accent); }

@media (max-width: 640px) {
	.gcg-flip-view { padding: 14px 6px; }
	.gcg .gcg-fb { width: 40px; height: 40px; }
	.gcg-issues { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
	.gcg-issue-title { font-size: 15px; }
}

.gcg-flip .gcg-flip-stage { transition: transform .5s ease; }

/* Blindatura contro gli stili di temi e builder (liste puntate, colore dei link sulle icone) */
.gcg ul, .gcg ol, .gcg li { list-style: none !important; margin-left: 0; padding-left: 0; }
.gcg li::marker { content: none; }
.gcg li::before { content: none; }
.gcg .gcg-ico-pdf, .gcg .gcg-ico-big { color: var(--gcg-pdf) !important; }
.gcg .gcg-ico-box { color: var(--gcg-accent) !important; }
.gcg .gcg-ico { display: block; max-width: none; }
.gcg a.gcg-link, .gcg a.gcg-all { display: flex; text-decoration: none; }
