/* regioni-stile.css - stile comune delle pagine regione
   (alisei.net/borghi2/page/regione-*.html)
   versione interna: 1.4 (6 novembre 2026) - punto di fuoco della foto di
   apertura con due variabili, --fuoco (desktop) e --fuoco-mobile (<= 800px),
   ognuna "orizzontale% verticale%". Lo stesso punto fa da object-position
   (quale parte della foto si vede) e da transform-origin (centro dello
   zoom): quel punto della foto resta fermo mentre l'immagine si ingrandisce.
   Ogni pagina dichiara solo i due valori:

     <style>
       :root { --fuoco: 70% 50%; --fuoco-mobile: 40% 60%; }
     </style>

   1.3 (6 novembre 2026) - altezza della foto di apertura
   (.hero) uguale alle pagine borgo: desktop 92vh (era 86vh), smartphone
   (<= 600px) schermo visibile meno la barra del menu.
   1.2 (6 novembre 2026) - zoom della foto di apertura
   (.hero-img): da zoom indietro rapido (104% -> 100% in 14s, ease-out) a
   zoom in avanti lento e costante da 100% a --hero-zoom-scala (140%) in
   --hero-zoom-durata (10s), poi l'immagine resta ferma ingrandita.
   1.1 (5 novembre 2026) - sottotitolo della foto di
   apertura (.hero-sub) largo come il titolo, senza limite di 540px.
   1.0 (5 novembre 2026) - estratto dallo <style> interno
   delle pagine regione, identico in tutte e dieci tranne il punto di fuoco
   della foto di apertura, che resta nel piccolo <style> di ogni pagina
   (dalla versione 1.4 con le variabili --fuoco / --fuoco-mobile, vedi sopra).

   NB: file separato da borghi-stile.css (le pagine regione non lo caricano
   e usano proprie variabili: --t, --s, --cr, --dk, ...). */

/* === VARIABILI, identiche alla homepage === */
:root {
  --t:  #8B3A1A;
  --s:  #B8956A;
  --cr: #FCFAF8;
  --dk: #1D160E;
  --md: #4A3828;
  --ls: #E8DFD0;
  --ac: #5C2800;
  --tx: #1A1008;
  /* zoom della foto di apertura (6 novembre 2026) */
  --hero-zoom-scala:  1.2;  /* ingrandimento finale: 1.2 = 120% */
  --hero-zoom-durata: 10s;  /* tempo per arrivarci, poi l'immagine si ferma */
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--cr); color: var(--tx);
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300; font-size: 16px; line-height: 1.7;
}

/* -- label sezione -- */
.sec-label {
  font-size: .90rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--t); display: flex; align-items: center; gap: .55rem; margin-bottom: .75rem;
  font-weight: 300; font-family: 'Source Serif 4', Georgia, serif;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--s); opacity: .55; }

