/*
Theme Name:   Ollie Trek
Description:  Tema child di Ollie per Trekking Paradise. Layout «Riviera» (bozze/bozza-5-riviera.html).
Template:     ollie
Version:      1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain:  ollie-trek
License:      GNU General Public License v2 or later
*/

/* Le classi del layout hanno il prefisso tp- per non scontrarsi con quelle di WordPress e di Ollie.
   I colori vengono dalla palette di theme.json. */
:root {
	--tp-lago: var(--wp--preset--color--primary);
	--tp-lago-scuro: var(--wp--preset--color--main-accent);
	--tp-lago-chiaro: var(--wp--preset--color--primary-accent);
	--tp-sabbia: var(--wp--preset--color--tertiary);
	--tp-olivo: var(--wp--preset--color--primary-alt);
	--tp-olivo-chiaro: var(--wp--preset--color--primary-alt-accent);
	--tp-testo: var(--wp--preset--color--main);
	--tp-muto: var(--wp--preset--color--secondary);
	--tp-linea: var(--wp--preset--color--border-light);
	--tp-ambra: #c98a2b;
	--tp-r: 20px;
}

.tp-i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; display: block; }
.tp-wrap { max-width: 1200px; margin-left: auto !important; margin-right: auto !important; padding-left: 20px; padding-right: 20px; box-sizing: border-box; width: 100%; }
.tp-wrap > * { margin-block-start: 0; }
.tp-main { margin-block-start: 0 !important; }
.tp-main a, .tp-header a, .tp-footer a { text-decoration: none; }

