/*
Theme Name:   T4T Blocksy
Description:  Tema figlio di Blocksy per Tourist4Tourist: pagine paese (dati da t4t-core), regioni, hub delle guide, home.
Template:     blocksy
Version:      0.21.20
Requires PHP: 8.1
License:      GPL-2.0-or-later
Text Domain:  t4t-blocksy
*/

/* ---------- Playfair Display 900 ospitato nel tema (22/10: niente Google Fonts, GDPR). OFL 1.1, assets/fonts/OFL.txt.
   Sottoinsiemi e unicode-range come li serve Google Fonts (v40); il browser scarica solo quelli che servono. ---------- */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("assets/fonts/playfair-display-900-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("assets/fonts/playfair-display-900-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("assets/fonts/playfair-display-900-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 900; font-display: swap; src: url("assets/fonts/playfair-display-900-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- palette T4T (le 8 di Blocksy stanno nelle impostazioni del tema) ---------- */
:root { --t4t-sand: #D9B26A; --t4t-night: #2A1D12; --t4t-on-dark: #F1E3C4; --t4t-on-dark-muted: #CDBB98; }

/* ---------- logo ---------- */
.t4t-logo__word { display: inline-flex; align-items: center; font-family: "Playfair Display", Georgia, serif; font-weight: 800; font-size: 1.55rem; letter-spacing: -.01em; color: var(--theme-palette-color-4); line-height: 1; }
.t4t-logo__four { width: 1.15em; height: 1.15em; margin: 0 .06em; fill: var(--t4t-sand); }
.site-title a:hover .t4t-logo__four { fill: var(--theme-palette-color-1); }

/* ---------- schede (regioni, paesi, articoli) ---------- */
.t4t-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin: 1.5rem 0 2.5rem; padding: 0; list-style: none; }
.t4t-grid--regions { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.t4t-card { position: relative; border-radius: 10px; overflow: hidden; background: var(--theme-palette-color-8, #fff); box-shadow: 0 1px 3px rgba(0,0,0,.08); transition: transform .15s ease, box-shadow .15s ease; }
.t4t-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.t4t-card a { display: block; color: inherit; text-decoration: none; }
.t4t-card img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #e9eef3; }
.t4t-card__body { padding: .7rem .9rem .9rem; }
.t4t-card__title { margin: 0; font-size: 1.05rem; line-height: 1.3; font-weight: 600; }
.t4t-card__meta { margin: .2rem 0 0; font-size: .85rem; color: #5C4B3D; }
.t4t-flag { font-size: 1.2em; margin-right: .35em; }

/* ---------- pagina paese ---------- */
.t4t-subtitle { margin: .4rem 0 0; font-size: 1.05rem; opacity: .75; }
.t4t-glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 0 0 1.75rem; padding: 1rem 1.1rem; border-radius: 10px; background: var(--theme-palette-color-6, #f2f5f7); }
.t4t-glance div { display: flex; flex-direction: column; }
.t4t-glance dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #5C4B3D; }
.t4t-glance dd { margin: .1rem 0 0; font-weight: 600; }
.t4t-toc { margin: 0 0 2rem; padding: .9rem 1.1rem; border-left: 3px solid var(--theme-palette-color-1, #2872fa); background: var(--theme-palette-color-7, #fafbfc); }
.t4t-toc strong { display: block; margin-bottom: .35rem; }
.t4t-toc ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; }
.t4t-section h2 { scroll-margin-top: 90px; }
.t4t-legacy { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(0,0,0,.08); }
.t4t-legacy__note { font-size: .85rem; opacity: .7; }
.t4t-more { margin-top: 3rem; }
.t4t-more ul { columns: 3 160px; padding-left: 1.1rem; }

/* ---------- home ---------- */
.home .hero-section { display: none; }
.t4t-home-hero { padding: 2.5rem 0 1rem; text-align: center; }
.t4t-home-hero h1 { margin: 0 0 .6rem; font-size: clamp(1.9rem, 4vw, 2.8rem); }
.t4t-home-hero p { max-width: 680px; margin: 0 auto; font-size: 1.1rem; opacity: .8; }

/* ---------- esplorazione: curve di livello e sabbia ---------- */
.t4t-topo, .hero-section[data-type="type-2"] { background-image: url("assets/pattern-carta.svg?v=1"); background-size: 320px 320px; background-repeat: repeat; background-position: center top; }
.hero-section[data-type="type-2"] { background-color: var(--theme-palette-color-6); }
.t4t-eyebrow { margin: 0 0 .5rem; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--theme-palette-color-1); font-weight: 600; }
.t4t-home-hero { margin: 0 calc(50% - 50vw) 2.5rem; padding: 4.5rem 1.5rem 4rem; background-color: var(--theme-palette-color-6); border-bottom: 1px solid var(--theme-palette-color-5); }
.t4t-finder { display: flex; max-width: 560px; margin: 1.8rem auto 0; border-radius: 999px; background: var(--theme-palette-color-8); box-shadow: 0 6px 24px rgba(74, 52, 30, .12); overflow: hidden; }
.t4t-finder input { flex: 1; border: 0 !important; background: transparent !important; padding: 0 1.4rem !important; height: 56px; font-size: 1.05rem; box-shadow: none !important; }
.t4t-finder button { border: 0; padding: 0 1.8rem; background: var(--theme-palette-color-1); color: #fff; font-weight: 600; cursor: pointer; }
.t4t-finder button:hover { background: var(--theme-palette-color-2); }
/* Niente bordino chiaro a destra del pulsante (Alian, 23/10): lungo la curva della pillola si vedeva lo sfondo chiaro del
   modulo; la metà destra dello sfondo ha il colore del pulsante, anche al passaggio del mouse. */
.t4t-finder { --t4t-finder-btn: var(--theme-palette-color-1); background: linear-gradient(to right, var(--theme-palette-color-8) 50%, var(--t4t-finder-btn) 50%); }
.t4t-finder:has(button:hover) { --t4t-finder-btn: var(--theme-palette-color-2); }
.t4t-finder input { background: var(--theme-palette-color-8) !important; }
.t4t-finder button { margin: 0; border: 0 !important; box-shadow: none !important; border-radius: 0; background: var(--t4t-finder-btn); }
.t4t-card { background: var(--theme-palette-color-8); border: 1px solid var(--theme-palette-color-5); box-shadow: none; }
.t4t-card:hover { box-shadow: 0 8px 22px rgba(74, 52, 30, .12); }
.t4t-glance { background: var(--theme-palette-color-6); border: 1px solid var(--theme-palette-color-5); }
.t4t-toc { background: var(--theme-palette-color-7); }

/* ---------- directory A–Z ---------- */
.t4t-dir { margin: 1rem 0 3rem; }
.t4t-dir__tools { position: sticky; top: var(--t4t-sticky-top); z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; padding: .9rem 0; background: var(--theme-palette-color-7); border-bottom: 1px solid var(--theme-palette-color-5); }
.t4t-dir__filter { flex: 1 1 260px; max-width: 360px; height: 44px; border-radius: 999px !important; padding: 0 1.1rem !important; }
.t4t-dir__index { display: flex; flex-wrap: wrap; gap: .15rem; }
.t4t-dir__index a { display: inline-block; min-width: 1.9rem; padding: .15rem .3rem; text-align: center; border-radius: 6px; font-weight: 600; font-size: .9rem; text-decoration: none; color: var(--theme-palette-color-1); }
.t4t-dir__index a:hover { background: var(--theme-palette-color-6); }
.t4t-dir__group { scroll-margin-top: 80px; }
.t4t-dir__letter { margin: 1.6rem 0 .6rem; padding-bottom: .3rem; border-bottom: 2px solid var(--theme-palette-color-5); font-size: 1.4rem; color: var(--theme-palette-color-1); }
.t4t-dir__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; margin: 0; padding: 0; list-style: none; }
.t4t-dir__item a { display: grid; grid-template-columns: auto 1fr; column-gap: .55rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--theme-palette-color-5); border-radius: 8px; background: var(--theme-palette-color-8); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.t4t-dir__item a:hover { border-color: var(--theme-palette-color-1); background: var(--theme-palette-color-7); }
.t4t-dir__item .t4t-flag { grid-row: span 2; font-size: 1.6rem; margin: 0; }
.t4t-dir__name { font-weight: 600; line-height: 1.25; }
.t4t-dir__meta { font-size: .8rem; opacity: .7; line-height: 1.3; }
.t4t-dir__empty { padding: 1rem 0; opacity: .7; }

/* ---------- header ---------- */
.ct-header-cta a { background-color: var(--theme-palette-color-1) !important; border: 1px solid var(--theme-palette-color-1) !important; color: #fff !important; border-radius: 999px; padding-inline: 1.1rem; }
.ct-header-cta a:hover { background-color: var(--theme-palette-color-2) !important; border-color: var(--theme-palette-color-2) !important; }
.home .site-main > .ct-container-full { padding-top: 0 !important; }
.home .t4t-home-hero { border-top: 0; }

/* ---------- telefono ---------- */
.t4t-finder input { min-width: 0; }
@media (max-width: 600px) {
	.t4t-finder button { padding: 0 1.1rem; }
	.t4t-finder input { padding: 0 1rem !important; font-size: 1rem; }
	.t4t-glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.t4t-dir__list { grid-template-columns: 1fr; }
	.t4t-home-hero { padding: 3rem 1.25rem; }
}

/* ================= ritocchi 2026-10-19 ================= */

/* nessuno scorrimento orizzontale dagli elementi a tutta larghezza */
html, body { overflow-x: clip; }
.t4t-bleed { width: 100vw; margin-left: calc(50% - 50vw); }

/* bandiere */
.t4t-flag { display: inline-block; width: 40px; height: 30px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(30, 22, 16, .12); vertical-align: middle; margin-right: .4em; }
.t4t-flag--none { width: auto; height: auto; box-shadow: none; font-size: 1.8rem; }
.t4t-dir__item a { grid-template-columns: 48px 1fr; padding: .7rem .9rem; column-gap: .75rem; }
.t4t-dir__item .t4t-flag { width: 48px; height: 36px; margin: 0; grid-row: span 2; }

/* menu: sottovoci di Travel Guides come griglia di mappe */
.t4t-menu-map { display: block; width: 120px; height: auto; margin: 0 auto .35rem; }
.t4t-menu-label { display: block; text-align: center; }
[data-id="menu"] .menu-item-has-children .sub-menu:has(.t4t-menu-map) { display: grid; grid-template-columns: repeat(3, 150px); gap: .25rem; padding: .75rem; width: auto; }
[data-id="menu"] .sub-menu .t4t-menu-map + .t4t-menu-label { font-size: .85rem; }
[data-id="menu"] .sub-menu a:hover .t4t-menu-map, [data-id="menu"] .sub-menu a:focus .t4t-menu-map { filter: brightness(.92); }
.ct-panel .t4t-menu-map { display: inline-block; width: 64px; margin: 0 .6rem 0 0; vertical-align: middle; }
.ct-panel .t4t-menu-label { display: inline; }

/* pulsanti e messa a fuoco visibili */
.ct-button, .wp-element-button, button, input[type="submit"] { background-color: var(--theme-palette-color-1); color: #fff; }
a:focus-visible, button:focus-visible, input:focus-visible, .ct-button:focus-visible, [role="button"]:focus-visible { outline: 3px solid var(--t4t-sand) !important; outline-offset: 2px; border-radius: 4px; }
.t4t-dir__index a { color: var(--theme-palette-color-1); }

/* righe a tutta larghezza: header, home, barra della directory, sezioni */
[data-row*="middle"] > .ct-container { border-bottom: 0 !important; }
#header [data-row*="middle"] { border-bottom: 1px solid var(--theme-palette-color-5); }
.t4t-home-hero { width: 100vw; margin-left: calc(50% - 50vw); margin-top: 0; border-left: 0; border-right: 0; border-top: 1px solid var(--theme-palette-color-5); border-radius: 0; }
.t4t-dir__tools { box-shadow: 0 0 0 100vmax var(--theme-palette-color-7); clip-path: inset(0 -100vmax); }
.t4t-dir__tools { border-bottom: 0; }
.t4t-dir__tools::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 100vw; transform: translateX(-50%); border-bottom: 1px solid var(--theme-palette-color-5); }
.t4t-section, .t4t-legacy, .t4t-more { position: relative; margin: 0; padding: 2.5rem 0; border-top: 0; }
.t4t-section::before, .t4t-legacy::before, .t4t-more::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--theme-palette-color-5); }
/* Sezioni lunghe delle guide disegnate solo quando si avvicinano (PageSpeed, 26/10). Il contenimento taglia il ::before
   a tutta larghezza, quindi qui la riga è un border-image che sporge di 100vw. Fuori le sezioni con mappa (Leaflet misura il contenitore). */
html:not(.t4t-cv-off) .t4t-section:not(.t4t-section--basics):not(.t4t-section--places):not(.t4t-section--map) { content-visibility: auto; contain-intrinsic-size: auto 600px; border-top: 1px solid; border-image: linear-gradient(var(--theme-palette-color-5), var(--theme-palette-color-5)) 1 0 0 / 1px 0 0 / 0 100vw; }
html:not(.t4t-cv-off) .t4t-section:not(.t4t-section--basics):not(.t4t-section--places):not(.t4t-section--map)::before { content: none; }

/* intestazioni con foto (paesi e regioni): testo chiaro su velatura */
.hero-section[data-type="type-2"]:has(figure) { background-image: none; }
.hero-section[data-type="type-2"]:has(figure) .entry-header,
.hero-section[data-type="type-2"]:has(figure) .page-title,
.hero-section[data-type="type-2"]:has(figure) .t4t-subtitle,
.hero-section[data-type="type-2"]:has(figure) .t4t-breadcrumbs,
.hero-section[data-type="type-2"]:has(figure) .t4t-breadcrumbs a { color: #fff !important; text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
.hero-section[data-type="type-2"]:has(figure) { position: relative; overflow: hidden; }
.hero-section[data-type="type-2"]:has(figure) figure { position: absolute; inset: 0; margin: 0; }
.hero-section[data-type="type-2"]:has(figure) figure .ct-media-container, .hero-section[data-type="type-2"]:has(figure) figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-section[data-type="type-2"]:has(figure) figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 29, 18, .30), rgba(42, 29, 18, .62)); }
.hero-section[data-type="type-2"]:has(figure) > .entry-header { position: relative; z-index: 1; min-height: 360px; display: flex; flex-direction: column; justify-content: center; padding-block: 3rem; }
@media (max-width: 600px) { .hero-section[data-type="type-2"]:has(figure) > .entry-header { min-height: 260px; } }

/* pagina paese: dati accanto alla mappa */
.t4t-section--basics { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); column-gap: 2.5rem; align-items: start; }
.t4t-section--basics > h2, .t4t-section--basics > .t4t-meta { grid-column: 1 / -1; }
.t4t-section--basics .t4t-map iframe { height: 340px; border-radius: 10px; }
@media (max-width: 760px) { .t4t-section--basics { grid-template-columns: 1fr; } }

/* footer: fascia inferiore scura */
#footer [data-row*="bottom"] { background-color: var(--t4t-night) !important; color: var(--t4t-on-dark-muted); }
#footer [data-row*="bottom"] a { color: var(--t4t-on-dark); }
#footer [data-row*="bottom"] .ct-footer-copyright { color: var(--t4t-on-dark-muted); }
#footer [data-row*="middle"] { background-color: var(--theme-palette-color-6); }
#footer [data-row*="middle"] .widget-title { color: var(--theme-palette-color-4); }

/* menu delle regioni: fondo chiaro, mappa sopra il nome */
[data-id="menu"] .sub-menu:has(.t4t-menu-map) { background: var(--theme-palette-color-8) !important; border: 1px solid var(--theme-palette-color-5); border-radius: 12px; box-shadow: 0 14px 34px rgba(42, 29, 18, .16); }
[data-id="menu"] .sub-menu:has(.t4t-menu-map) > li > a { display: flex !important; flex-direction: column; align-items: center; gap: .35rem; padding: .7rem .5rem !important; border-radius: 8px; color: var(--theme-palette-color-3) !important; font-weight: 600; text-transform: none; }
[data-id="menu"] .sub-menu:has(.t4t-menu-map) > li > a:hover, [data-id="menu"] .sub-menu:has(.t4t-menu-map) > li > a:focus-visible { background: var(--theme-palette-color-6); color: var(--theme-palette-color-1) !important; }
[data-id="menu"] .sub-menu .t4t-menu-map { margin: 0; }
/* altri sottomenu (About): fondo chiaro e testo scuro */
[data-id="menu"] .sub-menu { background: var(--theme-palette-color-8) !important; }
[data-id="menu"] .sub-menu a { color: var(--theme-palette-color-3) !important; }
[data-id="menu"] .sub-menu a:hover { color: var(--theme-palette-color-1) !important; }

/* menu da telefono: pannello marrone scuro */
#offcanvas .ct-panel-inner { background-color: var(--t4t-night) !important; }
#offcanvas .ct-panel-inner a, #offcanvas .ct-panel-inner .ct-toggle-dropdown-mobile { color: var(--t4t-on-dark) !important; }
#offcanvas .ct-panel-inner .sub-menu a { color: var(--t4t-on-dark-muted) !important; }

/* logo: parole in marrone scuro (19/10) */
.t4t-logo__word { color: var(--theme-palette-color-2); }

/* home: le 9 regioni in 3 righe da 3 (richiesta di Alian, 19/10) */
.t4t-grid--nine { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 600px) { .t4t-grid--nine { gap: .5rem; } .t4t-grid--nine .t4t-card img { aspect-ratio: 4 / 5; } .t4t-grid--nine .t4t-card__title { font-size: .82rem; } .t4t-grid--nine .t4t-card__meta { font-size: .72rem; } .t4t-grid--nine .t4t-card__body { padding: .4rem .45rem .5rem; } }

/* ritocchi 19/10, terzo giro: ricerca a tutta larghezza e alta, testo subito sotto, logo più grande */
.entry-content > .t4t-home-hero, .t4t-home-hero { box-sizing: border-box; width: 100vw; max-width: none !important; margin: 0 calc(50% - 50vw) 0 !important; padding: 0 1.5rem; min-height: min(68vh, 620px); display: flex; align-items: center; justify-content: center; border: 0; border-bottom: 1px solid var(--theme-palette-color-5); border-radius: 0; }
.t4t-home-hero__inner { width: 100%; max-width: 760px; text-align: center; padding: 3rem 0; }
.t4t-home-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 0; }
.t4t-home-about { max-width: 760px; margin: 3rem auto 3.5rem; font-size: 1.08rem; line-height: 1.7; }
.t4t-home-about h2 { text-align: center; margin-bottom: 1.25rem; }
.t4t-logo__word { font-size: 2.05rem; }
@media (max-width: 600px) { .t4t-logo__word { font-size: 1.6rem; } .t4t-home-hero { min-height: 56vh; } }

/* testo breve della home (19/10): una frase centrata sotto la ricerca */
.t4t-home-about { max-width: 680px; margin: 2.5rem auto 3rem; text-align: center; font-size: 1.15rem; line-height: 1.65; }

/* testo della home alla larghezza delle sezioni sotto (19/10) */
/* larga come gli altri blocchi del contenuto ("Choose your destination"), non di più (Alian, 20/10) */
.t4t-home-about { box-sizing: border-box; max-width: var(--theme-block-max-width, 1290px); margin: 2.5rem auto 3rem; padding: 0; text-align: left; }

/* articoli e luoghi */
.t4t-card__place { font-weight: 600; color: var(--theme-palette-color-1); }
.t4t-card__place .t4t-flag { width: 20px; height: 15px; margin-right: .3em; vertical-align: -2px; }
.t4t-post-places { position: relative; margin-top: 3rem; padding-top: 2.5rem; }
.t4t-post-places::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--theme-palette-color-5); }
.t4t-stories { position: relative; padding: 2.5rem 0; }
.t4t-stories::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--theme-palette-color-5); }
.t4t-card__place { display: inline-flex; align-items: center; white-space: nowrap; }
.t4t-home-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.15; }

