/* Tortuga Beach Club — stili del tema. Colori e font di base in theme.json. */

:root {
	--tg-primary: #41317a;
	--tg-accent: #d14742;
	--tg-text: #1b1a1d;
	--tg-alt: #f3f5f8;
	--tg-light: #f9fafd;
	--tg-dark: #242828;
	--tg-gutter: 8vw;
	--tg-pad-y: clamp(64px, 6vw, 100px);
	--tg-head-gap: clamp(28px, 3vw, 48px);
	--tg-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--tg-gradient: linear-gradient(320deg, var(--tg-primary) 0%, var(--tg-accent) 100%);
}

@media (max-width: 781px) {
	:root {
		--tg-gutter: 5vw;
		--tg-pad-y: 56px;
	}
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; }
a { text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--tg-accent); outline-offset: 2px; }

.screen-reader-text, .tg-skip:not(:focus) {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.tg-skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: #fff; padding: 8px 16px; }

.tg-icon { flex: none; }

/* ------------------------------------------------------------------ header */

.tg-topbar {
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	min-height: 62px; padding: 8px var(--tg-gutter);
	font-size: 12px; line-height: 18px;
}
.tg-topbar__info { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; padding: 0; list-style: none; }
.tg-topbar a { display: inline-flex; align-items: center; gap: 8px; color: var(--tg-primary); text-decoration: none; }
.tg-topbar a:hover { color: var(--tg-accent); }
.tg-topbar .tg-icon { width: 13px; height: 13px; }

.tg-social { display: flex; align-items: center; gap: 18px; }
.tg-social a { display: inline-flex; color: var(--tg-primary); }
.tg-social a:hover { color: var(--tg-accent); }
.tg-topbar__social .tg-icon { width: 14px; height: 14px; }

.tg-header {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; justify-content: space-between; gap: 24px;
	min-height: 60px; padding: 5px var(--tg-gutter);
	background: #fff;
	box-shadow: 0 4px 12px -6px rgb(0 0 0 / 0.25);
	transition: box-shadow 0.2s;
}
.tg-header.is-stuck { box-shadow: 0 4px 16px -4px rgb(0 0 0 / 0.3); }
.admin-bar .tg-header { top: 32px; }
.tg-header__logo img { display: block; width: auto; height: 50px; }
.tg-header__logo a { color: var(--tg-primary); font-weight: 600; text-decoration: none; }

.tg-nav__list { display: flex; flex-wrap: wrap; gap: 4px 34px; margin: 0; padding: 0; list-style: none; }
.tg-nav__list a {
	display: block; padding: 6px 0; border-bottom: 1px solid transparent;
	font-size: 16px; font-weight: 400; line-height: 16px; color: var(--tg-primary); text-decoration: none;
}
.tg-nav__list a:hover { color: var(--tg-accent); }
.tg-nav__list .current-menu-item > a, .tg-nav__list .current-menu-ancestor > a { border-bottom-color: currentColor; color: var(--tg-text); }
.tg-nav__list a[href*="live-lacona-webcam"] { color: var(--tg-accent); text-transform: uppercase; }
@media (prefers-reduced-motion: no-preference) {
	.tg-nav__list a[href*="live-lacona-webcam"] { animation: tg-blink 2s linear infinite; }
}
@keyframes tg-blink { 50% { opacity: 0; } }

.tg-header__toggle { display: none; }

@media (max-width: 1024px) {
	.tg-topbar { min-height: 0; justify-content: center; gap: 22px; }
	.tg-topbar__info { gap: 22px; }
	.tg-topbar__info span { display: none; }
	.tg-header__toggle {
		display: inline-flex; padding: 8px; margin-right: -8px;
		border: 0; background: none; color: var(--tg-accent); cursor: pointer;
	}
	.tg-header__toggle .tg-icon { width: 26px; height: 26px; }
	.tg-header__toggle-close, .tg-header.is-open .tg-header__toggle-open { display: none; }
	.tg-header.is-open .tg-header__toggle-close { display: inline-flex; }
	.tg-nav {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		background: #fff; box-shadow: 0 12px 16px -8px rgb(0 0 0 / 0.25);
	}
	.tg-header.is-open .tg-nav { display: block; }
	.tg-nav__list { flex-direction: column; gap: 0; padding: 8px var(--tg-gutter) 16px; }
	.tg-nav__list a { padding: 14px 0; border-bottom: 1px solid var(--tg-alt); }
	.tg-nav__list .current-menu-item > a { border-bottom-color: var(--tg-alt); color: var(--tg-accent); }
}
@media (max-width: 782px) {
	.admin-bar .tg-header { top: 46px; }
}

/* ------------------------------------------------------------------ contenuti: base */

.tg-main { display: block; }
.tg-content > *, .tg-section > *, .tg-split__text > *, .tg-card > *, .tg-testimonial > * { margin-block: 0; }
.tg-content > * + *, .tg-section > * + *, .tg-split__text > * + *, .tg-card > * + *, .tg-testimonial > * + * { margin-block-start: 20px; }
.tg-content p:empty { display: none; }
.tg-content { overflow-wrap: anywhere; }

h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; hyphens: auto; }
h5 { font-size: 18px; font-weight: 500; color: var(--tg-text); }