/* ============================
   NAV
============================ */
nav.topbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--dk); padding: 0 2rem;
  display: flex; align-items: center; justify-content: space-between; height: 56px;
}
.logo-img { height: 38px; width: auto; display: block; object-fit: contain; }
.nav-links { display: flex; gap: 0; list-style: none; align-items: stretch; }
.nav-links > li { position: relative; display: flex; align-items: stretch; }
.nav-links > li > a,
.nav-links > li > button.nav-parent {
  display: flex; align-items: center; gap: .3rem; padding: 0 1rem;
  color: rgba(245,240,232,.75); text-decoration: none;
  font-family: 'Source Serif 4', serif; font-size: .92rem;
  letter-spacing: .10em; text-transform: uppercase;
  transition: color .2s, background .2s;
  background: none; border: none; cursor: pointer; height: 56px; white-space: nowrap;
}
.nav-links > li > a:hover,
.nav-links > li > button.nav-parent:hover,
.nav-links > li.open > button.nav-parent { color: #fff; background: rgba(255,255,255,.06); }
.nav-arrow { font-size: .55rem; opacity: .6; transition: transform .25s; display: inline-block; }
.nav-links > li.open .nav-arrow { transform: rotate(180deg); }
.nav-dropdown {
  display: none; position: absolute; top: 56px; left: 0;
  min-width: 220px; background: #2A1E16;
  border-top: 2px solid var(--t); box-shadow: 0 8px 24px rgba(0,0,0,.4);
  list-style: none; z-index: 200;
}
.nav-links > li.open .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: .28rem 1.2rem;
  color: rgba(245,240,232,.72); text-decoration: none;
  font-family: 'Source Serif 4', serif; font-size: .88rem;
  letter-spacing: .05em; line-height: 1.25;
  border-bottom: 1px solid rgba(196,168,130,.1);
  transition: background .15s, color .15s;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover { background: rgba(160,82,45,.25); color: #fff; }
.hamburger { display: none; background: none; border: none; cursor: pointer; flex-direction: column; gap: 5px; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--s); }
@media (max-width: 700px) {
  .nav-links {
    display: none; flex-direction: column; align-items: stretch;
    position: fixed; top: 56px; left: 0; right: 0;
    background: var(--dk); padding: .5rem 0 1rem; z-index: 99; gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links > li > a,
  .nav-links > li > button.nav-parent { height: auto; padding: .75rem 1.5rem; width: 100%; justify-content: space-between; }
  .nav-dropdown { position: static; box-shadow: none; border-top: none; border-left: 3px solid var(--t); margin-left: 1.5rem; }
  .hamburger { display: flex; }
}

/* ============================
   HERO
============================ */
.hero {
  position: relative; height: 92vh; min-height: 420px; /* era 86vh (6/11/2026) */
  display: flex; align-items: flex-end; overflow: hidden; background: #000000;
}
/* smartphone (6/11/2026): come le pagine borgo, la foto riempie lo schermo
   visibile meno la barra del menu (56px). svh = altezza con le barre del
   browser visibili, nessun salto quando compaiono o spariscono; la prima
   riga e' il ripiego per i browser che non conoscono svh */
@media (max-width: 600px) {
  .hero {
    height: calc(100vh - 56px);
    height: calc(100svh - 56px);
  }
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .62; transform: scale(1);
  will-change: transform; backface-visibility: hidden; /* zoom lento senza tremolii */
  animation: hz var(--hero-zoom-durata) linear forwards;
  /* punto di fuoco (versione 1.4): stessa coppia di valori per la parte
     di foto visibile e per il centro dello zoom */
  object-position:  var(--fuoco, 50% 50%);
  transform-origin: var(--fuoco, 50% 50%);
}
@media (max-width: 800px) {
  .hero-img {
    object-position:  var(--fuoco-mobile, var(--fuoco, 50% 50%));
    transform-origin: var(--fuoco-mobile, var(--fuoco, 50% 50%));
  }
}
@keyframes hz {
  from { transform: scale(1); }
  to   { transform: scale(var(--hero-zoom-scala)); }
}
@media (prefers-reduced-motion: reduce) { .hero-img { animation: none; } }
.hero-ov {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.28) 55%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: 2.5rem 2.5rem 3.5rem; max-width: 800px;
  animation: fu 1s .3s both;
}
@keyframes fu { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.hero-ey {
  font-size: 1.05rem; letter-spacing: .14em; text-transform: uppercase;
  color: #FEC700; margin-bottom: .9rem; display: flex; align-items: center; gap: .75rem;
  font-weight: 300; font-family: 'Source Serif 4', Georgia, serif;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 7vw, 4.2rem); font-weight: 400;
  color: var(--cr); line-height: 1.05; margin-bottom: 1rem;
}
.hero h1 em { font-style: italic; color: #D29D00; }
.hero-sub {
  font-size: 1.08rem; color: rgba(245,240,232,.72);
  font-style: italic; line-height: 1.7;
  /* max-width: 540px tolto (versione 1.1): il sottotitolo va a capo alla
     stessa larghezza del titolo (limite comune: .hero-content) */
}



/* ============================
   INTRO - 2 colonne
============================ */
.intro {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; padding: 3.5rem 2.5rem 3rem;
}
.intro-text h2 {
  font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 400;
  color: var(--md); margin: .6rem 0 1rem; line-height: 1.25;
}
.intro-text p { font-size: 1.05rem; color: var(--md); opacity: .88; line-height: 1.75; margin-bottom: .9rem; }
.intro-text p:last-child { margin-bottom: 0; }

/* -- slideshow foto (colonna destra) -- */
.foto-ss {
  position: sticky;
  top: 68px;
  align-self: start;
  width: 100%; max-width: 640px;
  aspect-ratio: 640 / 400; overflow: hidden; background: var(--dk);
}
@media (max-width: 800px) {
  .foto-ss { position: static; top: auto; }
}
.foto-ss-slides { position: relative; width: 100%; height: 100%; }
.foto-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease-in-out; }
.foto-slide.active { opacity: 1; }

/* la foto resta FISSA, nessun transform sull'immagine */
.foto-slide img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* gradiente scuro in basso per leggibilita' del titolo */
.foto-caption-wrap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 2.5rem 1.2rem .9rem;
  background: linear-gradient(to top, rgba(15,11,9,.88) 0%, transparent 100%);
  display: flex; justify-content: center; align-items: flex-end;
}