/* ---------- pulsanti ---------- */
.tp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 12px; font-weight: 700; font-size: 15px; line-height: 1.2; border: 0; cursor: pointer; white-space: nowrap; font-family: inherit; transition: background .15s; }
.tp-btn-p { background: var(--tp-lago); color: #fff !important; }
.tp-btn-p:hover { background: var(--tp-lago-scuro); }
.tp-btn-g { background: #fff; color: var(--tp-testo) !important; border: 1px solid var(--tp-linea); }
.tp-btn-g:hover { border-color: var(--tp-lago); }
.tp-btn-w { background: #fff; color: var(--tp-lago-scuro) !important; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.tp-header { background: #fff; border-bottom: 1px solid var(--tp-linea); }
.tp-nav { display: flex; align-items: center; justify-content: space-between; min-height: 74px; gap: 20px; }
.tp-logo { display: flex; align-items: center; gap: 10px; color: var(--tp-lago-scuro); }
.tp-logo svg { flex: none; }
.tp-logo .wp-block-site-title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.tp-logo .wp-block-site-title a { color: var(--tp-lago-scuro); }
.tp-logo .wp-block-site-tagline { margin: 0; font-size: 11px; font-weight: 600; color: var(--tp-muto); letter-spacing: .02em; line-height: 1.3; }
.tp-header .wp-block-navigation { font-size: 15px; font-weight: 600; gap: 4px; }
.tp-header .wp-block-navigation .wp-block-navigation__container { gap: 4px; }
.tp-header .wp-block-navigation-item__content { padding: 9px 14px !important; border-radius: 10px; color: var(--tp-muto); }
.tp-header .wp-block-navigation-item__content:hover { background: var(--tp-sabbia); color: var(--tp-testo); }
.tp-header .current-menu-item > .wp-block-navigation-item__content,
.tp-header .current-menu-ancestor > .wp-block-navigation-item__content { color: var(--tp-lago); background: var(--tp-lago-chiaro); }
.tp-header .wp-block-navigation__submenu-container { border: 1px solid var(--tp-linea) !important; border-radius: 14px; padding: 6px !important; box-shadow: 0 18px 40px -24px rgba(14, 59, 76, .5); min-width: 240px !important; }
.tp-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 8px 12px !important; }
.tp-header .wp-block-navigation-submenu__toggle { padding: 0 6px 0 0; }
.tp-header .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.tp-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: 8px 0 !important; }
@media (min-width: 600px) and (max-width: 1000px) { .tp-nav { flex-wrap: wrap !important; padding-top: 10px; padding-bottom: 10px; } }

/* selettore della lingua accanto al menu (per ora segnaposto: solo l'italiano è attivo) */
.tp-nav-dx { gap: 8px; align-items: center; }
.tp-lang { position: relative; font-size: 15px; font-weight: 600; }
.tp-lang summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--tp-linea); border-radius: 10px; color: var(--tp-muto); cursor: pointer; }
.tp-lang summary::-webkit-details-marker { display: none; }
.tp-lang summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); margin-left: 2px; }
.tp-lang summary:hover, .tp-lang[open] summary { background: var(--tp-sabbia); color: var(--tp-testo); }
.tp-lang summary:focus-visible { outline: 2px solid var(--tp-lago); outline-offset: 2px; }
.tp-lang summary .tp-i { width: 17px; height: 17px; }
.tp-lang ul { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; list-style: none; margin: 0; padding: 6px; background: #fff; border: 1px solid var(--tp-linea); border-radius: 14px; box-shadow: 0 18px 40px -24px rgba(14, 59, 76, .5); }
.tp-lang li a, .tp-lang li span { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; color: var(--tp-testo); }
.tp-lang li a[aria-current] { color: var(--tp-lago); background: var(--tp-lago-chiaro); }
.tp-lang li span { color: var(--tp-muto); cursor: default; }
.tp-lang small { font-size: 11px; font-weight: 700; color: var(--tp-ambra); text-transform: uppercase; letter-spacing: .04em; }
/* effetti: apertura morbida, freccia che gira, voce evidenziata, spunta sulla lingua corrente, voci senza traduzione più tenui */
.tp-lang summary::after { transition: transform .15s ease; }
.tp-lang[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.tp-lang[open] ul { animation: tp-lang-apri .15s ease-out; }
@keyframes tp-lang-apri { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.tp-lang li a { transition: background .15s, color .15s; text-decoration: none; white-space: nowrap; }
.tp-lang li a:hover, .tp-lang li a:focus-visible { background: var(--tp-sabbia); outline: none; }
.tp-lang li a[aria-current]::after { content: "✓"; font-weight: 700; }
.tp-lang li a[aria-current]:hover { background: var(--tp-lago-chiaro); }
.tp-lang li a.tp-lang-manca { color: var(--tp-muto); }
@media (prefers-reduced-motion: reduce) {
	.tp-lang[open] ul { animation: none; }
	.tp-lang summary::after, .tp-lang li a { transition: none; }
}

/* ---------- titoli di sezione ---------- */
.tp-main > .wp-block-post-content > * { margin-block-start: 0; }
.tp-blocco { padding-top: 96px; padding-bottom: 96px; }
.tp-pt-20 { padding-top: 20px !important; }
.tp-pt-0 { padding-top: 0 !important; }
.tp-tsez { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.tp-tsez .tp-k, .tp-k { display: block; font-size: 13px; font-weight: 700; color: var(--tp-olivo); text-transform: uppercase; letter-spacing: .1em; margin: 0; }
.tp-tsez h2 { font-size: clamp(30px, 3.6vw, 42px); margin: 6px 0 0; color: var(--tp-lago-scuro); }
.tp-tsez p { color: var(--tp-muto); max-width: 440px; margin: 0; }

/* ---------- segnaposto per contenuti in arrivo ---------- */
.tp-segnaposto { border: 2px dashed var(--tp-linea); border-radius: var(--tp-r); background: var(--tp-sabbia); color: var(--tp-muto); padding: 40px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; }
.tp-segnaposto > * { margin: 0; max-width: 680px; }
.tp-segnaposto strong { color: var(--tp-lago-scuro); }
@media (max-width: 600px) { .tp-segnaposto { padding: 24px; } }

/* ---------- home: mappa dei percorsi ---------- */
.tp-mappa { margin: 0; }
.tp-mappa img { display: block; width: 100%; height: auto; border-radius: var(--tp-r); }

/* ---------- home: hero ---------- */
.tp-hero { padding: 20px 0 0; }
.tp-hero-box { position: relative; border-radius: 28px; overflow: hidden; min-height: 600px; display: flex; align-items: flex-end; background: var(--tp-lago-scuro) url(assets/img/paesaggio.svg) center / cover no-repeat; }
/* dal 2/11 la foto senza velo: titolo e frase si leggono con un'ombra sulle lettere */
.tp-hero-txt { text-shadow: 0 1px 3px rgba(0, 0, 0, .6), 0 0 26px rgba(0, 0, 0, .45); }
.tp-hero-txt .tp-pill { text-shadow: none; }
.tp-hero-txt { position: relative; z-index: 2; padding: 56px; max-width: 640px; color: #fff; margin-bottom: 60px; }
/* foto che scorrono dietro al titolo (Struttura sito.pdf, p. 1): didascalia e pallini a destra */
.tp-hero-box { isolation: isolate; }
.tp-hs { position: absolute; inset: 0; z-index: 0; }
.tp-hs-s { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.tp-hs-s.is-on { opacity: 1; }
.tp-hs-s img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tp-hs-ui { position: absolute; right: 32px; bottom: 80px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: 380px; }
.tp-hs-cap { font-size: 13px; font-weight: 600; color: #fff; background: rgba(14, 59, 76, .55); backdrop-filter: blur(6px); padding: 6px 12px; border-radius: 99px; text-align: right; }
.tp-hs-dots { display: flex; gap: 6px; }
.tp-hs-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .3s, background .3s; }
.tp-hs-dots button[aria-current="true"] { width: 26px; background: #fff; }
.tp-hs-dots button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* su schermi stretti didascalia e pallini vanno sotto il testo, centrati */
@media (max-width: 920px) {
	.tp-hero-box:has(.tp-hs) .tp-hero-txt { margin-bottom: 120px; }
	.tp-hs-ui { left: 16px; right: 16px; bottom: 62px; max-width: none; align-items: center; }
	.tp-hs-cap { text-align: center; }
}
.tp-hero-txt > * { margin: 0; }
.tp-pill { display: inline-flex !important; align-items: center; gap: 8px; background: rgba(255, 255, 255, .16); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .3); padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; color: #fff; }
.tp-hero h1 { font-size: clamp(40px, 5.6vw, 68px); margin: 18px 0 16px; color: #fff; }
.tp-hero-txt p:not(.tp-pill) { font-size: 18px; color: #e2eef2; max-width: 500px; }

.tp-cerca { position: relative; z-index: 3; margin: -46px auto 0; max-width: 1060px; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px -24px rgba(14, 59, 76, .45); padding: 12px; display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 6px; }
.tp-campo { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 12px; cursor: pointer; }
.tp-campo:hover { background: var(--tp-sabbia); }
.tp-campo .tp-i { color: var(--tp-lago); }
.tp-campo span { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.tp-campo small { font-size: 12px; color: var(--tp-muto); font-weight: 600; }
.tp-campo select { font: inherit; font-size: 15px; font-weight: 700; color: var(--tp-testo); border: 0 !important; box-shadow: none !important; background: transparent; padding: 0; cursor: pointer; width: 100%; appearance: none; -webkit-appearance: none; }
.tp-campo select:focus-visible { outline: 2px solid var(--tp-lago); outline-offset: 4px; border-radius: 4px; }
.tp-cerca .tp-btn { height: 100%; min-height: 56px; padding: 0 26px; }
@media (max-width: 920px) {
	.tp-hero-txt { padding: 30px; margin-bottom: 70px; }
	.tp-hero-box { min-height: 520px; }
	.tp-cerca { grid-template-columns: 1fr 1fr; margin: -40px 12px 0; }
	.tp-cerca .tp-btn { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .tp-cerca { grid-template-columns: 1fr; } }

/* ---------- mosaico località ---------- */
.tp-mosaico { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 190px; grid-auto-flow: dense; gap: 14px; }
.tp-tile { position: relative; border-radius: var(--tp-r); overflow: hidden; color: #fff !important; display: flex; align-items: flex-end; padding: 18px; background-size: cover; background-position: center; }
/* tessere di località e percorsi: dal 2/11 la foto con i suoi colori, niente velo; il testo bianco si legge con un'ombra sulle lettere */
.tp-tile .tp-t { text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 0 16px rgba(0, 0, 0, .45); }
.tp-tile .tp-n { text-shadow: none; }
.tp-tile .tp-t { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; width: 100%; gap: 10px; }
.tp-tile h3 { font-size: 19px; margin: 0; color: inherit; }
.tp-tile small { font-size: 13px; opacity: .9; }
.tp-tile .tp-n { background: #fff; color: var(--tp-lago-scuro); font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.tp-tile.tp-big { grid-column: span 2; grid-row: span 2; }
.tp-tile.tp-big h3 { font-size: 30px; }
.tp-tile.tp-wide { grid-column: span 2; }
.tp-tile.tp-tutte { background: var(--tp-sabbia); color: var(--tp-lago-scuro) !important; }
.tp-tile.tp-tutte .tp-t { align-items: center; text-shadow: none; }
.tp-tile.tp-tutte .tp-i { width: 28px; height: 28px; }
@media (max-width: 900px) {
	.tp-mosaico { grid-template-columns: 1fr 1fr; grid-auto-rows: 150px; }
	.tp-tile.tp-big { grid-row: span 2; }
}

/* ---------- griglia località (tessere uguali) ---------- */
.tp-griglia { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tp-griglia .tp-tile { aspect-ratio: 4 / 3; padding: 20px; }
a.tp-tile, a.tp-card { text-decoration: none; } /* gli stili globali sottolineano i link del contenuto */
/* riquadri mappe online / libretto, accanto all'ultima località */
.tp-servizi { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tp-srv { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 20px; border-radius: var(--tp-r); background: #fff; border: 1px solid var(--tp-linea); color: var(--tp-testo) !important; text-decoration: none; transition: border-color .2s; }
a.tp-srv:hover { border-color: var(--tp-lago); }
.tp-srv--vuoto { border-style: dashed; }
.tp-srv-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-srv-t b { font-size: 17px; color: var(--tp-lago-scuro); }
.tp-srv-t small { font-size: 14px; color: var(--tp-muto); }
.tp-srv-t em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--tp-ambra); text-transform: uppercase; letter-spacing: .06em; margin-top: 6px; }
.tp-qr { flex: none; width: 84px; height: 84px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--tp-muto); background: repeating-linear-gradient(45deg, var(--tp-sabbia) 0 6px, #fff 6px 12px); border: 1px solid var(--tp-linea); }
.tp-srv--libretto { background: var(--tp-sabbia); }
.tp-srv-dl { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--tp-lago); }
.tp-srv-dl .tp-i { width: 24px; height: 24px; }
@media (max-width: 900px) { .tp-griglia { grid-template-columns: 1fr 1fr; gap: 14px; } .tp-servizi { grid-column: 1 / -1; gap: 14px; } }
@media (max-width: 560px) { .tp-griglia, .tp-servizi { grid-template-columns: 1fr; } }

/* ---------- card percorsi ---------- */
.tp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tp-cards.tp-c2 { grid-template-columns: 1fr 1fr; }
.tp-card { border-radius: 22px; overflow: hidden; background: #fff; border: 1px solid var(--tp-linea); transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; color: var(--tp-testo) !important; }
.tp-card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px rgba(14, 59, 76, .5); }
.tp-card[hidden] { display: none; }
.tp-card .tp-img { aspect-ratio: 3 / 2; position: relative; background: linear-gradient(160deg, #cfe6ee, #7f9447); }
.tp-c2 .tp-card .tp-img { aspect-ratio: 16 / 8; }
.tp-card .tp-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tp-lbl { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; z-index: 1; }
.tp-lbl span { background: rgba(255, 255, 255, .95); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 8px; color: var(--tp-lago-scuro); }
.tp-lbl span.tp-f { background: var(--tp-olivo); color: #fff; }
.tp-lbl span.tp-m { background: var(--tp-ambra); color: #fff; }
.tp-card .tp-b { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tp-da { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tp-muto); font-weight: 600; }
.tp-da .tp-i { width: 15px; height: 15px; flex: none; }
.tp-da a { color: inherit; text-decoration: none; }
.tp-da a:hover { color: var(--tp-lago); text-decoration: underline; }
.tp-card h3 { font-size: 20px; color: var(--tp-lago-scuro); margin: 0; }
.tp-met { display: flex; gap: 16px; flex-wrap: wrap; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--tp-linea); font-size: 14px; font-weight: 600; }
.tp-met span { display: flex; align-items: center; gap: 6px; }
.tp-met .tp-i { width: 17px; height: 17px; color: var(--tp-lago); }
.tp-met .tp-nd { color: var(--tp-muto); font-weight: 500; }
@media (max-width: 980px) { .tp-cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .tp-cards, .tp-cards.tp-c2 { grid-template-columns: 1fr; } }

/* ---------- banda vantaggi ---------- */
.tp-vantaggi { background: var(--tp-sabbia); }
.tp-vgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.tp-v .tp-ic { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--tp-lago); display: grid; place-items: center; margin-bottom: 16px; box-shadow: 0 6px 16px -10px rgba(14, 59, 76, .4); }
.tp-v h3 { font-size: 18px; margin: 0 0 6px; }
.tp-v p { color: var(--tp-muto); font-size: 15px; margin: 0; }
@media (max-width: 860px) { .tp-vgrid { grid-template-columns: 1fr 1fr; } }

/* ---------- pagina località ---------- */
.tp-loc-banner { position: relative; height: 340px; border-radius: 0 0 28px 28px; overflow: hidden; color: #fff; background: var(--tp-lago-scuro) url(assets/img/paesaggio.svg) center / cover no-repeat; }
/* testata di località e strutture: dal 2/11 la copertina senza velo, il testo con un'ombra sulle lettere */
.tp-loc-banner .tp-wrap { text-shadow: 0 1px 3px rgba(0, 0, 0, .65), 0 0 22px rgba(0, 0, 0, .45); }
.tp-loc-banner .tp-wrap { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 40px; }
.tp-brc { font-size: 13px; font-weight: 600; opacity: .85; margin: 0 0 8px; }
.tp-brc a { color: inherit !important; }
.tp-brc a:hover { text-decoration: underline; }
.tp-loc-banner h1 { font-size: clamp(36px, 5vw, 56px); margin: 0; color: #fff; }
.tp-infobar { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 12px; font-weight: 600; font-size: 15px; }
.tp-infobar span { display: flex; gap: 8px; align-items: center; }
.tp-loc-body { display: grid; grid-template-columns: 270px 1fr; gap: 36px; padding-top: 44px; padding-bottom: 90px; }
.tp-loc-body > div { min-width: 0; }
.tp-filtri { position: sticky; top: 110px; align-self: start; border: 1px solid var(--tp-linea); border-radius: var(--tp-r); padding: 20px; }
.tp-filtri h3 { font-size: 16px; margin: 0 0 12px; }
.tp-fg { border: 0; border-top: 1px solid var(--tp-linea); padding: 14px 0; margin: 0; }
.tp-fg:first-of-type { border: 0; padding-top: 0; }
.tp-fg legend { display: block; float: left; width: 100%; font-size: 13px; font-weight: 700; color: var(--tp-muto); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .06em; padding: 0; }
.tp-fg label { clear: both; display: flex; gap: 10px; align-items: center; font-size: 15px; padding: 4px 0; cursor: pointer; }
.tp-fg input { accent-color: var(--tp-lago); width: 17px; height: 17px; margin: 0; }
.tp-filtri .tp-reset { font-size: 14px; font-weight: 600; color: var(--tp-lago); background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.tp-risultati-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.tp-vuoto { border: 1px dashed var(--tp-linea); border-radius: var(--tp-r); padding: 32px; text-align: center; color: var(--tp-muto); }
.tp-loc-extra { padding-top: 44px; } /* mappa della località, tra la testata e i percorsi */
.tp-loc-extra > .wp-block-post-content > :first-child { margin-top: 0; }
.tp-griglia--perc { gap: 16px; }
.tp-tile--perc { padding: 16px; }
.tp-tile--perc .tp-t { flex-direction: column; align-items: flex-start; }
.tp-tile--perc .tp-n { display: inline-block; margin-bottom: 8px; }
.tp-tile--perc h3 { font-size: 17px; line-height: 1.25; }
/* card-tessera: foto con numero e nome, sotto la fascia bianca dei dati tecnici */
.tp-card--tile .tp-tile { border-radius: 0; }
.tp-card--tile .tp-tile h3 { color: #fff; font-size: 17px; } /* altrimenti vince .tp-card h3 (scuro) */
.tp-card--tile .tp-b { padding: 14px 16px; }
.tp-card--tile .tp-met { padding-top: 0; border-top: 0; gap: 6px 14px; font-size: 13px; }
.tp-card--tile .tp-met .tp-i { width: 15px; height: 15px; }
.tp-card[hidden], .tp-tile[hidden] { display: none; }
.tp-loc-extra img { border-radius: var(--tp-r); }
@media (max-width: 900px) { .tp-loc-body { grid-template-columns: 1fr; } .tp-filtri { position: static; } }

/* ---------- scheda percorso ---------- */
.tp-gal { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 10px; border-radius: 24px; overflow: hidden; margin-top: 24px; position: relative; }
.tp-gal > a { display: block; background: var(--tp-lago-chiaro); }
.tp-gal > a:first-child { grid-row: span 2; }
.tp-gal img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .2s; }
.tp-gal > a:hover img { opacity: .9; }
.tp-gal .tp-all { position: absolute; right: 16px; bottom: 16px; }
.tp-gal--1 { grid-template-columns: 1fr; grid-template-rows: 420px; }
.tp-gal--2 { grid-template-columns: 2fr 1fr; }
.tp-gal--3 { grid-template-columns: 2fr 1fr; }
.tp-gal--2 > a:last-of-type { grid-row: span 2; }
.tp-gal--4 { grid-template-columns: 2fr 1fr 1fr; }
.tp-gal--4 > a:nth-of-type(4) { grid-column: span 2; }
@media (max-width: 760px) {
	.tp-gal, .tp-gal--2, .tp-gal--3, .tp-gal--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 110px; }
	.tp-gal > a:first-child { grid-column: span 2; grid-row: auto; }
	.tp-gal > a:nth-of-type(n+4) { display: none; }
	.tp-gal--1 { grid-template-columns: 1fr; grid-template-rows: 260px; }
	.tp-gal--1 > a:first-child { grid-column: auto; }
	.tp-gal--2 > a:last-of-type { grid-row: auto; grid-column: span 2; }
}
.tp-sch-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; padding: 30px 0 24px; border-bottom: 1px solid var(--tp-linea); flex-wrap: wrap; }
.tp-sch-head .tp-brc { color: var(--tp-muto); opacity: 1; }
.tp-sch-head h1 { font-size: clamp(32px, 4.4vw, 50px); color: var(--tp-lago-scuro); margin: 8px 0; }
.tp-code { display: inline-block; background: var(--tp-lago-chiaro); color: var(--tp-lago); font-weight: 800; font-size: 13px; padding: 5px 10px; border-radius: 8px; }
.tp-azioni { display: flex; gap: 10px; flex-wrap: wrap; }
/* testa della scheda: foto della Gallery che scorrono (o la copertina fissa), tagliate a 21:9 */
.tp-scheda > .tp-fly { margin-top: 20px !important; }
.tp-fly { margin: 0; aspect-ratio: 21 / 9; border-radius: 28px; overflow: hidden; background: var(--tp-lago-scuro); }
.tp-fly img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 700px) { .tp-fly { aspect-ratio: 16 / 9; border-radius: 20px; } }
/* come lo slider della home, senza didascalia: tutta la foto apre l'ingrandimento, pallini o contatore in basso a destra */
.tp-sch-hs { position: relative; isolation: isolate; }
.tp-sch-hs .tp-hs-ui { left: auto; right: 20px; bottom: 20px; }
.tp-sch-hs .tp-sl-n { position: static; }
.tp-hs-open { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; padding: 16px; border: 0; background: none; cursor: zoom-in; }
.tp-hs-open .tp-i { width: 38px; height: 38px; padding: 9px; box-sizing: border-box; border-radius: 50%; background: rgba(14, 59, 76, .6); backdrop-filter: blur(6px); color: #fff; }
.tp-hs-open:hover .tp-i { background: rgba(14, 59, 76, .85); }
.tp-hs-open:focus-visible { outline: 3px solid #fff; outline-offset: -6px; border-radius: 28px; }
@media (max-width: 700px) { .tp-sch-hs .tp-hs-ui { right: 14px; bottom: 14px; } .tp-hs-open { padding: 10px; } }
.tp-chips { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; padding: 24px 0; }
.tp-chip { border: 1px solid var(--tp-linea); border-radius: 16px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.tp-chip .tp-i { width: 22px; height: 22px; color: var(--tp-lago); }
.tp-chip small { display: block; font-size: 12px; color: var(--tp-muto); font-weight: 600; }
.tp-chip b { font-size: 17px; }
@media (max-width: 980px) { .tp-chips { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .tp-chips { grid-template-columns: 1fr 1fr; } }
.tp-sch-grid { display: grid !important; grid-template-columns: minmax(0, 1fr) 360px; gap: 44px; padding-top: 16px; padding-bottom: 60px; }
.tp-sch-grid > * { margin-block-start: 0 !important; min-width: 0; }
.tp-sch-main h2 { font-size: 24px; color: var(--tp-lago-scuro); margin: 36px 0 12px; }
.tp-sch-main > .tp-sch-desc { margin-top: 0; }
.tp-sch-main > .wp-block-post-content > * + * { margin-top: 1em; }
.tp-sch-main > .wp-block-post-content > :first-child { margin-top: 0; }
.tp-sch-main li + li { margin-top: .3em; }
.tp-sch-main p { color: #34444b; }
.tp-panel { border: 1px solid var(--tp-linea); border-radius: 18px; padding: 18px; background: #fff; }
.tp-panel h3 { font-size: 17px; margin: 0 0 12px; }
.tp-panel p { font-size: 15px; color: var(--tp-muto); margin: 0 0 12px; }
.tp-panel--map { padding: 0; overflow: hidden; }
.tp-panel--map .trek-map { border-radius: 0; margin: 0; }
.tp-panel--map .trek-profile { margin: 0; padding: 16px; border-top: 1px solid var(--tp-linea); }
.tp-panel--map > img { display: block; width: 100%; height: auto; }
.tp-panel--lago { background: var(--tp-lago-chiaro); border-color: transparent; }
.tp-panel .tp-btn { width: 100%; }
.tp-side { display: grid; gap: 16px; align-content: start; position: sticky; top: 110px; align-self: start; }
.tp-lst { display: grid; gap: 10px; list-style: none; font-size: 15px; padding: 0; margin: 0; }
.tp-lst li { display: flex; gap: 10px; align-items: center; }
.tp-lst a { color: var(--tp-lago); font-weight: 600; }
.tp-lst a:hover { text-decoration: underline; }
.tp-lst .tp-i { width: 18px; height: 18px; color: var(--tp-lago); }
.tp-lst small { margin-left: auto; color: var(--tp-muto); font-size: 12px; font-weight: 700; }
.tp-altri { padding-bottom: 90px; }
@media (max-width: 960px) { .tp-sch-grid { grid-template-columns: 1fr; } .tp-side { position: static; } }

/* ---------- strutture ---------- */
.tp-card .tp-img-ic { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .9); }
.tp-card .tp-img-ic .tp-i { width: 56px; height: 56px; stroke-width: 1.4; }
.tp-card--str .tp-img { aspect-ratio: 16 / 7; background: linear-gradient(160deg, #a9d2df, #1f6f8b); }
.tp-card--str.tp-cat-mangiare .tp-img { background: linear-gradient(160deg, #ead7b5, #b88a4a); }
.tp-card--str.tp-cat-prodotti .tp-img { background: linear-gradient(160deg, #d6dfb3, #6b7d3a); }
.tp-card--str.tp-cat-servizi .tp-img { background: linear-gradient(160deg, #cdd8e6, #5b7894); }
.tp-card--str .tp-da { align-items: flex-start; }
.tp-card--loc:hover { transform: none; }
.tp-card--loc .tp-img { display: block; aspect-ratio: 16 / 7; }
.tp-card a, .tp-card--loc .tp-lst a { text-decoration: none; }
.tp-card--loc .tp-lst a:hover { text-decoration: underline; }
.tp-card--loc h3 a { color: inherit; }
.tp-card--loc h3 a:hover { color: var(--tp-lago); }
.tp-str-sez { scroll-margin-top: 110px; }
.tp-str-sez + .tp-str-sez { margin-top: 44px; }
.tp-str-sez h2 { display: flex; align-items: center; gap: 12px; font-size: 24px; color: var(--tp-lago-scuro); margin: 0 0 16px; }
.tp-str-sez h2 .tp-i { width: 26px; height: 26px; color: var(--tp-lago); }
.tp-sch-main > .tp-sch-desc:empty, .tp-sch-main > .wp-block-post-content:empty { display: none; }

/* ---------- scheda percorso (Struttura sito.pdf, pagine 5-6) ---------- */
.tp-scheda > * { margin-block-start: 0 !important; }
.tp-sch-box { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; margin-top: 28px !important; }
.tp-sch-intro { padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.tp-breve { margin: 0; font-size: 16px; line-height: 1.6; color: #34444b; }
.tp-breve > * { margin: 0; }
.tp-breve > * + * { margin-top: .8em; }
.tp-breve ul { padding-left: 1.2em; }
.tp-breve h2, .tp-breve h3 { font-size: 18px; color: var(--tp-lago-scuro); }
.tp-breve > h2, .tp-breve > h3 { margin-top: 1.2em; }
.tp-breve li + li { margin-top: .2em; }
.tp-breve.tp-nd, .tp-sch-sez > .tp-nd { color: var(--tp-muto); font-style: italic; }
.tp-sch-testo > * { margin: 0; }
.tp-sch-testo > * + * { margin-top: 1em; }
.tp-sch-testo > h2 + *, .tp-sch-testo > h3 + * { margin-top: .4em; }
.tp-sch-intro .tp-chips { grid-template-columns: repeat(3, 1fr); padding: 0; margin-top: auto; }
.tp-chip b.tp-nd { font-size: 14px; font-weight: 600; color: var(--tp-muto); }
.tp-sch-az { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.tp-sch-az > :last-child:nth-child(odd) { grid-column: 1 / -1; } /* pulsanti in numero dispari: l'ultimo prende la riga */
.tp-sch-box--solo { grid-template-columns: minmax(0, 1fr); } /* nessun pulsante: la descrizione a tutta larghezza */
.tp-az { display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 18px; border-radius: 18px; border: 1px solid var(--tp-linea); background: #fff; color: var(--tp-testo) !important; text-decoration: none; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
a.tp-az:hover, button.tp-az:hover { border-color: var(--tp-lago); background: var(--tp-lago-chiaro); }
.tp-az > .tp-i { width: 26px; height: 26px; color: var(--tp-lago); }
.tp-az span { display: flex; flex-direction: column; gap: 2px; }
.tp-az b { font-size: 16px; color: var(--tp-lago-scuro); }
.tp-az small { font-size: 13px; color: var(--tp-muto); }
.tp-sch-sez { margin-top: 56px !important; }
.tp-sch-sez > h2 { font-size: 26px; color: var(--tp-lago-scuro); margin: 0 0 16px; }
.tp-mappa-vuota { aspect-ratio: 16 / 8; }
.tp-panel--map > .tp-mappa-vuota { border: 0; border-radius: 0; }
.tp-panel--map > a > img { display: block; width: 100%; height: auto; }
.tp-gpx .gpxrm-elevation { margin: 0; padding: 12px 16px 16px; border-top: 1px solid var(--tp-linea); }
/* il plugin passa al tema scuro con prefers-color-scheme: qui resta sempre chiaro come il sito (traccia: verde del plugin) */
.tp-gpx .gpxrm { --gpxrm-surface: #fff; --gpxrm-border: var(--tp-linea); --gpxrm-text: var(--tp-testo); --gpxrm-muted: var(--tp-muto); }
.tp-gpx .gpxrm-map, .tp-gpx .gpxrm-placeholder { background: var(--tp-sabbia); }
.tp-sch-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 56px 0 90px !important; }
.tp-scheda + .tp-altri { padding-top: 0; }
@media (max-width: 960px) { .tp-sch-box { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .tp-sch-intro .tp-chips { grid-template-columns: 1fr 1fr; } .tp-mappa-vuota { aspect-ratio: 4 / 3; } }

/* frecce e contatore delle foto (foto ingrandita; il contatore anche sulle foto in testa oltre 10) */
.tp-sl-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--tp-lago-scuro); display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px -8px rgba(0, 0, 0, .4); }
.tp-sl-btn:hover { background: #fff; }
.tp-sl-btn .tp-i { width: 20px; height: 20px; }
.tp-sl-prev { left: 14px; }
.tp-sl-prev .tp-i { transform: rotate(180deg); }
.tp-sl-next { right: 14px; }
.tp-sl-n { position: absolute; right: 16px; bottom: 16px; background: rgba(14, 59, 76, .78); color: #fff; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 99px; }

/* flyover in finestra */
.tp-dlg { border: 0; padding: 0; border-radius: var(--tp-r); width: min(1000px, 94vw); background: #000; overflow: visible; }
.tp-dlg::backdrop { background: rgba(8, 30, 38, .8); }
.tp-dlg .trek-flyover { margin: 0; }
.tp-dlg video, .tp-dlg iframe { display: block; width: 100%; border-radius: var(--tp-r); }
.tp-dlg form { position: absolute; top: -48px; right: 0; margin: 0; }
.tp-dlg-x { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 0; background: #fff; cursor: pointer; color: var(--tp-lago-scuro); }
.tp-dlg-x .tp-i { width: 20px; height: 20px; stroke-width: 2.2; } /* icona e non il carattere «×», che col font esce fuori asse */
.tp-scheda > .tp-dlg { margin: auto !important; } /* «.tp-scheda > *» toglie il margine in alto e la finestra resterebbe attaccata al bordo */
.tp-dlg--fly { width: min(1400px, 94vw); }
.tp-dlg--fly video { max-height: calc(100dvh - 120px); background: #000; }
/* scheda PDF da sfogliare (DearFlip Lite): tutto lo schermo, fondo chiaro, il libro riempie lo spazio sotto la × */
.tp-dlg--pdf { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0 !important; inset: 0; border-radius: 0; overflow: hidden; background: var(--tp-sabbia); padding: 64px 16px 16px; box-sizing: border-box; }
.tp-dlg--pdf form { position: fixed; top: 12px; right: 16px; }
.tp-dlg--pdf .tp-dlg-x { box-shadow: 0 0 0 1px var(--tp-linea); }
.tp-dlg--pdf ._df_book { height: 100% !important; min-height: 0 !important; }
/* foto ingrandita: tutto lo schermo, foto intera su fondo scuro, × in alto a destra, contatore in basso */
.tp-lb { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; inset: 0; border-radius: 0; background: #05141a; }
.tp-lb[open] { display: grid; place-items: center; }
.tp-lb::backdrop { background: none; }
.tp-lb img { display: block; max-width: calc(100vw - 140px); max-height: calc(100dvh - 120px); width: auto; height: auto; border-radius: 12px; }
.tp-lb form { position: fixed; top: 16px; right: 16px; }
.tp-lb .tp-sl-n { right: auto; left: 50%; bottom: 20px; transform: translateX(-50%); }
@media (max-width: 700px) {
	.tp-lb img { max-width: 100vw; border-radius: 0; }
	.tp-lb .tp-sl-btn { top: auto; bottom: 12px; transform: none; }
}

/* ---------- blog: elenco articoli ---------- */
/* pagina unica e semplice come le altre pagine: titolo, una frase, poi gli articoli interi uno sotto l'altro */
.tp-diario { list-style: none; padding: 0; margin: 48px 0 0; }
.tp-diario > li { margin: 0; }
.tp-voce { padding: 48px 0; border-top: 1px solid var(--tp-linea); }
.tp-diario > li:first-child .tp-voce { padding-top: 32px; }
.tp-voce > * { margin-block-start: 0 !important; }
.tp-voce-data { font-size: 13px; font-weight: 700; color: var(--tp-olivo); text-transform: uppercase; letter-spacing: .08em; }
.tp-voce h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; margin: 8px 0 0; color: var(--tp-lago-scuro); }
.tp-voce .tp-art-testo { max-width: none; margin: 26px 0 0 !important; font-size: 17px; }
.tp-post-meta { gap: 10px; font-size: 13px; font-weight: 600; color: var(--tp-muto); align-items: center; }
.tp-post-meta > * { margin: 0 !important; }
.tp-post-meta .wp-block-post-terms a { display: inline-block; background: var(--tp-lago-chiaro); color: var(--tp-lago); padding: 4px 10px; border-radius: 99px; font-weight: 700; }
.tp-blog-pag { margin-top: 40px !important; gap: 8px; font-weight: 700; font-size: 15px; }
.tp-blog-pag a, .tp-blog-pag .current { padding: 8px 14px; border-radius: 10px; border: 1px solid var(--tp-linea); color: var(--tp-testo); }
.tp-blog-pag .current { background: var(--tp-lago); border-color: var(--tp-lago); color: #fff; }

/* ---------- larghezza del testo: 960px invece dei 760px di Ollie su tutte le pagine (home esclusa,
   ha il suo layout) e nel blog; i blocchi larghi (es. riquadri delle località) restano a 1200px ---------- */
.page:not(.home) main, .tp-blog { --wp--style--global--content-size: 960px; }

/* ---------- pagina Contatti: email, telefono, indirizzo ---------- */
.tp-contatti { list-style: none; padding: 0; display: grid; gap: 14px; }
.tp-contatti li { display: flex; gap: 14px; align-items: flex-start; }
.tp-contatti .tp-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--tp-lago-chiaro); color: var(--tp-lago); display: grid; place-items: center; flex: none; }
.tp-contatti small { display: block; font-size: 13px; font-weight: 700; color: var(--tp-muto); text-transform: uppercase; letter-spacing: .06em; }
.tp-contatti b { font-weight: 600; }
.tp-contatti .tp-nd { color: var(--tp-muto); font-weight: 500; font-style: italic; }

/* ---------- blog: articolo ---------- */
.tp-art { padding-top: 44px; padding-bottom: 70px; }
.tp-art-head { max-width: 820px; margin: 0 auto; }
.tp-art-head > * { margin-block-start: 0 !important; }
.tp-art-head .tp-brc { color: var(--tp-muto); opacity: 1; }
.tp-art-head h1 { font-size: clamp(34px, 4.6vw, 52px); line-height: 1.1; margin: 0 0 16px; color: var(--tp-lago-scuro); }
.tp-art-testo { max-width: 760px; margin: 44px auto 0 !important; font-size: 18px; line-height: 1.7; }
.tp-art-testo > * { margin: 0; }
.tp-art-testo > * + * { margin-top: 1.1em; }
.tp-art-testo h2 { font-size: 26px; line-height: 1.25; color: var(--tp-lago-scuro); margin-top: 1.8em; }
.tp-art-testo h2 + * { margin-top: .5em; }
.tp-art-testo a { color: var(--tp-lago); text-decoration: underline; }
.tp-art-testo ul, .tp-art-testo ol { padding-left: 1.3em; }
.tp-art-testo li + li { margin-top: .35em; }
.tp-art-testo blockquote { border-left: 4px solid var(--tp-olivo); margin-left: 0; margin-right: 0; padding: 4px 0 4px 22px; font-size: 21px; line-height: 1.5; color: var(--tp-lago-scuro); }
.tp-art-testo blockquote cite { display: block; margin-top: 8px; font-size: 14px; font-style: normal; font-weight: 700; color: var(--tp-muto); }
.tp-art-testo figure img { border-radius: 18px; }
.tp-art-testo figcaption { font-size: 14px; color: var(--tp-muto); text-align: center; }
@media (max-width: 620px) { .tp-art-testo { font-size: 17px; } }

/* ---------- footer ---------- */
.tp-footer { background: var(--tp-lago-scuro); color: #b9d3dc; padding: 70px 0 28px; }
.tp-foot { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.tp-footer h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.tp-footer ul { list-style: none; display: grid; gap: 8px; font-size: 15px; padding: 0; margin: 0; }
.tp-footer a { color: #b9d3dc; }
.tp-footer a:hover { color: #fff; }
.tp-footer .tp-logo { display: block; color: #fff; font-weight: 800; font-size: 19px; letter-spacing: -.02em; line-height: 1.15; }
.tp-footer .tp-logo small { display: block; font-size: 11px; font-weight: 600; color: #9cc7d5; letter-spacing: .02em; }
.tp-footer p { margin: 14px 0 0; max-width: 320px; }
.tp-copy { border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 44px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
@media (max-width: 760px) { .tp-foot { grid-template-columns: 1fr 1fr; } }

/* ---------- stampa della scheda ---------- */
@media print {
	.site-header, .site-footer, .tp-azioni, .tp-gal .tp-all, .tp-altri, .trek-map, .tp-gpx, #wpadminbar, .tp-sch-az, .tp-sl-btn, .tp-sch-info, .tp-dlg, .tp-fly { display: none !important; }
	.tp-sch-grid { grid-template-columns: 1fr; }
	.tp-side { position: static; }
	.tp-card:hover { transform: none; }
}
