/* 19/10/2026 - inquadratura delle foto d'apertura scelta dall'area riservata (computer / telefono) */
html .s-hero .hero-media img[style*="--pos-pc"] { object-position: var(--pos-pc); }
@media (max-width: 760px) {
  html .s-hero .hero-media img[style*="--pos-tel"] { object-position: var(--pos-tel); }
}

/* ---------- 19/10/2026: selettore della lingua nella barra ---------- */
.nav-lingue { display: inline-flex; gap: .15rem; align-items: center; font-size: .78rem; letter-spacing: .06em; }
.nav .nav-lingue a { padding: .25rem .35rem; border-bottom: 0 !important; opacity: .7; font-weight: 500; }
.nav .nav-lingue a.attiva { opacity: 1; font-weight: 700; text-decoration: underline; text-underline-offset: .3em; }
.nav .nav-lingue a:hover { opacity: 1; }
@media (max-width: 900px) { .nav-lingue { font-size: 1rem; gap: .6rem; } }

/* ---------- pagine senza foto d'apertura (privacy, cookie): barra sempre chiara ---------- */
.s-legale { padding: calc(6.5rem + 2vh) 0 4.5rem; }
.s-legale h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); margin-bottom: 1.6rem; }
.testo-legale h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.testo-legale p { margin: 0 0 .9rem; line-height: 1.65; }