/* il TITOLO fa zoom-in: parte piccolo e cresce a dimensione normale */
.foto-caption {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 400; color: var(--cr); font-style: italic;
  letter-spacing: .06em; text-align: center;
  /* stato inattivo: ridotto e invisibile */
  transform: scale(.72);
  opacity: 0;
  transition: transform .8s ease-out, opacity .8s ease-out;
}
.foto-slide.active .foto-caption {
  transform: scale(1);
  opacity: 1;
  /* lo zoom-in dura quanto la permanenza della foto */
  transition: transform 4s ease-out, opacity 1s ease-out;
}

/* barre slideshow rimosse */

/* ============================
   SEZIONE MAPPA
============================ */
.mappa-section { padding: 0 2.5rem 3rem; }
.mappa-section h2 {
  font-family: 'Playfair Display', serif; font-size: 1.98rem; font-weight: 400; color: var(--md);
}
/* limita la larghezza dell'iframe mappa, meno invasivo */
#mappa-regione { width: 100%; }

/* ============================
   ULTIME RECENSIONI
   Stile identico alla homepage.
   ID identici a quelli attesi da ultime-recensioni.js:
   #hero-ss, #ss-slides, #ss-prev, #ss-next, #ss-nav
============================ */
.borghi-section { padding: 0 2.5rem 3rem; }
.mappa-section + .borghi-section { padding-top: 3rem; }
.bs-head { margin-bottom: .8rem; }

/* -- CTA inner (stessa struttura di .ss-slide ma fuori dallo slideshow) -- */
.borghi-section + .borghi-section { padding-top: 2.5rem; }
.cta-inner .s-ey {
  font-size: 1.0rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--s); margin-bottom: .55rem; display: flex; align-items: center; gap: .5rem;
  white-space: nowrap;
}
.cta-inner .s-ey::before { display: none; }
.cta-inner .s-name {
  font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 400; color: var(--cr); line-height: 1.1; margin-bottom: .5rem;
}
.cta-inner .s-name em { font-style: italic; color: var(--s); }
.cta-inner .s-cta {
  display: block; margin-top: 1.4rem; text-align: center;
  background: var(--t); color: #fff;
  padding: .75rem 2rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; transition: background .2s; font-family: 'Source Serif 4', serif;
  text-decoration: none; max-width: 280px; margin-left: auto; margin-right: auto;
}
.cta-inner .s-cta:hover { background: var(--ac); }
@media (max-width: 600px) {
  .cta-inner .s-ey { font-size: .80rem; letter-spacing: .10em; }
}
.hero-ss { position: relative; height: 340px; overflow: hidden; background: #3A2A1E; }
@media (max-width: 600px) { .hero-ss { height: 320px; } }
.ss-slides { display: flex; height: 100%; transition: transform .9s cubic-bezier(.77,0,.18,1); }
.ss-slide { flex: 0 0 100%; height: 100%; position: relative; display: flex; align-items: center; }
.ss-slide .side-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--t); }
.ss-slide .s-num {
  position: absolute; top: 1.8rem; right: 2.5rem;
  font-family: 'Playfair Display', serif; font-size: 5rem; font-weight: 400;
  color: rgba(184,149,106,.22); line-height: 1; user-select: none;
}
.ss-slide .sc { position: relative; z-index: 2; padding: 2rem 4.5rem; width: 100%; }
.ss-slide .s-ey {
  font-size: 1.0rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--s); margin-bottom: .55rem; display: flex; align-items: center; gap: .5rem;
}
.ss-slide .s-ey::before { display: none; }
.ss-slide .s-name {
  font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 400; color: var(--cr); line-height: 1.05; margin-bottom: .5rem; white-space: nowrap;
}
.ss-slide .s-name em { font-style: italic; color: var(--s); }
.ss-slide .s-desc { font-size: .96rem; color: rgba(245,240,232,.68); font-style: italic; line-height: 1.72; max-width: 640px; }
.ss-slide .s-cta {
  display: inline-block; margin-top: 1rem;
  background: var(--t); color: #fff; border: none;
  padding: .4rem 1.1rem; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  cursor: pointer; transition: background .2s; font-family: 'Source Serif 4', serif; text-decoration: none;
}
.ss-slide .s-cta:hover { background: var(--ac); }
.ss-arr {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(58,42,30,.6); border: 1px solid rgba(184,149,106,.3);
  color: rgba(184,149,106,.8); width: 38px; height: 38px;
  cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: all .2s; font-family: serif; flex-shrink: 0;
}
.ss-arr:hover { background: rgba(184,149,106,.15); border-color: var(--s); color: var(--s); }
.ss-arr.prev { left: .5rem; }
.ss-arr.next { right: .5rem; }
.ss-nav { position: absolute; bottom: 1.2rem; right: 1.5rem; display: flex; gap: .4rem; z-index: 10; }
.ss-dot { width: 26px; height: 2px; background: rgba(245,240,232,.2); cursor: pointer; transition: background .3s; }
.ss-dot.on { background: var(--s); }
@media (max-width: 600px) {
  .ss-slide .s-name { white-space: normal; font-size: 1.5rem; }
  .ss-slide .sc { padding: 1.6rem 4rem; }
  .ss-slide .s-num { font-size: 3rem; top: 1rem; right: 1rem; opacity: .06; }
  .ss-slide .s-desc { font-size: .88rem; }
}