/* indice per famiglie, suggerimenti, destinazioni (guida paese v2) */
.t4t-toc { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem 1.5rem; }
.t4t-toc > strong { grid-column: 1 / -1; }
.t4t-toc__label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: #5C4B3D; margin-bottom: .2rem; }
.t4t-toc__family ul { display: block; }
.t4t-toc__family li { margin: .15rem 0; }
.t4t-destinations { position: relative; padding: 2.5rem 0; }
.t4t-destinations::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--theme-palette-color-5); }
.t4t-faq { background: var(--theme-palette-color-8); border-color: var(--theme-palette-color-5) !important; }

/* Intestazione di blog, archivi e ricerca con l'immagine di default (Alian, 20/10) */
body:is(.blog, .archive, .search) .hero-section[data-type] {
	position: relative; box-sizing: border-box; width: 100vw; max-width: none;
	margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); border-radius: 0;
	background: linear-gradient(180deg, rgba(42, 29, 18, .38), rgba(42, 29, 18, .66)), var(--t4t-default-img, none) center / cover no-repeat, var(--theme-palette-color-6);
}
body:is(.blog, .archive, .search) .hero-section[data-type] > figure { display: none; }
body:is(.blog, .archive, .search) .hero-section[data-type] > .entry-header { position: relative; z-index: 1; min-height: 320px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding-block: 3rem; }
body:is(.blog, .archive, .search) .hero-section[data-type] :is(.page-title, .ct-title-label, .page-description, .page-description p, .t4t-breadcrumbs, .t4t-breadcrumbs a) { color: #fff !important; text-shadow: 0 1px 12px rgba(0, 0, 0, .45); }
body:is(.blog, .archive, .search) .hero-section[data-type] .ct-title-label { display: block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
@media (max-width: 600px) { body:is(.blog, .archive, .search) .hero-section[data-type] > .entry-header { min-height: 220px; } }
/* archivi (intestazione type-1 dentro il contenitore): niente fascia bianca sopra, spazio sotto, titolo più grande */
body:is(.archive, .search) .ct-container[data-vertical-spacing*="top"]:has(> section > .hero-section:first-child) { padding-top: 0; }
body:is(.archive, .search) .hero-section[data-type="type-1"] { margin-bottom: 3rem; }
body:is(.blog, .archive, .search) .hero-section[data-type] .page-title { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.15; }
/* Schede della directory dei paesi (Alian, 20/10): immagine in alto, contenuto in colonna dall'alto in basso */
.t4t-dir__list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; align-items: stretch; }
.t4t-dir__item a { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; height: 100%; padding: 0; overflow: hidden; border-radius: 10px; }
.t4t-dir__media { display: block; aspect-ratio: 3 / 2; background: var(--theme-palette-color-6); overflow: hidden; }
.t4t-dir__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.t4t-dir__item a:hover .t4t-dir__media img { transform: scale(1.04); }
.t4t-dir__ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6em; width: 100%; height: 100%; background: var(--theme-palette-color-6) url("assets/pattern-carta.svg?v=1") center / 220px 220px repeat; }
.t4t-dir__media .t4t-dir__ph img.t4t-flag { width: 34%; height: auto; max-width: 96px; object-fit: contain; border-radius: 3px; box-shadow: 0 2px 8px rgba(60, 40, 20, .25); }
.t4t-dir__ph .t4t-flag--none { font-size: 2.4em; }
.t4t-dir__ph small { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--theme-palette-color-3); opacity: .8; }
.t4t-dir__item a:hover .t4t-dir__media .t4t-dir__ph img { transform: none; }
.t4t-dir__body { display: flex; flex-direction: column; align-items: flex-start; gap: .35rem; padding: .8rem .95rem 1rem; }
.t4t-dir__item .t4t-flag { grid-row: auto; width: 36px; height: 27px; margin: 0 0 .15rem; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.t4t-dir__name { font-size: 1.05rem; }
@media (max-width: 600px) { .t4t-dir__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .t4t-dir__body { padding: .6rem .7rem .8rem; } }
/* Barra dei filtri delle regioni attaccata all'intestazione, con la linea anche in alto (Alian, 20/10) */
:is(.ct-container, .ct-container-full)[data-vertical-spacing*="top"]:has(.entry-content > .t4t-dir:first-child) { padding-top: 0; }
.entry-content > .t4t-dir:first-child { margin-top: 0; }
.t4t-dir__tools::before { content: ""; position: absolute; left: 50%; top: 0; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--theme-palette-color-5); }
/* "Suggest an update" dentro la pagina guida (Alian, 20/10) */
.t4t-suggest { margin: 3rem 0; padding: 1.75rem 1.75rem 1.5rem; border: 1px solid var(--theme-palette-color-5); border-radius: 12px; background: var(--theme-palette-color-6); scroll-margin-top: 90px; }
.t4t-suggest > h2 { margin-top: 0; }
.t4t-suggest__intro { max-width: 70ch; }
.t4t-last-checked { margin: -.25rem 0 1.25rem; font-size: .9rem; opacity: .75; }
.t4t-suggest__form label { display: block; font-weight: 600; font-size: .92rem; }
.t4t-suggest__form :is(input[type="text"], input[type="email"], select, textarea) { width: 100%; margin-top: .35rem; font-weight: 400; background: var(--theme-palette-color-8); }
.t4t-suggest__form textarea { height: 9rem; }
.t4t-suggest__two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.t4t-suggest__privacy, .t4t-suggest__privacy label { font-weight: 400 !important; font-size: .85rem; }
.t4t-suggest__form .wpcf7-submit { border-radius: 999px; padding-inline: 1.6rem; }
@media (max-width: 600px) { .t4t-suggest { padding: 1.25rem 1rem; } .t4t-suggest__two { grid-template-columns: 1fr; } }
/* Campi di tutti i moduli Contact Form 7 (Suggest an update e Contact Us), uguali (Alian, 26/10): bordo intero, padding
   interno, angoli arrotondati. Blocksy usa campi "a riga sotto" con il testo attaccato al bordo. */