.wp-block-buttons { gap: 12px; }

/* Sezioni a tutta larghezza */
.tg-section {
	padding: var(--tg-pad-y) var(--tg-gutter);
}
.tg-section > h2.has-text-align-center + * { margin-block-start: var(--tg-head-gap); }
.tg-section > .wp-block-buttons { margin-block-start: clamp(32px, 3.5vw, 50px); }
.tg-bg-alt { background-color: var(--tg-alt); }
.tg-bg-light { background-color: var(--tg-light); }
.tg-bg-gradient { background-image: var(--tg-gradient); }
.tg-section.tg-bg-gradient h2 { color: var(--tg-alt); }

/* Sezione con foto di sfondo (hero) */
.tg-hero {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	min-height: 320px;
}
.tg-hero--tall { min-height: min(88vh, 820px); }
.tg-hero--tall .wp-block-image { margin: 0; }
.tg-hero--tall .wp-block-image img { width: min(512px, 80vw); }
.tg-hero__title {
	color: #fff !important; font-style: italic;
	text-shadow: 0 2px 12px rgb(0 0 0 / 0.45);
}
@media (max-width: 781px) {
	.tg-hero { min-height: 280px; }
	.tg-hero--tall { min-height: 60vh; }
}

/* Colonne dentro le sezioni (es. testo + video, testo + carosello) */
.tg-section > .wp-block-columns { gap: 3% 8%; align-items: center !important; margin-block-end: 0; }
.tg-section > .wp-block-columns > .wp-block-column > * { margin-block: 0; }
.tg-section > .wp-block-columns > .wp-block-column > * + * { margin-block-start: 20px; }
.tg-section > .wp-block-columns > .wp-block-column > .wp-block-buttons { margin-block-start: 34px; }
@media (max-width: 781px) {
	.tg-section > .wp-block-columns:not(.tg-cards, .tg-testimonials) { row-gap: 40px; }
}
.wp-block-embed { margin: 0; }
.wp-block-embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }

/* Metà foto, metà testo */
.tg-split, .tg-feature { gap: 0 !important; margin: 0; align-items: stretch !important; }
.tg-split { min-height: 75vh; }
.tg-split__media { display: flex; }
.tg-split__media .wp-block-image, .tg-col-media .wp-block-image { flex: 1; margin: 0; }
.tg-fill img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tg-split__text { align-self: center; padding-block: 40px; }
@media (min-width: 782px) {
	.tg-split > .tg-split__media { flex: 0 0 56% !important; }
	.tg-split--media-right > .tg-split__text { padding-inline: var(--tg-gutter) 6%; }
	.tg-split--media-left > .tg-split__text { padding-inline: 4% var(--tg-gutter); }
	.tg-split__text > p { max-width: 46ch; }
}
@media (max-width: 781px) {
	.tg-split, .tg-feature { flex-direction: column; }
	.tg-split__media { order: -1; }
	.tg-split__media img { min-height: 350px; }
	.tg-split__text { padding: var(--tg-pad-y) var(--tg-gutter); }
}