/* ============================
   CTA / FOOTER
============================ */
.cta-banner { background: #1D160E; padding: 4rem 2rem; text-align: center; }
.cta-banner__eyebrow { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--s); margin-bottom: .9rem; }
.cta-banner__title { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem,4vw,2.5rem); font-weight: 400; color: #fff; margin-bottom: 1.4rem; line-height: 1.2; }
.cta-banner__title em { font-style: italic; color: var(--s); }
.btn-cta { display: inline-block; background: var(--t); color: #fff; padding: .9rem 2.4rem; text-decoration: none; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; font-family: 'Source Serif 4', serif; transition: background .2s; }
.btn-cta:hover { background: var(--ac); }
.sep-line { height: 30px; background: var(--cr); }
.site-footer { background: #111; padding: 2.5rem 2rem; text-align: center; border-top: 1px solid rgba(196,168,130,.15); font-size: .78rem; color: rgba(255,255,255,.45); }
.site-footer__social-label { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 300; letter-spacing: .06em; color: rgba(255,255,255,.75); margin-bottom: 1rem; }
.site-footer__social-icons { display: flex; justify-content: center; gap: .75rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.site-footer__social-icons a { display: block; width: 36px; height: 36px; border-radius: 4px; overflow: hidden; flex-shrink: 0; transition: opacity .2s; }
.site-footer__social-icons a:hover { opacity: .75; }
.site-footer__social-icons img { width: 36px; height: 36px; object-fit: cover; display: block; }
.site-footer__links { margin-bottom: .8rem; letter-spacing: .04em; font-size: .85rem; }
.site-footer__links a { color: #B8956A; text-decoration: none; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__copy { letter-spacing: .02em; line-height: 1.9; }

@media (max-width: 800px) {
  .intro { grid-template-columns: 1fr; gap: 2rem; padding: 2rem 1.5rem; }
  .foto-ss { max-width: 100%; }
  .mappa-section, .borghi-section { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (max-width: 600px) {
  .hero-content { padding: 2rem 1.5rem 3rem; }
  .hero h1 { font-size: 2.6rem; }
}

/* ============================
   COOKIE BANNER
============================ */
.cookie-banner { position: fixed; inset-block-end: 0; inset-inline: 0; z-index: 999; background: rgba(10,8,6,.97); backdrop-filter: blur(16px); border-top: 1px solid rgba(200,184,154,.18); padding: 1.6rem 2rem; transition: transform .4s cubic-bezier(.4,0,.2,1), opacity .35s ease; }
.cookie-banner__inner { max-width: 1100px; margin-inline: auto; display: flex; align-items: flex-start; gap: 2rem; }
.cookie-banner.cookie-banner--hidden { transform: translateY(110%); opacity: 0; pointer-events: none; }
.cookie-banner__icon { font-size: 2.4rem; line-height: 1; flex-shrink: 0; margin-top: .2rem; }
.cookie-banner__content { flex: 1; min-width: 0; }
.cookie-banner__title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 400; font-style: italic; color: rgba(255,255,255,.9); margin-bottom: .4rem; }
.cookie-banner__text { font-size: .9rem; color: rgba(255,255,255,.55); line-height: 1.65; }
.cookie-banner__text a { color: var(--s); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner__actions { display: flex; flex-direction: column; gap: .6rem; flex-shrink: 0; align-items: stretch; width: 180px; }
.cookie-btn { display: inline-block; padding: .75rem 1.5rem; font-family: 'Source Serif 4', serif; font-size: .82rem; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; border: none; text-align: center; transition: background .2s, color .2s; white-space: nowrap; }
.cookie-btn--accept { background: var(--t); color: #fff; }
.cookie-btn--accept:hover { background: var(--ac); }
.cookie-btn--necessary { background: transparent; color: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.18); }
.cookie-btn--necessary:hover { color: #fff; border-color: rgba(255,255,255,.4); }
.cookie-btn--manage { background: transparent; color: var(--s); font-size: .76rem; padding: .3rem 0; text-decoration: underline; text-underline-offset: 2px; letter-spacing: .06em; }
.cookie-btn--manage:hover { color: #fff; }
.cookie-modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(10,8,6,.7); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 1.5rem; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.cookie-modal-overlay.cookie-modal--open { opacity: 1; pointer-events: auto; }
.cookie-modal { background: #1e1a17; border: 1px solid rgba(200,184,154,.2); max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; padding: 2.5rem; transform: translateY(20px); transition: transform .3s ease; }
.cookie-modal-overlay.cookie-modal--open .cookie-modal { transform: translateY(0); }
.cookie-modal__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.6rem; padding-bottom: 1.2rem; border-bottom: 1px solid rgba(200,184,154,.15); }
.cookie-modal__title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 300; font-style: italic; color: #fff; }
.cookie-modal__close { background: none; border: none; cursor: pointer; color: rgba(255,255,255,.4); font-size: 1.4rem; line-height: 1; transition: color .2s; padding: .2rem .4rem; }
.cookie-modal__close:hover { color: #fff; }
.cookie-modal__intro { font-size: .9rem; color: rgba(255,255,255,.5); line-height: 1.65; margin-bottom: 1.8rem; }
.cookie-modal__intro a { color: var(--s); text-decoration: underline; text-underline-offset: 2px; }
.cookie-category { padding: 1.1rem 0; border-bottom: 1px solid rgba(200,184,154,.1); }
.cookie-category:last-of-type { border-bottom: none; }
.cookie-category__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.cookie-category__name { font-size: .82rem; letter-spacing: .15em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.cookie-category__desc { font-size: .85rem; color: rgba(255,255,255,.38); line-height: 1.55; }
.cookie-toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.cookie-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.cookie-toggle__track { position: absolute; inset: 0; background: rgba(255,255,255,.12); border-radius: 12px; cursor: pointer; transition: background .25s; }
.cookie-toggle input:checked + .cookie-toggle__track { background: var(--t); }
.cookie-toggle input:disabled + .cookie-toggle__track { background: rgba(160,82,45,.35); cursor: not-allowed; }
.cookie-toggle__track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s; }
.cookie-toggle input:checked + .cookie-toggle__track::after { transform: translateX(20px); }
.cookie-modal__footer { display: flex; gap: .75rem; margin-top: 2rem; flex-wrap: wrap; }
.cookie-modal__footer .cookie-btn { flex: 1; min-width: 120px; }
@media (max-width: 640px) {
  .cookie-banner { padding: 1.4rem 1.2rem; }
  .cookie-banner__inner { flex-direction: column; gap: 1rem; align-items: center; }
  .cookie-banner__content { text-align: center; }
  .cookie-banner__actions { flex-direction: column; width: 220px; }
  .cookie-modal { padding: 1.6rem 1.2rem; }
}

/* -- Mappa + pannello altre regioni -- */
.mappa-outer {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 20px;
  overflow: visible;
}
.mappa-outer #mappa-regione {
  border: none;
}
.mappa-outer .mr-label {
  grid-column: 1 / -1;
  margin-top: 1rem;
  text-align: left;
  font-size: 1.2rem;
  font-weight: 400;
  font-style: italic;
  color: var(--md);
  line-height: 1.5;
}
.mappa-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  overflow-y: auto;
}
.mappa-sidebar-top {
  background: #E8E0D2;
  border: 1px solid rgba(184,149,106,.35);
  padding: 1rem 1rem 1.2rem;
  flex-shrink: 0;
}
.mappa-sidebar-bottom {
  background: #E8E0D2;
  border: 1px solid rgba(184,149,106,.35);
  padding: 1rem 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mappa-sidebar-title {
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--md);
  font-weight: 700;
  text-align: center;
  margin-bottom: .75rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid rgba(184,149,106,.40);
  flex-shrink: 0;
}

.mappa-sidebar-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.mappa-sidebar-list a {
  display: block;
  padding: .18rem .5rem;
  font-family: 'Source Serif 4', serif;
  font-size: 1.05rem;
  color: var(--md);
  text-decoration: none;
  border-radius: 2px;
  line-height: 1.3;
  transition: background .15s, color .15s;
}
.mappa-sidebar-list a:hover {
  background: rgba(184,149,106,.18);
  color: var(--t);
}
.mappa-sidebar-msg {
  font-size: .75rem;
  color: var(--md);
  opacity: .5;
  font-style: italic;
}
@media (max-width: 700px) {
  .mappa-outer { grid-template-columns: 1fr; }
  .mappa-outer #mappa-regione { order: 1; }
  .mappa-outer .mr-label { order: 2; margin-top: .8rem; font-size: .9rem; text-align: center; }
  .mappa-sidebar {
    order: 3;
    flex-direction: column;
    gap: 1rem;
  }
  .mappa-sidebar-top { width: 100%; }
  .mappa-sidebar-bottom {
    flex-direction: row;
    flex-wrap: wrap;
    gap: .4rem;
    align-items: center;
  }
  .mappa-sidebar-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
  .mappa-sidebar-list { flex-direction: row; flex-wrap: wrap; gap: .3rem; }
  .mappa-sidebar-list a { font-size: 1.1rem; padding: .22rem .5rem; }
  .mappa-sidebar-list a { padding: .25rem .6rem; font-size: .88rem; }
}


/* titolo mappa quando mostra una regione diversa */
#mappa-titolo.mappa-esterna {
  color: #C0392B;
}
#mappa-torna {
  display: none;
  width: 100%;
  margin-bottom: .8rem;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--t);
  cursor: pointer;
  background: rgba(139,58,26,.08);
  border: 1px solid rgba(139,58,26,.40);
  font-family: 'Source Serif 4', serif;
  text-align: center;
  padding: .5rem .6rem;
  line-height: 1.4;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
#mappa-torna:hover {
  background: rgba(139,58,26,.16);
  color: var(--ac);
}
/* voce attiva nella sidebar */
.mappa-sidebar-list a.attiva {
  background: rgba(139,58,26,.12);
  color: var(--t);
  font-weight: 700;
}


/* punto di fuoco della foto di apertura: i valori (--fuoco, --fuoco-mobile)
   sono nel piccolo <style> di ogni pagina regione, le regole in .hero-img */

.intro-cta {
  display: inline-block;
  margin-top: 2rem;
  align-self: flex-start;
  padding: .6rem 1.4rem;
  border: 1px solid rgba(139,58,26,.45);
  color: var(--t);
  font-family: 'Source Serif 4', serif;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.intro-cta:hover { background: var(--t); color: #fff; }

/* ================================
   CERCA BORGO NELLA MAPPA
================================ */
.mappa-search {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.mappa-search-title {
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--md);
  font-weight: 700;
  text-align: center;
}
.mappa-search-row {
  display: flex;
  gap: .3rem;
}
.mappa-search-input {
  flex: 1;
  min-width: 0;
  padding: .38rem .55rem;
  font-family: 'Source Serif 4', serif;
  font-size: .88rem;
  color: var(--tx);
  background: #fff;
  border: 1px solid rgba(184,149,106,.55);
  border-radius: 2px;
  outline: none;
  transition: border-color .2s;
}
.mappa-search-input:focus { border-color: var(--t); }
.mappa-search-input::placeholder { color: rgba(74,56,40,.38); font-style: italic; }
.mappa-search-btn {
  padding: .38rem .6rem;
  background: var(--t);
  color: #fff;
  border: none;
  border-radius: 2px;
  cursor: pointer;
  font-size: .82rem;
  line-height: 1;
  transition: background .2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mappa-search-btn:hover { background: var(--ac); }
.mappa-search-hint {
  font-size: .76rem;
  color: var(--md);
  opacity: .78;
  font-style: italic;
  line-height: 1.3;
  text-align: center;
}
/* popup "non trovato" */
.mappa-notfound {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,11,9,.55);
  backdrop-filter: blur(4px);
  animation: mf-in .2s ease;
}
@keyframes mf-in { from { opacity: 0; } to { opacity: 1; } }
.mappa-notfound-box {
  background: var(--cr);
  border: 1px solid rgba(184,149,106,.45);
  border-top: 3px solid var(--t);
  padding: 1.6rem 2rem; max-width: 320px; width: 90%;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  animation: mf-slide .2s ease;
}
@keyframes mf-slide { from { transform: translateY(16px); } to { transform: translateY(0); } }
.mappa-notfound-icon { font-size: 2rem; margin-bottom: .5rem; line-height: 1; }
.mappa-notfound-title {
  font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 400;
  color: var(--md); margin-bottom: .4rem;
}
.mappa-notfound-msg {
  font-size: .88rem; color: var(--md); opacity: .75;
  line-height: 1.55; margin-bottom: 1rem;
}
.mappa-notfound-close {
  background: var(--t); color: #fff; border: none;
  padding: .5rem 1.6rem;
  font-family: 'Source Serif 4', serif; font-size: .78rem;
  letter-spacing: .10em; text-transform: uppercase;
  cursor: pointer; transition: background .2s;
}
.mappa-notfound-close:hover { background: var(--ac); }

/* popup selezione multipla */
.mappa-selection {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,11,9,.55);
  backdrop-filter: blur(4px);
  animation: mf-in .2s ease;
}
.mappa-selection-box {
  background: var(--cr);
  border: 1px solid rgba(184,149,106,.45);
  border-top: 3px solid var(--t);
  padding: 1.4rem 1.6rem 1.6rem;
  max-width: 380px; width: 92%;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  animation: mf-slide .2s ease;
}
.mappa-selection-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 400;
  color: var(--md); margin-bottom: .25rem;
}
.mappa-selection-sub {
  font-size: .78rem; color: var(--md); opacity: .6;
  font-style: italic; margin-bottom: .9rem;
}
.mappa-selection-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .45rem;
  max-height: 52vh; overflow-y: auto;
}
.mappa-selection-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .5rem .65rem;
  background: #fff;
  border: 1px solid rgba(184,149,106,.3);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-align: left; width: 100%;
}
.mappa-selection-item:hover {
  background: rgba(139,58,26,.06);
  border-color: var(--t);
}
.mappa-selection-thumb {
  width: 52px; height: 38px;
  object-fit: cover; flex-shrink: 0;
  background: var(--ls);
}
.mappa-selection-name {
  font-family: 'Playfair Display', serif;
  font-size: .98rem; font-weight: 400;
  color: var(--md); line-height: 1.2;
}
.mappa-selection-close {
  display: block; margin-top: .9rem; width: 100%;
  background: transparent; color: var(--md);
  border: 1px solid rgba(184,149,106,.4);
  padding: .45rem 1rem;
  font-family: 'Source Serif 4', serif; font-size: .76rem;
  letter-spacing: .10em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, color .2s;
}
.mappa-selection-close:hover { background: var(--t); color: #fff; border-color: var(--t); }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-4px); }
  40%     { transform: translateX( 4px); }
  60%     { transform: translateX(-3px); }
  80%     { transform: translateX( 3px); }
}
.mappa-search-input.shake { animation: shake .35s ease; border-color: var(--t) !important; }
@media (max-width: 700px) {
  .mappa-search { width: 100%; }
}
