/* PG Compatibilità - slider, tabelle, moduli. Colori del tema Vantage del sito. */

/* ---------- Slider ---------- */
.pg-slider { position: relative; margin: 0 0 1.5em; overflow: hidden; }
.pg-slider__track { position: relative; }
.pg-slider__slide { margin: 0; }
.pg-slider__slide[hidden] { display: none; }
.pg-slider__slide img { display: block; width: 100%; height: auto; }
.pg-slider__slide figcaption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: .5em .9em; background: rgba(0, 0, 0, .55); color: #fff; font-size: .9em;
}
.pg-slider__nav {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 2.2em; height: 2.2em; border: 0; border-radius: 50%;
	background: rgba(1, 133, 177, .85); color: #fcbf16; font-size: 1.4em; line-height: 1; cursor: pointer;
}
.pg-slider__nav:hover, .pg-slider__nav:focus-visible { background: #d73f34; }
.pg-slider__prev { left: .5em; }
.pg-slider__next { right: .5em; }
.pg-slider__dots { position: absolute; bottom: .5em; right: .7em; display: flex; gap: .35em; }
.pg-slider__dots button { width: .7em; height: .7em; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .7); cursor: pointer; }
.pg-slider__dots button[aria-current="true"] { background: #fcbf16; }

/* Slider della home (sotto il menu, a tutta larghezza) */
#main-slider .pg-slider--hero { margin: 0; }
.pg-slider--hero .pg-slider__slide { aspect-ratio: 1920 / 600; background: #0185b1; }
.pg-slider--hero .pg-slider__slide a { display: block; height: 100%; }
.pg-slider--hero .pg-slider__slide img { width: 100%; height: 100%; object-fit: cover; }
.pg-slider--hero .pg-slider__dots { right: 50%; transform: translateX(50%); bottom: .8em; }
@media (max-width: 680px) {
	.pg-slider--hero .pg-slider__nav { font-size: 1em; }
}

/* ---------- Video YouTube (sostituto di YotuWP) ---------- */
.pg-videos { margin: 0 0 1.5em; }
.pg-videos--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1em; }
.pg-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.pg-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Blocchi a scomparsa (sostituto di Show-Hide) ---------- */
.pg-collapse { margin: 0 0 1.2em; }
.pg-collapse > summary { cursor: pointer; color: #d73f34; font-weight: bold; }
.pg-collapse--button > summary {
	display: inline-block; padding: .5em 1.2em; border-radius: 3px; list-style: none;
	background: #f39c12; color: #fff;
}
.pg-collapse--button > summary::-webkit-details-marker { display: none; }
.pg-collapse__body { margin-top: .8em; }

/* ---------- Tabelle ---------- */
.pg-table-wrap { overflow-x: auto; margin: 0 0 1.5em; }
.pg-table { width: 100%; border-collapse: collapse; }
.pg-table th, .pg-table td { padding: .55em .75em; border: 1px solid #ddd; text-align: left; vertical-align: top; }
.pg-table thead th { background: #0185b1; color: #fff; }
.pg-table tbody tr:nth-child(even) td { background: #f7f7f7; }

/* ---------- Moduli ---------- */
.pg-form { max-width: 720px; margin: 1.5em 0; padding: 1.25em 1.5em; background: #fafafa; border: 1px solid #e3e3e3; border-radius: 4px; }
.pg-form-field { margin: 0 0 1.1em; padding: 0; border: 0; min-width: 0; }
.pg-form-field > label, .pg-form-field > legend { display: block; margin-bottom: .35em; font-weight: bold; padding: 0; }
.pg-form input[type="text"], .pg-form input[type="email"], .pg-form input[type="number"],
.pg-form input[type="tel"], .pg-form input[type="date"], .pg-form select, .pg-form textarea {
	width: 100%; max-width: 100%; box-sizing: border-box; padding: .5em .6em;
	border: 1px solid #bbb; border-radius: 3px; background: #fff; font: inherit;
}
.pg-form input:focus, .pg-form select:focus, .pg-form textarea:focus { outline: 2px solid #0185b1; outline-offset: 1px; border-color: #0185b1; }
.pg-form-parts { display: flex; flex-wrap: wrap; gap: .6em; }
.pg-form-part { flex: 1 1 200px; }
.pg-form-sublabel { display: block; font-size: .85em; color: #666; margin-top: .2em; }
.pg-form-choice { display: block; margin: .25em 0; }
.pg-form-choice input { margin-right: .4em; }
.pg-form-html { margin: 0 0 1.1em; }
.pg-form-note { padding: .75em 1em; background: #fff8e0; border-left: 4px solid #fcbf16; }
.pg-form-note p { margin: 0 0 .3em; }
.pg-form-field--privacy label { font-weight: normal; }
.pg-req { color: #d73f34; }
.pg-form-required-note { font-size: .85em; color: #666; }
.pg-form-submit {
	padding: .65em 1.6em; border: 0; border-radius: 3px; cursor: pointer;
	background: #0185b1; color: #fcbf16; font-weight: bold; font-size: 1em;
}
.pg-form-submit:hover, .pg-form-submit:focus-visible { background: #d73f34; }
.pg-form-message { margin: 1.5em 0; padding: 1em 1.25em; border-radius: 4px; }
.pg-form-message ul { margin: .4em 0 0 1.2em; }
.pg-form-message--ok { background: #e6f4ea; border-left: 4px solid #01853e; }
.pg-form-message--error { background: #fdecea; border-left: 4px solid #d73f34; }
.pg-form-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
	.pg-slider * { transition: none !important; }
}