.wpcf7-form :is(input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="number"], select, textarea) {
	width: 100%; box-sizing: border-box; height: auto; min-height: 48px; margin-top: .35rem; padding: .7rem .95rem !important;
	border: 1px solid var(--theme-palette-color-5) !important; border-radius: 8px; background: var(--theme-palette-color-8);
	font-size: 1rem; font-weight: 400; line-height: 1.45; color: var(--theme-text-color, inherit); box-shadow: none;
}
.wpcf7-form select { padding-right: 2.4rem !important; }
.wpcf7-form textarea { min-height: 9rem; resize: vertical; }
.wpcf7-form :is(input, select, textarea):focus { border-color: var(--theme-palette-color-1) !important; outline: 2px solid color-mix(in srgb, var(--theme-palette-color-1) 25%, transparent); outline-offset: 0; }
.wpcf7-form label { display: block; font-weight: 600; font-size: .92rem; }
.wpcf7-form .wpcf7-acceptance label, .wpcf7-form .wpcf7-list-item label { display: inline; font-weight: 400; font-size: .85rem; }
.wpcf7-form p { margin-bottom: 1rem; }
.wpcf7-form .form-group { margin-bottom: 1rem; }
.wpcf7-form .form-group > p { margin: 0; }
.wpcf7-form label + br { display: none; }
.wpcf7-form label:has(.wpcf7-acceptance) { font-weight: 400; font-size: .85rem; line-height: 1.5; }
.wpcf7-form .wpcf7-submit { border-radius: 999px; padding-inline: 1.6rem; }