/* Righe dei servizi (immagine + scheda) */
.tg-feature + .tg-feature { margin-block-start: 65px; }
.tg-feature { background: var(--tg-light); }
.tg-feature .tg-split__text { padding: 40px 8%; align-self: center; }
.tg-feature .tg-split__text h3 { font-size: 22px; text-transform: capitalize; }
.tg-feature .tg-split__text p { font-size: 14px; line-height: 1.6; }
@media (min-width: 782px) {
	.tg-feature { min-height: 480px; }
	.tg-feature > .wp-block-column { flex: 0 0 50% !important; }
}
@media (max-width: 781px) {
	.tg-feature + .tg-feature { margin-block-start: 40px; }
	.tg-feature .tg-split__media img { min-height: 260px; }
}

/* Card (servizi in home, staff) */
.tg-cards { gap: 1.5% !important; margin-block-end: 0; }
.tg-cards:has(.tg-card h3 + p) { gap: 70px !important; }
.tg-card .wp-block-image { margin: 0; }
.tg-card .wp-block-image img { display: block; width: 100%; }
.tg-card h3 { margin-block-start: 30px !important; font-size: 22px; }
.tg-card--light h3, .tg-cards:not(:has(.tg-card h3 + p)) h3 { font-weight: 300; }
.tg-card p { margin-block-start: 16px !important; }
@media (max-width: 781px) {
	.tg-cards { gap: 40px !important; }
	.tg-card h3 { margin-block-start: 16px !important; font-size: 18px; }
	/* Card con sola foto e titolo (servizi in home): due per riga invece di una */
	.tg-cards:not(:has(.tg-card h3 + p)) { gap: 32px 16px !important; }
	.tg-cards:not(:has(.tg-card h3 + p)) > .wp-block-column { flex-basis: calc(50% - 8px) !important; }
	.tg-cards:not(:has(.tg-card h3 + p)) h3 { margin-block-start: 12px !important; font-size: 16px; }
}

/* Testimonianze */
.tg-testimonials { gap: 50px !important; align-items: flex-start !important; }
.tg-testimonial__text { font-size: 15px; }
.tg-testimonial__who { gap: 16px; align-items: center; margin-block-start: 24px !important; }
.tg-testimonial__img { margin: 0; flex: none; }
.tg-testimonial__img img { display: block; width: 63px; height: 63px; border-radius: 50%; object-fit: cover; }
.tg-testimonial__name { margin: 0; font-style: italic; font-weight: 400; color: var(--tg-primary); font-size: 14px; }