/* ---------- modulo contatti ---------- */
.modulo .trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.modulo .form-ok { background: #e7f1e4; color: #2c4a26; border-radius: var(--r-sm, 8px); padding: 1rem 1.1rem; margin-top: .6rem; line-height: 1.5; }
.modulo .form-errore { background: #f8e4df; color: #7a2b1c; border-radius: var(--r-sm, 8px); padding: .8rem 1rem; margin: .4rem 0 .8rem; }
.modulo .f-field.errore input, .modulo .f-field.errore textarea { border-color: #b4452f; box-shadow: 0 0 0 2px rgba(180,69,47,.15); }
.modulo .f-privacy { display: flex; gap: .55rem; align-items: flex-start; margin: .2rem 0 1.2rem; font-size: .9rem; line-height: 1.45; cursor: pointer; }
.modulo .f-privacy input { margin-top: .2rem; width: 1.05rem; height: 1.05rem; flex: none; accent-color: var(--accent); }
.modulo .f-privacy.errore span { color: #b4452f; }
.modulo button.btn { border: 0; cursor: pointer; font: inherit; }

/* ---------- mappa caricata solo su richiesta ---------- */
.mappa-riposo { min-height: 100%; height: 100%; min-height: 340px; border-radius: var(--r, 12px); background: var(--surface, #efe7da) url("../img/nuove/contatti/falegnameria-tramonto-u1.jpg") center/cover; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; padding: 2rem; text-align: center; overflow: hidden; }
.mappa-riposo::before { content: ""; position: absolute; inset: 0; background: rgba(24,15,8,.62); }
.mappa-riposo > * { position: relative; }
.mappa-riposo p { color: #f4ece1; max-width: 28ch; margin: 0; }
.mappa-riposo a { color: #f4ece1; font-size: .9rem; text-decoration: underline; }
.mappa-riposo .btn { border: 0; cursor: pointer; font: inherit; }

/* ---------- fascia dell'anteprima (solo per chi e' entrato nell'area riservata) ---------- */
.anteprima-avviso { position: fixed; z-index: 300; left: 0; right: 0; bottom: 0; background: #a8682f; color: #fff; text-align: center; padding: .7rem 1rem; font: 600 .9rem/1.4 Inter, system-ui, sans-serif; box-shadow: 0 -4px 18px rgba(0,0,0,.25); }

/* ---------- link nel piede legale ---------- */
.legal a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }

/* 19/10/2026: con il selettore della lingua il menu e' piu' largo: il logo non si deve schiacciare */
.head .brand { flex: none; }
.head .brand img { max-width: none; }
@media (min-width: 901px) and (max-width: 1360px) {
  html:is([data-v="a"]) .nav { gap: 1.05rem; }
  html:is([data-v="a"]) .nav a { font-size: .9rem; }
  .nav-lingue { font-size: .72rem; }
}

.mappa-riposo a, .mappa-riposo a:visited { color: #f4ece1 !important; }

/* 19/10/2026 (Alex): IT EN DE troppo attaccati -> piu' spazio (regole piu' forti di ".nav a") */
html .nav .nav-lingue { gap: .75rem; margin: 0 .2rem; }
html .nav .nav-lingue a { padding: .25rem .1rem; font-size: .8rem; letter-spacing: .08em; }
@media (min-width: 901px) and (max-width: 1360px) { html .nav .nav-lingue { gap: .6rem; } html .nav .nav-lingue a { font-size: .74rem; } }
@media (max-width: 900px) { html .nav .nav-lingue { gap: 1.4rem; } html .nav .nav-lingue a { font-size: 1rem; padding: .3rem .2rem; } }

/* 19/10/2026 (Alex): la foto della filosofia era troppo scura (velo uniforme al 74%): ora il velo e' forte
   solo dietro la frase e quasi assente ai bordi, cosi' si vedono gli anelli del tronco e la frase resta leggibile */
html:is([data-v="a"]) .s-quote .quote-media::after { background: radial-gradient(ellipse 48% 62% at 50% 50%, rgba(24,15,8,.70) 0%, rgba(24,15,8,.48) 55%, rgba(24,15,8,.10) 100%); }
html .s-quote blockquote { text-shadow: 0 2px 16px rgba(0,0,0,.6); }
html .s-quote .who { color: #f0dcc0; opacity: 1; font-weight: 600; text-shadow: 0 1px 10px rgba(0,0,0,.7); }

/* ---------- 19/10/2026: banner dei cookie (Accetta e Rifiuta con lo stesso peso) ---------- */
.consenso { position: fixed; z-index: 250; left: 1.2rem; bottom: 1.2rem; width: min(460px, calc(100vw - 2.4rem)); background: #fbf7f1; color: #2b2118; border-radius: 14px; box-shadow: 0 18px 50px -12px rgba(20,13,8,.45), 0 0 0 1px rgba(43,33,24,.08); padding: 1.3rem 1.3rem 1.1rem; font-family: Inter, system-ui, sans-serif; font-size: .9rem; line-height: 1.5; }
.consenso[hidden] { display: none; }
.consenso h2 { font-family: var(--display, Georgia, serif); font-size: 1.25rem; margin: 0 2rem .5rem 0; color: #2b2118; }
.consenso p { margin: 0 0 .9rem; }
.consenso a { color: #8a5222; text-decoration: underline; text-underline-offset: .2em; }
.consenso-x { position: absolute; top: .55rem; right: .6rem; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: transparent; color: #5c4b3c; font-size: 1.5rem; line-height: 1; cursor: pointer; }
.consenso-x:hover { background: rgba(43,33,24,.08); }
.consenso-scelte { display: grid; gap: .6rem; margin: 0 0 1rem; padding: .8rem; background: #f1e9dc; border-radius: 10px; }
.consenso-scelte[hidden] { display: none; }
.consenso-voce { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.consenso-voce input { width: 1.1rem; height: 1.1rem; margin-top: .15rem; flex: none; accent-color: #a8682f; }
.consenso-voce small { display: block; color: #6b5a4a; font-size: .8rem; }
.consenso-pulsanti { display: flex; flex-wrap: wrap; gap: .5rem; }
.consenso-pulsanti .btn { flex: 1 1 auto; border: 1.5px solid #a8682f; cursor: pointer; font: 600 .88rem/1.2 Inter, system-ui, sans-serif; padding: .7rem 1rem; border-radius: 999px; background: #a8682f; color: #fff; }
.consenso-pulsanti .consenso-personalizza { background: transparent; color: #8a5222; }
.consenso-pulsanti .btn[hidden] { display: none; }
.consenso-pulsanti .btn:focus-visible, .consenso-x:focus-visible { outline: 3px solid #2b2118; outline-offset: 2px; }
@media (max-width: 560px) {
  .consenso { left: .6rem; right: .6rem; bottom: .6rem; width: auto; padding: 1.1rem 1rem 1rem; }
  .consenso-pulsanti .btn { flex: 1 1 40%; }
}
/* il banner sta sotto il menu del telefono (barra z 60) e sotto le foto ingrandite (z 200): non li copre mai */
.consenso { z-index: 55; }
/* 19/10: "Rifiuta" e "Accetta tutti" affiancati e larghi uguali; "Personalizza"/"Salva" sotto; titolo a misura di banner */
html body .consenso h2 { font-size: 1.3rem; line-height: 1.25; margin: 0 2.2rem .55rem 0; max-width: none; }
.consenso-pulsanti { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.consenso-pulsanti [data-consenso="rifiuta"] { order: 1; }
.consenso-pulsanti [data-consenso="accetta"] { order: 2; }
.consenso-pulsanti .consenso-personalizza, .consenso-pulsanti .consenso-salva { order: 3; grid-column: 1 / -1; }
.consenso-pulsanti .consenso-salva { background: transparent; color: #8a5222; }
@media (max-width: 560px) { .consenso-pulsanti .btn { flex: none; } }
/* 24/10/2026: pulsante WhatsApp in basso a destra; sotto il banner dei cookie (z 55) e sotto il menu del telefono (z 60) */
.wa-flot { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 50; width: 3.6rem; height: 3.6rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #25d366; color: #fff; box-shadow: 0 10px 26px -8px rgba(20,13,8,.55), 0 0 0 1px rgba(0,0,0,.06); transition: transform .2s ease, box-shadow .2s ease; }
.wa-flot:hover { transform: scale(1.06); box-shadow: 0 14px 30px -8px rgba(20,13,8,.6); }
.wa-flot:focus-visible { outline: 3px solid #2b2118; outline-offset: 3px; }
@media (max-width: 560px) { .wa-flot { right: .9rem; bottom: .9rem; width: 3.3rem; height: 3.3rem; } }
@media print { .wa-flot, .wa-chat { display: none; } }
/* 24/10/2026: finestrella stile chat sopra il pulsante (saluto + messaggio gia' scritto, modificabile) */
.wa-chat { position: fixed; right: 1.2rem; bottom: 5.6rem; z-index: 50; width: min(340px, calc(100vw - 1.8rem)); border-radius: 16px; overflow: hidden; background: #efeae2; box-shadow: 0 18px 50px -12px rgba(20,13,8,.5), 0 0 0 1px rgba(0,0,0,.06); font-family: Inter, system-ui, sans-serif; opacity: 0; transform: translateY(10px) scale(.98); transform-origin: bottom right; transition: opacity .18s ease, transform .18s ease; }
.wa-chat.on { opacity: 1; transform: none; }
.wa-chat[hidden] { display: none; }
.wa-chat-testa { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; background: #075e54; color: #fff; }
.wa-chat-testa img { width: 40px; height: 40px; border-radius: 50%; background: #fbf7f1; object-fit: contain; padding: 4px; flex: none; }
.wa-chat-testa strong { display: block; font-size: 1rem; line-height: 1.2; }
.wa-chat-testa span { font-size: .8rem; opacity: .85; }
.wa-chat-x { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: .1rem .4rem; opacity: .85; }
.wa-chat-x:hover { opacity: 1; }
.wa-chat-corpo { padding: 1rem .9rem .6rem; display: flex; flex-direction: column; gap: .6rem; }
.wa-bolla { max-width: 88%; padding: .55rem .75rem; border-radius: 10px; font-size: .92rem; line-height: 1.45; color: #111b21; box-shadow: 0 1px .5px rgba(0,0,0,.13); }
.wa-loro { align-self: flex-start; background: #fff; border-top-left-radius: 2px; }
.wa-mia { align-self: flex-end; width: 88%; background: #d9fdd3; border-top-right-radius: 2px; cursor: text; }
.wa-mia textarea { display: block; width: 100%; border: 0; background: transparent; font: inherit; color: inherit; resize: none; padding: 0; margin: 0; outline: none; }
.wa-mia:focus-within { box-shadow: 0 0 0 2px #25d366; }
.wa-chat-piede { padding: .4rem .9rem .9rem; }
.wa-chat-invia { width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem; border: 0; border-radius: 999px; background: #0d7a40; color: #fff; font: 600 .95rem/1.2 Inter, system-ui, sans-serif; padding: .8rem 1rem; cursor: pointer; }
.wa-chat-invia:hover { background: #0a6634; }
.wa-chat-invia:focus-visible, .wa-chat-x:focus-visible { outline: 3px solid #2b2118; outline-offset: 2px; }
.wa-nascosto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 560px) {
  .wa-chat { right: .9rem; bottom: 4.9rem; }
  .wa-mia textarea { font-size: 16px; } /* sotto i 16px l'iPhone ingrandisce la pagina quando si scrive */
}