/* FAQ ad accordion: blocco "Dettagli" di WordPress (Alian, 20/10). Il margine del summary va azzerato: Blocksy dà
   margin-block-end (25px) ai figli di .is-layout-flow, e la domanda chiusa restava alta e decentrata (Alian, 22/10). */
.entry-content > h2.wp-block-heading + .wp-block-details { margin-top: 1rem; }
.wp-block-details { margin: 0 0 .6rem; border: 1px solid var(--theme-palette-color-5); border-radius: 10px; background: var(--theme-palette-color-8); overflow: hidden; }
.wp-block-details > summary { position: relative; display: block; list-style: none; cursor: pointer; margin: 0 !important; padding: .85rem 3rem .85rem 1.2rem; line-height: 1.4; font-weight: 600; font-size: 1.05rem; color: var(--theme-palette-color-3, inherit); }
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after { content: ""; position: absolute; right: 1.2rem; top: 50%; width: .6rem; height: .6rem; border-right: 2px solid var(--theme-palette-color-1); border-bottom: 2px solid var(--theme-palette-color-1); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.wp-block-details[open] > summary::after { transform: translateY(-20%) rotate(-135deg); }
.wp-block-details > summary:hover { background: var(--theme-palette-color-7); }
.wp-block-details[open] > summary { border-bottom: 1px solid var(--theme-palette-color-5); }
.wp-block-details > :not(summary) { margin: 0; padding: .9rem 1.2rem 0; }
.wp-block-details:not([open]) > :not(summary) { display: none; }
.wp-block-details > :last-child:not(summary) { padding-bottom: 1.1rem; }
/* Fonti della guida in un unico elenco in fondo alla pagina (Alian, 20/10) */
.t4t-sources { margin: 3rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--theme-palette-color-5); }
.t4t-sources .t4t-last-checked { margin: 0 0 .8rem; }
.t4t-sources__list { margin: 0; padding-left: 1.3rem; font-size: .9rem; line-height: 1.5; columns: 2 320px; column-gap: 2.5rem; }
.t4t-sources__list li { break-inside: avoid; margin-bottom: .45rem; }
.t4t-sources__list small { display: block; opacity: .65; }