/* FAQ */
.tg-faq { gap: 15% !important; align-items: flex-start !important; }
.tg-faq .wp-block-column > * + * { margin-block-start: 0 !important; }
.wp-block-details { border-bottom: 1px solid #d5d8dc; padding: 18px 0; }
.wp-block-details:first-child { border-top: 1px solid #d5d8dc; }
.wp-block-details summary {
	cursor: pointer; list-style: none; position: relative; padding-right: 28px;
	font-size: 15px; font-weight: 400; color: var(--tg-primary); text-transform: capitalize;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+"; position: absolute; right: 0; top: -2px; font-size: 22px; line-height: 1.2; color: var(--tg-accent);
	transition: transform 0.3s var(--tg-ease);
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin: 14px 0 0; font-size: 15px; }
@media (max-width: 781px) {
	.tg-faq { gap: 0 !important; }
	.tg-faq .wp-block-column + .wp-block-column .wp-block-details:first-child { border-top: 0; }
}

/* Mappa */
.tg-map iframe { display: block; width: 100%; height: 500px; border: 0; }
.tg-section:has(> .tg-map:only-child) { padding: 0; }

/* ------------------------------------------------------------------ caroselli e gallerie */

.wp-block-gallery.tg-carousel {
	display: flex; flex-wrap: nowrap !important; gap: 15px;
	overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	margin: 0;
}
.wp-block-gallery.tg-carousel::-webkit-scrollbar { display: none; }
.wp-block-gallery.has-nested-images.tg-carousel figure.wp-block-image:not(#individual-image) {
	flex: 0 0 calc((100% - 30px) / 3); width: auto; margin: 0; scroll-snap-align: start;
}
.wp-block-gallery.has-nested-images.tg-carousel--1 figure.wp-block-image:not(#individual-image) { flex-basis: 100%; }
.wp-block-gallery.tg-carousel img { aspect-ratio: 4 / 3; width: 100%; height: auto !important; object-fit: cover; }
.wp-block-gallery.tg-carousel--1 img { aspect-ratio: 3 / 2; }
.wp-block-gallery.tg-carousel--logos img { aspect-ratio: 5 / 4; object-fit: contain; }
@media (max-width: 781px) {
	.wp-block-gallery.has-nested-images.tg-carousel figure.wp-block-image:not(#individual-image) { flex-basis: 85%; }
	.wp-block-gallery.has-nested-images.tg-carousel--1 figure.wp-block-image:not(#individual-image),
	.wp-block-gallery.has-nested-images.tg-carousel--logos figure.wp-block-image:not(#individual-image) { flex-basis: 100%; }
}

/* A tutta larghezza quando il carosello è direttamente nella sezione (non per i loghi) */
.tg-section > .tg-carousel-wrap:not(:has(.tg-carousel--logos)),
.tg-section > .tg-carousel:not(.tg-carousel--logos) { margin-inline: calc(-1 * var(--tg-gutter)); }
.tg-section:has(> :last-child.tg-carousel-wrap:not(:has(.tg-carousel--logos))) { padding-bottom: calc(var(--tg-pad-y) - 10px); }
.tg-section:has(> .tg-carousel-wrap:only-child) { padding: 0; }
.tg-section > .tg-carousel-wrap:only-child { margin-inline: 0; }

.tg-carousel-wrap { position: relative; }
.tg-carousel__dots { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.tg-carousel__dots button {
	width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
	background: rgb(0 0 0 / 0.18); cursor: pointer;
}
.tg-carousel__dots button[aria-current="true"] { background: var(--tg-accent); }
.tg-bg-gradient .tg-carousel__dots button { background: rgb(255 255 255 / 0.4); }
.tg-bg-gradient .tg-carousel__dots button[aria-current="true"] { background: #fff; }
.tg-carousel__arrow {
	position: absolute; top: calc(50% - 19px); transform: translateY(-50%);
	width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
	background: rgb(255 255 255 / 0.85); color: var(--tg-primary); cursor: pointer;
	opacity: 0; transition: opacity 0.2s;
}
.tg-carousel__arrow::before { content: "‹"; font-size: 28px; line-height: 38px; }
.tg-carousel__arrow--next::before { content: "›"; }
.tg-carousel__arrow--prev { left: 12px; }
.tg-carousel__arrow--next { right: 12px; }
.tg-carousel-wrap:hover .tg-carousel__arrow, .tg-carousel__arrow:focus-visible { opacity: 1; }
.tg-carousel-wrap:has(.tg-carousel--1) .tg-carousel__arrow,
.tg-carousel-wrap:has(.tg-carousel--logos) .tg-carousel__arrow { display: none; }
@media (hover: none) { .tg-carousel__arrow { display: none; } }

/* Galleria degli articoli: a mosaico */
.wp-block-gallery.tg-masonry { display: block; columns: 3 240px; column-gap: 12px; }
.wp-block-gallery.has-nested-images.tg-masonry figure.wp-block-image:not(#individual-image) {
	display: block; width: 100%; margin: 0 0 12px; break-inside: avoid;
}

/* Ultimi articoli (home) e archivio */
ul.wp-block-latest-posts.tg-posts.is-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-inline: 0; margin-block-end: 0; padding: 0; }
@media (max-width: 781px) {
	ul.wp-block-latest-posts.tg-posts.is-grid { grid-template-columns: 1fr; }
}
ul.wp-block-latest-posts.tg-posts.is-grid li {
	display: flex; flex-direction: column; margin: 0; width: auto !important;
	background: #fff; box-shadow: 0 0 10px rgb(0 0 0 / 0.15);
}
.wp-block-latest-posts.tg-posts .wp-block-latest-posts__featured-image { margin: 0; }
.wp-block-latest-posts.tg-posts .wp-block-latest-posts__featured-image img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.wp-block-latest-posts.tg-posts .wp-block-latest-posts__post-date { padding: 16px 20px 0; font-size: 14px; font-style: italic; color: var(--tg-text); }
.wp-block-latest-posts.tg-posts .wp-block-latest-posts__post-title { padding: 6px 20px 22px; font-size: 20px; line-height: 1.4; color: var(--tg-primary); text-decoration: none; }
.wp-block-latest-posts.tg-posts .wp-block-latest-posts__post-title:hover { color: var(--tg-accent); }

/* ------------------------------------------------------------------ pagina Contatti */

.page-contatti .tg-page--full > .tg-section:first-child { padding: 0; }
.page-contatti .tg-page--full > .tg-section:first-child > .wp-block-columns { gap: 0 !important; align-items: stretch !important; }
.page-contatti .tg-page--full > .tg-section:first-child .tg-bg-gradient { padding: 15% 8% 0 0; }
.page-contatti .tg-page--full > .tg-section:first-child .tg-bg-gradient .wp-block-image { margin: 0; }
.page-contatti .tg-page--full > .tg-section:first-child .tg-bg-gradient img { display: block; width: 100%; }
.page-contatti .tg-page--full > .tg-section:first-child > .wp-block-columns > .wp-block-column:last-child { align-self: center; padding: 60px 4% 60px 3%; }
.page-contatti h1 {
	font-family: var(--wp--preset--font-family--jost); font-size: clamp(40px, 5.4vw, 78px); font-weight: 300;
	line-height: 1; text-transform: uppercase; color: var(--tg-dark);
}
.page-contatti h1 b, .page-contatti h1 strong { font-weight: 400; }
.page-contatti h1 + .wp-block-columns { margin-block-start: 40px !important; gap: 20px; align-items: flex-start !important; }
.page-contatti h3 { font-family: var(--wp--preset--font-family--jost); font-size: 20px; font-weight: 400; color: var(--tg-dark); }
.page-contatti h3 + * { margin-block-start: 10px !important; font-family: var(--wp--preset--font-family--jost); font-size: 14px; color: #525252; }
.page-contatti .tg-split { min-height: 0; }
.page-contatti .tg-split__text { padding: 5% !important; align-self: stretch; }
.page-contatti .tg-split > .tg-split__media { flex-basis: 50% !important; }
@media (max-width: 781px) {
	.page-contatti .tg-page--full > .tg-section:first-child > .wp-block-columns > .wp-block-column:last-child { padding: var(--tg-pad-y) var(--tg-gutter); }
	.page-contatti .tg-page--full > .tg-section:first-child .tg-bg-gradient { padding: 12% 12% 0 0; }
	.page-contatti .tg-split__text { padding: var(--tg-pad-y) var(--tg-gutter) !important; }
	.page-contatti .tg-split__media img { min-height: 220px; }
}

/* Form Contatti */
.tg-form { font-family: var(--wp--preset--font-family--jost); color: var(--tg-dark); }
.tg-form__title { margin: 0 0 36px; font-family: inherit; font-size: clamp(30px, 3vw, 42px); font-weight: 300; text-transform: uppercase; color: var(--tg-dark); }
.tg-form__title strong { font-weight: 400; }
.tg-form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 34px; }
.tg-form__field { margin: 0; }
.tg-form__field--messaggio { grid-column: 1 / -1; }
.tg-form label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; }
.tg-form input, .tg-form textarea {
	width: 100%; padding: 6px 2px 10px; border: 0; border-bottom: 1px solid #c9c9c9; border-radius: 0;
	background: transparent; font: 300 16px/1.4 var(--wp--preset--font-family--jost); color: var(--tg-dark);
}
.tg-form input:focus, .tg-form textarea:focus { outline: none; border-bottom-color: var(--tg-accent); }
.tg-form ::placeholder { color: #a4a4a4; }
.tg-form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tg-form__privacy { margin: 28px 0 0; font-size: 13px; color: #525252; }
.tg-form__submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 24px; }
.tg-form__button {
	padding: 14px 40px; border: 0; border-radius: 0; background: var(--tg-dark); color: #fff; cursor: pointer;
	font: 400 12px/1 var(--wp--preset--font-family--jost); letter-spacing: 1px; text-transform: uppercase;
}
.tg-form__button:hover { background: var(--tg-accent); }
.tg-form__msg { margin: 0 0 24px; padding: 14px 18px; font-size: 15px; }
.tg-form__msg--ok { background: #e8f5ec; color: #1d5c32; }
.tg-form__msg--error { background: #fdecea; color: #8a1f1a; }
@media (max-width: 600px) {
	.tg-form__grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ articoli, archivio, pagine semplici, 404 */

.tg-single__hero { height: 360px; background: var(--tg-alt) center / cover no-repeat; }
.tg-single__header { padding: 58px var(--tg-gutter) 0; }
.tg-single__header h1 { margin: 0; font-size: clamp(30px, 3.6vw, 52px); line-height: 1.1; }
.tg-date { margin: 20px 0 0; font-style: italic; font-weight: 400; color: var(--tg-text); }
.tg-single .tg-content { padding: 40px var(--tg-gutter) 0; }
.tg-single .tg-content > :is(.wp-block-gallery, .wp-block-image, .wp-block-embed) { margin-block: 40px; }
.tg-single__footer { margin: 60px var(--tg-gutter) 0; padding: 40px 0 var(--tg-pad-y); border-top: 1px solid #e3e5ea; }
.tg-single__footer .nav-links { display: flex; justify-content: space-between; gap: 24px; }
.tg-single__footer .nav-links a { display: flex; flex-direction: column; text-decoration: none; color: var(--tg-primary); }
.tg-single__footer .nav-next { margin-left: auto; text-align: right; }
.tg-postnav__label { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--tg-accent); }
.tg-share { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 30px 0 0; color: #324a6d; }
@media (max-width: 781px) {
	.tg-single__hero { height: 240px; }
}

.tg-archive__hero {
	display: flex; align-items: center; justify-content: center; min-height: 520px; padding: 40px var(--tg-gutter);
	background: var(--tg-alt) center / cover no-repeat; position: relative;
}
.tg-archive__hero::before { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / 0.25); }
.tg-archive__hero h1 { position: relative; margin: 0; font-size: clamp(34px, 3.6vw, 52px); color: #fff; text-align: center; }
.tg-archive { padding: var(--tg-pad-y) var(--tg-gutter); }
.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.tg-postcard { background: #fff; box-shadow: 0 0 10px rgb(0 0 0 / 0.15); }
.tg-postcard__link { display: block; height: 100%; color: inherit; text-decoration: none; }
.tg-postcard__media { display: block; }
.tg-postcard img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.tg-postcard__body { display: block; padding: 16px 20px 24px; }
.tg-postcard .tg-date { display: block; margin: 0; font-size: 14px; }
.tg-postcard__title { display: block; margin-top: 6px; font-size: 20px; line-height: 1.4; color: var(--tg-primary); }
.tg-postcard__link:hover .tg-postcard__title { color: var(--tg-accent); }
.nav-links .page-numbers { margin-right: 12px; }
.tg-archive .pagination { margin-top: 40px; }

.tg-page:not(.tg-page--full) { max-width: calc(1210px + 2 * var(--tg-gutter)); margin: 0 auto; padding: var(--tg-pad-y) var(--tg-gutter); }
.tg-page__header h1 { margin: 0 0 30px; }
.tg-page:not(.tg-page--full) .tg-content h2 { font-size: 26px; margin-top: 36px; }
.tg-page:not(.tg-page--full) .tg-content h3 { font-size: 20px; margin-top: 28px; }

.tg-404 { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 60vh; padding: var(--tg-pad-y) var(--tg-gutter); background: var(--tg-alt); text-align: center; }
.tg-404__code { margin: 0; font-size: 96px; font-weight: 600; line-height: 1; color: var(--tg-accent); }
.tg-404 h1 { margin: 0; }
.tg-404 .wp-block-buttons { margin-top: 20px; }

/* ------------------------------------------------------------------ footer */

.tg-footer { background: var(--tg-alt); }
.tg-footer__inner {
	display: grid; grid-template-columns: 50% 17% 1fr; gap: 0;
	padding: clamp(48px, 4.5vw, 72px) var(--tg-gutter);
}
.tg-footer__logo img { display: block; width: 190px; height: auto; }
.tg-footer__col { display: flex; flex-direction: column; gap: 10px; }
.tg-footer__title { margin: 14px 0 0; font-size: 22px; font-weight: 600; line-height: 1.2; color: var(--tg-primary); }
.tg-footer__col:first-of-type .tg-footer__title, .tg-footer__col .tg-footer__title:first-child { margin-top: 0; }
.tg-footer__col p { margin: 0; }
.tg-footer__col a { color: var(--tg-text); text-decoration: none; }
.tg-footer__col a:hover { color: var(--tg-accent); }
.tg-footer__social { gap: 22px; }
.tg-footer__social a { color: var(--tg-accent); }
.tg-footer__social a:hover { color: var(--tg-primary); }
.tg-footer__social .tg-icon { width: 22px; height: 22px; }
.tg-footer__bottom {
	padding: 10px var(--tg-gutter);
	background: radial-gradient(at 0% 0%, var(--tg-primary) 0%, var(--tg-accent) 100%);
	color: #fff; text-align: center;
}
.tg-footer__bottom p { margin: 0; }
.tg-footer__bottom a { color: #fff; }
@media (max-width: 781px) {
	.tg-footer__inner { grid-template-columns: 1fr; gap: 28px; padding-block: 48px; }
	.tg-footer__logo img { width: 160px; }
}

/* Pulsante WhatsApp (solo smartphone) */
.tg-whatsapp { position: fixed; right: 20px; bottom: 20px; z-index: 15; display: block; }
.tg-whatsapp img { display: block; width: 50px; height: 50px; }
@media (min-width: 768px) {
	.tg-whatsapp { display: none; }
}

/* ------------------------------------------------------------------ transizioni e animazioni */

/* Colori: sempre (non sono movimento). */
a, button, .wp-block-button__link, .tg-form input, .tg-form textarea {
	transition: color 0.25s, background-color 0.25s, border-color 0.25s, box-shadow 0.3s;
}

@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }

	/* Comparsa allo scroll: la classe la mette site.js solo agli elementi sotto la piega. */
	.tg-reveal {
		opacity: 0; transform: translateY(28px);
		transition: opacity 0.8s var(--tg-ease), transform 0.8s var(--tg-ease);
		transition-delay: calc(var(--tg-i, 0) * 90ms);
	}
	.tg-reveal.is-in { opacity: 1; transform: none; }

	/* Hero: il logo entra al caricamento, il titolo delle pagine interne sale. */
	.tg-hero--tall .wp-block-image { animation: tg-rise 1.1s var(--tg-ease) both 0.15s; }
	.tg-hero__title, .tg-archive__hero h1, .tg-single__header > * { animation: tg-rise 0.9s var(--tg-ease) both; }
	.tg-single__header > .tg-date { animation-delay: 0.12s; }

	/* Header: logo un po' più piccolo quando il menu resta in alto (senza spostare la pagina). */
	.tg-header__logo img { transition: transform 0.35s var(--tg-ease); transform-origin: left center; }
	.tg-header.is-stuck .tg-header__logo img { transform: scale(0.86); }

	/* Menu: sottolineatura che si allunga. */
	@media (min-width: 1025px) {
		.tg-nav__list a { position: relative; }
		.tg-nav__list a::after {
			content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
			background: currentColor; transform: scaleX(0); transform-origin: left;
			transition: transform 0.35s var(--tg-ease);
		}
		.tg-nav__list a:hover::after { transform: scaleX(1); }
	}
	.tg-header.is-open .tg-nav { animation: tg-drop 0.3s var(--tg-ease); }

	/* Pulsanti */
	.wp-block-button__link, .tg-form__button {
		transition: color 0.25s, background-color 0.25s, transform 0.3s var(--tg-ease), box-shadow 0.3s;
	}
	.wp-block-button__link:hover, .tg-form__button:hover {
		transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgb(65 49 122 / 0.6);
	}
	.wp-block-button__link:active, .tg-form__button:active { transform: none; box-shadow: none; }

	/* Foto che si avvicinano al passaggio del mouse */
	.tg-card .wp-block-image, .tg-carousel figure, .tg-masonry figure,
	.wp-block-latest-posts__featured-image, .tg-postcard__media { overflow: hidden; }
	.tg-card .wp-block-image img, .tg-carousel:not(.tg-carousel--logos) img, .tg-masonry img,
	.wp-block-latest-posts__featured-image img, .tg-postcard img { transition: transform 0.9s var(--tg-ease); }
	.tg-card:hover .wp-block-image img, .tg-carousel:not(.tg-carousel--logos) figure:hover img, .tg-masonry figure:hover img,
	ul.tg-posts li:hover .wp-block-latest-posts__featured-image img, .tg-postcard:hover img { transform: scale(1.06); }
	.tg-carousel--logos img { transition: transform 0.4s var(--tg-ease); }
	.tg-carousel--logos figure:hover img { transform: scale(1.05); }

	/* Card degli articoli che si sollevano */
	ul.wp-block-latest-posts.tg-posts.is-grid li, .tg-postcard { transition: transform 0.4s var(--tg-ease), box-shadow 0.4s; }
	ul.wp-block-latest-posts.tg-posts.is-grid li:hover, .tg-postcard:hover {
		transform: translateY(-6px); box-shadow: 0 18px 30px -14px rgb(0 0 0 / 0.3);
	}

	/* Icone social e frecce del carosello */
	.tg-social a { transition: color 0.25s, transform 0.3s var(--tg-ease); }
	.tg-social a:hover { transform: translateY(-2px); }
	.tg-carousel__arrow { transition: opacity 0.25s, transform 0.3s var(--tg-ease); }
	.tg-carousel__arrow:hover { transform: translateY(-50%) scale(1.08); }
	.tg-carousel__dots button { transition: background-color 0.25s, transform 0.25s; }
	.tg-carousel__dots button[aria-current="true"] { transform: scale(1.4); }

	/* WhatsApp: un'onda leggera ogni tanto */
	.tg-whatsapp::before {
		content: ""; position: absolute; inset: 0; border-radius: 50%;
		box-shadow: 0 0 0 0 rgb(37 211 102 / 0.5); animation: tg-pulse 3s ease-out infinite 2s;
	}
}

@keyframes tg-rise { from { opacity: 0; transform: translateY(24px); } }
@keyframes tg-drop { from { opacity: 0; transform: translateY(-10px); } }
@keyframes tg-pulse { 70%, 100% { box-shadow: 0 0 0 16px rgb(37 211 102 / 0); } }