/* ---------- Pagina guida: ritocchi di Alian del 20/10 ---------- */

/* Indice "On this page": una riga per gruppo, link uno di seguito all'altro (niente colonne con buchi) */
.t4t-toc { display: block; padding: 1.1rem 1.4rem; }
.t4t-toc > strong { margin-bottom: .6rem; }
.t4t-toc__family { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: baseline; column-gap: 1.25rem; padding: .45rem 0; border-top: 1px solid var(--theme-palette-color-5); }
.t4t-toc__family:first-of-type { border-top: 0; }
.t4t-toc__label { margin: 0; }
.t4t-toc__family ul { display: flex !important; flex-wrap: wrap; gap: .25rem 0; margin: 0; padding: 0; list-style: none; }
.t4t-toc__family li { margin: 0 !important; }
.t4t-toc__family li:not(:last-child)::after { content: "·"; margin: 0 .6rem; opacity: .45; }

/* Tabelle: tutte a tutta larghezza, stesso stile della tabella delle frasi */
.t4t-table { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 1.4rem; border: 1px solid var(--theme-palette-color-5); border-radius: 10px; background: var(--theme-palette-color-8); }
.t4t-table table { display: table !important; width: 100%; margin: 0; border: 0; border-collapse: collapse; font-size: .95rem; }
.t4t-table :is(th, td) { padding: .6rem .9rem; border: 0; border-bottom: 1px solid var(--theme-palette-color-5); text-align: left; vertical-align: top; }
.t4t-table tr:last-child > :is(th, td) { border-bottom: 0; }
.t4t-table tbody th { width: 28%; font-weight: 600; background: var(--theme-palette-color-7); }
.t4t-table thead th { background: var(--theme-palette-color-6); font-weight: 600; }
.t4t-table caption { caption-side: top; padding: .6rem .9rem; text-align: left; font-weight: 600; border-bottom: 1px solid var(--theme-palette-color-5); }
.t4t-climate :is(th, td) { text-align: center; padding: .5rem .35rem; }
.t4t-climate tbody th { width: auto; text-align: left; padding-left: .9rem; white-space: nowrap; }
.t4t-climate .t4t-best { background: #e6f1e1; }
.t4t-rules td:nth-child(3) { white-space: nowrap; }
.t4t-phrases small { opacity: .65; margin-left: .35rem; }

/* Elenchi di luoghi, regioni e tappe: nome e descrizione sulla stessa riga */
.t4t-places li, .t4t-trip li { line-height: 1.55; }
.t4t-places small, .t4t-trip small { opacity: .7; font-weight: 400; }
.t4t-section--basics .t4t-table { align-self: start; }

/* Telefono e tablet */
@media (max-width: 760px) {
	.t4t-toc { padding: 1rem; }
	.t4t-toc__family { grid-template-columns: 1fr; row-gap: .35rem; padding: .55rem 0; }
	.t4t-toc__family ul { gap: .35rem; }
	.t4t-toc__family li:not(:last-child)::after { content: none; }
	.t4t-toc__family a { display: inline-block; padding: .2rem .6rem; border: 1px solid var(--theme-palette-color-5); border-radius: 999px; background: var(--theme-palette-color-8); font-size: .85rem; text-decoration: none; }
	.t4t-table tbody th { width: 40%; }
	.t4t-table :is(th, td) { padding: .5rem .65rem; font-size: .9rem; }
	.t4t-climate { min-width: 620px; }
	.t4t-rules { min-width: 560px; }
}

/* Nuovo ordine della pagina paese (Alian, 20/10) */
.t4t-section--places .t4t-map { margin: 0 0 1.5rem; }
.t4t-section--places .t4t-map iframe { height: 380px; border-radius: 10px; }
.t4t-section--basics { display: block; }
.t4t-destinations h3 { margin-top: 1.75rem; }
.t4t-quickref { position: relative; padding: 2.5rem 0; }
.t4t-quickref::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--theme-palette-color-5); }
.t4t-quickref > h2 { margin-top: 0; }
.t4t-quickref__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem 2rem; align-items: start; }
.t4t-quickref__grid > .t4t-section { padding: 0; }
.t4t-quickref__grid > .t4t-section::before { content: none; }
.t4t-quickref__grid > .t4t-section > h3 { margin: 0 0 .7rem; scroll-margin-top: 90px; }
.t4t-quickref__grid .t4t-table { margin-bottom: 0; }
.t4t-quickref__grid .t4t-table tbody th { width: 42%; }
.t4t-stories { position: relative; padding: 2.5rem 0; }
.t4t-stories::before { content: ""; position: absolute; top: 0; left: 50%; width: 100vw; transform: translateX(-50%); border-top: 1px solid var(--theme-palette-color-5); }
@media (max-width: 760px) { .t4t-quickref__grid { grid-template-columns: 1fr; } .t4t-section--places .t4t-map iframe { height: 280px; } }

/* Fonti in un riquadro chiuso: una riga sola, l'elenco si apre al clic (Alian, 20/10) */
.t4t-sources { margin: 2.5rem 0 0; padding-top: 0; border-top: 0; }
.t4t-sources__box { border: 1px solid var(--theme-palette-color-5); border-radius: 10px; background: var(--theme-palette-color-7); }
.t4t-sources__box > summary { position: relative; display: block; list-style: none; cursor: pointer; padding: .8rem 3rem .8rem 1.1rem; font-size: .9rem; }
.t4t-sources__box > summary::-webkit-details-marker { display: none; }
.t4t-sources__box > summary::after { content: ""; position: absolute; right: 1.1rem; top: 50%; width: .5rem; height: .5rem; border-right: 2px solid var(--theme-palette-color-1); border-bottom: 2px solid var(--theme-palette-color-1); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.t4t-sources__box[open] > summary::after { transform: translateY(-20%) rotate(-135deg); }
.t4t-sources__title { font-weight: 700; margin-right: .5rem; }
.t4t-sources .t4t-last-checked { margin: 0; opacity: .75; }
.t4t-sources__list { margin: 0; padding: .8rem 1.1rem 1rem 2.3rem; border-top: 1px solid var(--theme-palette-color-5); font-size: .82rem; line-height: 1.45; columns: 3 260px; column-gap: 2rem; }
.t4t-sources__list li { margin-bottom: .3rem; }
.t4t-sources__list small { display: inline; opacity: .6; }


/* Mappa dei luoghi in Places (Alian, 20/10): Leaflet, marker per tipo, legenda, fumetti */
.t4t-placesmap { margin: 0 0 1.75rem; }
.t4t-placesmap__canvas { height: 560px; border: 1px solid var(--theme-palette-color-5); border-radius: 10px; overflow: hidden; background: var(--theme-palette-color-6); z-index: 0; }
/* Riquadro e legenda occupano il loro spazio da subito: Leaflet arriva solo quando la mappa si avvicina, e un riquadro che
   compariva dopo spingeva giù la pagina di ~600 px (i salti dall'indice a Health, FAQ… si fermavano prima). Senza JavaScript
   resta la mappa semplice del <noscript>. */
@media (scripting: none) { .t4t-placesmap__canvas, .t4t-placesmap__legend { display: none; } }
.t4t-placesmap__legend { display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; margin: .7rem 0 0; padding: 0; list-style: none; font-size: .85rem; }
.t4t-placesmap__legend li { display: inline-flex; align-items: center; margin: 0; }
.t4t-placesmap__dot { display: inline-block; width: .8rem; height: .8rem; margin-right: .4rem; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .2); }
.t4t-placesmap .leaflet-popup-content-wrapper { border-radius: 10px; }
.t4t-placesmap .leaflet-popup-content { margin: .8rem 1rem; font-family: inherit; font-size: .9rem; line-height: 1.45; }
.t4t-pop strong { display: block; font-size: 1rem; color: var(--theme-palette-color-3, #2b2118); }
.t4t-pop__kind { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: .1rem 0 .35rem; }
.t4t-pop p { margin: 0 0 .4rem !important; }
.t4t-pop a { font-weight: 600; }
.t4t-placesmap .leaflet-container a { color: var(--theme-palette-color-1); }
@media (max-width: 760px) { .t4t-placesmap__canvas { height: 420px; } }

/* Avvisi in cima alla pagina guida (Alian, 21/10): leggibili e visibili subito */
.t4t-notice { position: relative; margin: 0 0 1.25rem; padding: 1rem 1.25rem 1.05rem 3.6rem; border-radius: 10px; border: 1px solid; border-left-width: 6px; font-size: 1.02rem; line-height: 1.5; }
.t4t-notice::before { position: absolute; left: 1.05rem; top: .95rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.05rem; color: #fff; }
.t4t-notice__title { display: block; margin-bottom: .2rem; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; }
.t4t-notice p { margin: 0 0 .55rem; }
.t4t-notice__link { display: inline-block; padding: .3rem .85rem; border-radius: 999px; font-weight: 700; font-size: .9rem; text-decoration: none; color: #fff !important; }
.t4t-notice--level3 { background: #fdecea; border-color: #b3261e; color: #5f1410; }
.t4t-notice--level3::before { content: "!"; background: #b3261e; }
.t4t-notice--level3 .t4t-notice__link { background: #b3261e; }
.t4t-notice--level2 { background: #fff1e0; border-color: #c25e00; color: #5c2d00; }
.t4t-notice--level2::before { content: "!"; background: #c25e00; }
.t4t-notice--level2 .t4t-notice__link { background: #c25e00; }
.t4t-notice--level1 { background: #fff8e1; border-color: #a77b00; color: #4d3800; }
.t4t-notice--level1::before { content: "!"; background: #a77b00; }
.t4t-notice--level1 .t4t-notice__link { background: #8a6600; }
.t4t-notice--verify { background: #e8f1fb; border-color: #2f6fb5; color: #12304f; }
.t4t-notice--verify::before { content: "i"; background: #2f6fb5; font-family: Georgia, serif; }
.t4t-notice--verify .t4t-notice__link { background: #2f6fb5; }
@media (max-width: 600px) { .t4t-notice { padding-left: 3.1rem; font-size: .97rem; } .t4t-notice::before { left: .8rem; } }


/* ---------- pre-footer, colonne e riga legale del footer (22/10) ---------- */
.t4t-prefooter { background: var(--theme-palette-color-7); border-top: 1px solid var(--theme-palette-color-5); padding: 2.2rem 0; }
.t4t-prefooter .ct-container { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.t4t-prefooter__logo { text-decoration: none; }
.t4t-prefooter__logo .t4t-logo__word { color: var(--theme-palette-color-4); }
.t4t-prefooter__text { margin: 0; flex: 1 1 18rem; font-family: "Playfair Display", Georgia, serif; font-size: 1.2rem; color: var(--theme-palette-color-3); }
.t4t-prefooter__actions { margin: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.t4t-prefooter__btn { display: inline-block; padding: .6rem 1.2rem; border-radius: 999px; border: 2px solid var(--theme-palette-color-1); background: var(--theme-palette-color-1); color: #fff !important; font-weight: 600; text-decoration: none; }
.t4t-prefooter__btn:hover { background: var(--theme-palette-color-2); border-color: var(--theme-palette-color-2); }
.t4t-prefooter__btn--ghost { background: transparent; color: var(--theme-palette-color-1) !important; }
.t4t-prefooter__btn--ghost:hover { background: var(--theme-palette-color-1); color: #fff !important; }
@media (max-width: 600px) { .t4t-prefooter { padding: 1.6rem 0; } .t4t-prefooter .ct-container { flex-direction: column; align-items: flex-start; } .t4t-prefooter__text { flex-basis: auto; } }
#footer [data-row*="middle"] .widget-menu li { margin-bottom: .35rem; }
#footer [data-row*="middle"] .widget-menu a { color: var(--theme-palette-color-3); }
#footer [data-row*="middle"] .widget-menu a:hover { color: var(--theme-palette-color-1); }
@media (max-width: 689px) { #footer [data-row*="middle"] .widget-title { font-size: 1rem; } }

/* Turnstile in fondo ai moduli, prima del pulsante (22/10) */
.t4t-turnstile { margin: 1rem 0; }

/* home: Popular destinations, 4 per riga (8 paesi = 2 righe piene), 2 su tablet e telefono */
.t4t-popular .t4t-dir__list { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 2.5rem; }
@media (max-width: 900px) { .t4t-popular .t4t-dir__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* home: blocco iniziale con l'immagine di default (portolano di Maggiolo) sotto una velatura scura, come blog e archivi (22/10) */
.home .t4t-home-hero.t4t-topo { background: linear-gradient(180deg, rgba(42, 29, 18, .42), rgba(42, 29, 18, .70)), var(--t4t-default-img, none) center / cover no-repeat, var(--theme-palette-color-6); border-bottom: 0; }
.home .t4t-home-hero :is(h1, .t4t-eyebrow) { color: #fff; text-shadow: 0 1px 14px rgba(0, 0, 0, .5); }
.home .t4t-home-hero .t4t-eyebrow { color: var(--t4t-on-dark); opacity: 1; }

/* Header sticky di Blocksy (Alian, 23/10): la barra del filtro A–Z resta sotto la header, non dietro; i salti alle ancore
   tengono conto di header e barra. --scroll-margin-top-offset è calcolata da Blocksy, shrink compreso. */
body { --t4t-sticky-top: calc(var(--admin-bar, 0px) + var(--theme-frame-size, 0px) + var(--scroll-margin-top-offset, 0px)); }
.t4t-dir__group { scroll-margin-top: calc(var(--t4t-sticky-top) + 5.5rem); }
.t4t-section h2, .t4t-suggest, .t4t-quickref__grid > .t4t-section > h3, .t4t-section[id], .t4t-quickref[id] { scroll-margin-top: calc(var(--t4t-sticky-top) + 1.25rem); }

/* Link affiliati in fondo a Getting there, Things to do, Connect: riquadro con etichetta "Partner" (t4t-core affiliate.php; Alian, 26/10) */
a:is(.t4t-affiliate, .t4t-linkbox) { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin: 1.5rem 0 0; padding: .9rem 1.1rem; background: var(--theme-palette-color-6); border: 1px solid var(--theme-palette-color-5); border-radius: 10px; color: var(--theme-palette-color-3); text-decoration: none; }
a:is(.t4t-affiliate, .t4t-linkbox):hover { border-color: var(--theme-palette-color-1); }
.t4t-affiliate__icon, .t4t-linkbox__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--theme-palette-color-8); color: var(--theme-palette-color-1); }
.t4t-affiliate__text, .t4t-linkbox__text { flex: 1 1 14rem; min-width: 0; line-height: 1.4; }
.t4t-affiliate__text strong, .t4t-linkbox__text strong { color: var(--theme-palette-color-4); font-weight: 600; }
.t4t-affiliate__tag { display: inline-block; margin-left: .3rem; padding: 0 .4rem; font-size: .7rem; line-height: 1.5; vertical-align: .1em; border: 1px solid var(--theme-palette-color-5); border-radius: 4px; background: var(--theme-palette-color-7); color: var(--theme-palette-color-2); }
.t4t-affiliate__line, .t4t-linkbox__line { display: block; font-size: .875rem; color: var(--theme-palette-color-2); }
.t4t-affiliate__cta, .t4t-linkbox__cta { flex: none; padding: .55rem 1rem; border-radius: 8px; background: var(--theme-palette-color-1); color: var(--theme-palette-color-8); font-size: .9rem; font-weight: 600; white-space: nowrap; }
a.t4t-affiliate:hover .t4t-affiliate__cta, a.t4t-linkbox:hover .t4t-linkbox__cta { background: var(--theme-palette-color-2); }
a.t4t-stories-link { margin: -1rem 0 2.5rem; } /* dopo Overview, prima della riga di Places */
@media (max-width: 560px) { .t4t-affiliate__cta, .t4t-linkbox__cta { flex: 1 1 100%; text-align: center; } }

/* Modale di ricerca come i moduli di contatto (Alian, 26/10): riquadro chiaro, campo con bordo intero, padding e angoli
   arrotondati, pulsante accanto, risultati in elenco leggibile. Blocksy usa un campo "a riga sotto" bianco su fondo scuro. */
#search-modal { background-color: rgba(30, 22, 16, .82) !important; }
#search-modal .ct-panel-content { align-items: flex-start; padding: 16vh 16px 2rem; }
#search-modal .ct-search-form { box-sizing: border-box; width: 100%; max-width: 680px; padding: 1.5rem; border-radius: 14px; background: var(--theme-palette-color-8); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
#search-modal .ct-search-form::before { content: "Search guides and travel stories"; display: block; margin-bottom: .6rem; font-weight: 600; font-size: .92rem; color: var(--theme-palette-color-3); }
#search-modal .ct-search-form-inner { gap: .6rem; align-items: center; margin: 0 !important; padding: 0 !important; min-height: 0; border: 0 !important; }
#search-modal .modal-field { flex: 1; box-sizing: border-box; height: auto; min-height: 52px; padding: .7rem .95rem !important; border: 1px solid var(--theme-palette-color-5) !important; border-radius: 8px; background: #fff !important; color: var(--theme-palette-color-3) !important; font-size: 1.05rem; line-height: 1.45; }
#search-modal .modal-field::placeholder { color: var(--theme-palette-color-2); opacity: .8; }
#search-modal .modal-field:focus { border-color: var(--theme-palette-color-1) !important; outline: 2px solid color-mix(in srgb, var(--theme-palette-color-1) 25%, transparent); outline-offset: 0; }
#search-modal .ct-search-form button[type="submit"] { flex: none; width: 52px; height: 52px; border-radius: 8px; background: var(--theme-palette-color-1); color: var(--theme-palette-color-8); }
#search-modal .ct-search-form button[type="submit"]:hover { background: var(--theme-palette-color-2); }
#search-modal .ct-search-results { margin-top: .9rem !important; padding-top: .75rem; border-top: 1px solid var(--theme-palette-color-5); max-height: 50vh; overflow-y: auto; }
#search-modal .ct-search-item { display: flex; align-items: center; gap: .9rem; padding: .45rem .5rem; border-radius: 8px; color: var(--theme-palette-color-3) !important; font-weight: 600; text-decoration: none; }
#search-modal .ct-search-item:is(:hover, :focus-visible) { background: var(--theme-palette-color-6); }
#search-modal .ct-search-item .ct-media-container { flex: none; width: 48px; height: 48px; border-radius: 6px; overflow: hidden; }
#search-modal .ct-search-item .ct-media-container img { width: 100%; height: 100%; object-fit: cover; }
#search-modal .ct-toggle-close { color: #fff; }
@media (max-width: 600px) { #search-modal .ct-panel-content { padding-top: 12vh; } #search-modal .ct-search-form { padding: 1.1rem; } }
