/* ==========================================================================
   Versione mobile del sito I Briganti (design Claude Design)
   Attiva SOLO sotto i 768px: il desktop resta identico al design.
   Gli stili del design sono inline, quindi qui serve !important.
   ========================================================================== */

/* Il motore di Claude Design fissa body e contenitori all'altezza dello schermo:
   così l'header "sticky" del design smette di restare fisso dopo il primo schermo.
   Altezza automatica = header fisso come previsto dal design (vale per tutte le larghezze). */
body, #dc-root, #dc-root > div { height: auto !important; min-height: 100vh; }

/* elementi aggiunti solo per mobile: nascosti su desktop */
.bm-burger, .bm-menu, .bm-bar, .bm-masonry { display: none; }

@media (max-width: 767px) {
  section { scroll-margin-top: 84px; }
  html, body { touch-action: pan-x pan-y; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

  /* ---------- Header ---------- */
  #dc-root > div > div:first-child > div > div:first-child { display: none !important; }               /* barra blu in alto */
  #dc-root > div > div:first-child > div > div:nth-child(2) { padding: 14px 16px !important; }
  #dc-root > div > div:first-child > div > div:nth-child(2) > img { height: 52px !important; }
  #dc-root > div > div:first-child > div > div:nth-child(2) > div { gap: 0 !important; }
  #dc-root > div > div:first-child nav,
  #dc-root > div > div:first-child > div > div:nth-child(2) > div > a { display: none !important; }    /* menu e bottone: su mobile ci sono menu e barra in basso */
  .bm-burger { position: fixed; top: 17px; right: 10px; z-index: 55; display: inline-flex; flex-direction: column; justify-content: center; gap: 6px; width: 48px; height: 48px; padding: 0 10px; border: 0; background: transparent; cursor: pointer; }
  .bm-burger span { display: block; height: 2px; background: #0B2438; }

  /* ---------- Hero ---------- */
  #top > div > div:nth-child(2) { background: linear-gradient(180deg, rgba(11,36,56,.55) 0%, rgba(11,36,56,.82) 45%, rgba(11,36,56,.94) 100%) !important; }
  #top > div > div:nth-child(3) { gap: 18px !important; }
  /* headline mobile: una frase breve per riga (La tua vacanza / in Maremma / a due passi / dal mare, / col tuo / amico a 4 zampe) */
  #top h1 { font-size: min(40px, 10.6vw) !important; line-height: 1.1 !important; }   /* scala sui telefoni stretti: "amico a 4 zampe" sta sempre su una riga */
  #top h1 br { display: none; }
  #top h1 > span:not(:last-child) { display: block; }
  #top h1 > span:last-child { margin-top: 2px; }
  #top p { font-size: 16px !important; }
  #top > div > div:nth-child(3) > div { flex-wrap: wrap; gap: 12px !important; }
  #top > div > div:nth-child(3) > div > a:first-child { flex: 1 1 100%; text-align: center; }
  #top > div > div:nth-child(3) > div > div { margin-left: 0 !important; }

  /* ---------- 800 metri + servizi ---------- */
  #servizi > div:first-child { grid-template-columns: 1fr !important; gap: 72px !important; padding: 48px 20px 56px !important; }
  #servizi > div:first-child > div:first-child img:first-child { aspect-ratio: 4 / 3 !important; }
  #servizi > div:first-child > div:first-child > div { right: 16px !important; bottom: -44px !important; width: 190px !important; padding: 20px 16px 18px !important; gap: 8px !important; }
  #servizi > div:first-child > div:first-child > div > span:nth-child(2) { font-size: 54px !important; }
  #servizi > div:first-child > div:first-child > div > span:nth-child(2) small { font-size: 22px !important; }
  #servizi > div:first-child > div:first-child > div > span:nth-child(3) { font-size: 13px !important; }
  #servizi h2 { font-size: 28px !important; }
  #servizi > div:first-child > div:nth-child(2) > div { grid-template-columns: 1fr !important; gap: 14px !important; }
  #servizi > div:first-child > div:nth-child(2) > div > div { font-size: 16px !important; gap: 12px !important; }
  #servizi > div:first-child > div:nth-child(2) > div > div > span:first-child { width: 22px !important; height: 22px !important; font-size: 13px !important; }
  #servizi > div:nth-child(2) { padding: 48px 20px !important; gap: 28px !important; }
  #servizi > div:nth-child(2) p { font-size: 26px !important; }
  #servizi > div:nth-child(2) > div:nth-child(2) { grid-template-columns: repeat(2, 1fr) !important; }
  #servizi > div:nth-child(2) > div:nth-child(2) > div { padding: 16px 14px !important; gap: 10px !important; }
  #servizi > div:nth-child(2) > div:nth-child(2) > div span { font-size: 14px !important; }

  /* ---------- Famiglia ---------- */
  #famiglia > div { grid-template-columns: 1fr !important; }
  #famiglia > div > div:first-child { padding: 48px 20px !important; }
  #famiglia h2 { font-size: 28px !important; }
  #famiglia > div > div:nth-child(2) { min-height: 380px !important; }

  /* ---------- Galleria: masonry a 3 colonne chiusa in basso (costruita da mobile.js) ---------- */
  #foto > div:not(.bm-masonry) { display: none !important; }
  #foto .bm-masonry { display: flex; gap: 3px; padding: 24px 8px; }
  #foto .bm-masonry-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
  #foto .bm-masonry-col > img { display: block; width: 100%; min-height: 0; height: 0; object-fit: cover; }

  /* ---------- Camere ---------- */
  #camere > div { padding: 48px 20px !important; gap: 28px !important; }
  #camere > div > div:first-child { grid-template-columns: 1fr !important; gap: 14px !important; }
  #camere h2 { font-size: 28px !important; }
  #camere > div > div:nth-child(2) { grid-template-columns: 1fr !important; gap: 16px !important; }
  #camere > div > div:nth-child(2) > div > div { padding: 22px 20px !important; }
  #camere > div > div:nth-child(2) strong { font-size: 24px !important; }

  /* ---------- 8,5 km di spiaggia ---------- */
  #spiaggia > div { height: auto !important; min-height: 420px; }
  #spiaggia > div > div:nth-child(3) { position: relative !important; min-height: 420px; padding: 48px 20px !important; align-content: center !important; }
  #spiaggia h2 { font-size: 36px !important; }
  #spiaggia h2 > span:first-child { display: block; }                     /* "8,5 Km" su una riga, sotto "di spiaggia libera" */
  #spiaggia p { font-size: 20px !important; }

  /* ---------- Recensioni ---------- */
  #recensioni > div { padding: 48px 20px !important; gap: 28px !important; }
  #recensioni > div > div:first-child > span:first-child { font-size: 100px !important; height: 44px !important; }
  #recensioni h2 { font-size: 28px !important; }
  #recensioni > div > div:nth-child(2) { grid-template-columns: 1fr !important; gap: 14px !important; }
  #recensioni > div > div:nth-child(2) > div { padding: 24px 20px !important; }

  /* ---------- Prenota dal sito ---------- */
  #prenota > div { height: auto !important; min-height: 460px; }
  #prenota > div > div:nth-child(2) { background: linear-gradient(180deg, rgba(140,58,34,.72) 0%, rgba(140,58,34,.93) 45%, rgba(140,58,34,.97) 100%) !important; }
  #prenota > div > div:nth-child(3) { padding: 56px 20px !important; gap: 22px !important; min-height: 460px; }
  #prenota h2 { font-size: 28px !important; }
  #prenota > div > div:nth-child(3) > div span:last-child { font-size: 16px !important; }
  #prenota > div > div:nth-child(3) > div:last-child a { display: flex !important; justify-content: center; padding: 18px 20px !important; }

  /* ---------- FAQ ---------- */
  #faq > div { padding: 48px 16px !important; gap: 28px !important; }
  #faq h2 { font-size: 28px !important; }
  #faq > div > div:nth-child(2) { grid-template-columns: 1fr !important; }
  #faq > div > div:nth-child(2) > div > div { padding: 0 16px !important; }
  #faq button { gap: 12px !important; padding: 16px 0 !important; }
  #faq button > span:first-child { font-size: 22px !important; width: 30px !important; }
  #faq button > span:nth-child(2) { font-size: 15px !important; }
  #faq > div > div:nth-child(2) p { margin: 0 0 16px 42px !important; font-size: 14px !important; }
  #faq > div > div:nth-child(3) { flex-direction: column !important; align-items: stretch !important; padding: 22px 20px !important; gap: 16px !important; }
  #faq > div > div:nth-child(3) > a { justify-content: center; }
  #faq > div > div:nth-child(3) > div:first-child { gap: 16px !important; }
  #faq > div > div:nth-child(3) > div:first-child > span:first-child { font-size: 36px !important; }

  /* ---------- Contatti ---------- */
  #contatti > div { grid-template-columns: 1fr !important; padding: 48px 20px !important; gap: 28px !important; }
  #contatti h2 { font-size: 28px !important; }
  #contatti > div > div:first-child > div:nth-of-type(2) { grid-template-columns: 1fr 1fr !important; }
  #contatti label:has(input[placeholder="Email"]), #contatti label:has(input[placeholder="Telefono"]), #contatti label:has(.iti) { grid-column: 1 / -1; }   /* email e telefono su una riga intera */
  #contatti fieldset { grid-column: auto !important; }                      /* Nr. ospiti e cane sulla stessa riga */
  #contatti fieldset > div { gap: 8px !important; }
  #contatti fieldset legend { white-space: nowrap; }
  #contatti input, #contatti textarea { font-size: 16px !important; }
  #contatti > div > div:nth-child(2) > div { min-height: 360px !important; }

  /* ---------- Footer ---------- */
  footer > svg { height: 80px !important; }
  footer > div:nth-child(2) { padding: 32px 20px 32px !important; gap: 28px !important; }
  footer > div:nth-child(2) > div:first-child { flex-direction: column !important; align-items: flex-start !important; margin: 0 !important; padding: 0 !important; gap: 20px !important; }
  footer > div:nth-child(2) > div:first-child > div { flex-direction: column !important; align-items: flex-start !important; gap: 16px !important; }
  footer > div:nth-child(2) > div:first-child > div > img { width: 170px !important; }
  footer > div:nth-child(2) > div:first-child > div > span { display: none !important; }
  footer > div:nth-child(2) > div:first-child > div > p { font-size: 4.6vw !important; white-space: nowrap; }
  footer > div:nth-child(2) > div:first-child > a { align-self: stretch; text-align: center; }
  footer > div:nth-child(2) > div:nth-child(2) > div { padding: 24px 0 !important; border-right: 0 !important; border-bottom: 1px solid rgba(255,255,255,.12); }
  footer > div:nth-child(2) > div:nth-child(2) > div:last-child { border-bottom: 0; justify-content: center !important; }
  footer > div:nth-child(2) > div:nth-child(2) > div:last-child img:first-child { height: 130px !important; }
  footer > div:nth-child(2) > div:nth-child(2) > div:last-child img:last-child { height: 120px !important; }
  footer > div:nth-child(2) > p { font-size: 12px !important; }
  footer > div:nth-child(3) { flex-direction: column; align-items: center; text-align: center; padding: 20px 20px 100px !important; }

  /* ---------- Barra fissa in basso ---------- */
  .bm-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; background: #0B2438; }
  .bm-bar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 62px;
    padding: 8px 6px; font-size: 12.5px; font-weight: 600; line-height: 1.15; text-align: center; }
  .bm-bar a svg { width: 22px; height: 22px; }
  .bm-bar .bm-book { background: #E0AB67; color: #0B2438; }
  .bm-bar .bm-wa { background: #128C7E; color: #fff; }
  .bm-bar .bm-call { background: linear-gradient(13deg, #003948 30%, #197D85 100%); color: #fff; }

  /* ---------- Menu a schermo intero ---------- */
  .bm-menu { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: #fff; overflow-y: auto; opacity: 0; transition: opacity 220ms ease-out; }
  .bm-menu[hidden] { display: none; }
  .bm-menu.is-open { opacity: 1; }
  .bm-menu-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #ECE6DC; }
  .bm-menu-top img { height: 52px; }
  .bm-close { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: #F3EDE3; color: #0B2438; cursor: pointer; }
  .bm-menu ul { list-style: none; margin: 0; padding: 4px 20px; }
  .bm-menu li a { display: flex; align-items: center; gap: 14px; min-height: 62px; border-bottom: 1px solid #F0EBE3; color: #0B2438; font-size: 18px; font-weight: 600; }
  .bm-menu li a span.bm-ico { width: 40px; height: 40px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: #FAF7F2; color: #9A6A26; }
  .bm-menu li a span.bm-label { flex: 1; }
  .bm-menu li a svg.bm-arrow { color: #B8C2CB; }
  .bm-menu-bottom { margin-top: auto; padding: 20px; background: linear-gradient(13deg, #003948 47%, #197D85 100%); }
  .bm-menu-cta { display: flex; align-items: center; justify-content: center; min-height: 54px; background: #E0AB67; color: #0B2438 !important; font-size: 17px; font-weight: 700; }
  .bm-menu-quick { margin-top: 10px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .bm-menu-quick a svg { width: 20px; height: 20px; flex: none; }
  .bm-menu-quick a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 1px solid rgba(255,255,255,.35); color: #fff !important; font-size: 14px; font-weight: 600; }
  html.bm-lock, html.bm-lock body { overflow: hidden !important; }
  html.bm-lock .bm-bar { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bm-menu { transition: none; } }

/* ---------- Lightbox galleria (tutte le larghezze) ---------- */
#foto img { cursor: zoom-in; }
.bm-lb { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: rgba(11,36,56,.96);
  opacity: 0; transition: opacity 200ms ease-out; touch-action: pan-y; }
.bm-lb[hidden] { display: none; }
.bm-lb.is-open { opacity: 1; }
.bm-lb img { max-width: calc(100vw - 160px); max-height: calc(100vh - 120px); object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.bm-lb button { position: absolute; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border: 0; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.bm-lb button:hover { background: #E0AB67; color: #0B2438; }
.bm-lb button:focus-visible { outline: 2px solid #E0AB67; outline-offset: 2px; }
.bm-lb-close { top: 16px; right: 16px; }
.bm-lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.bm-lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.bm-lb-count { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); color: rgba(255,255,255,.8); font-size: 14px; font-weight: 500; letter-spacing: .08em; }
html.bm-lb-lock, html.bm-lb-lock body { overflow: hidden !important; }
@media (max-width: 767px) {
  .bm-lb img { max-width: 100vw; max-height: calc(100vh - 160px); }
  .bm-lb-prev, .bm-lb-next { top: auto; bottom: calc(12px + env(safe-area-inset-bottom)); transform: none; }
  .bm-lb-count { bottom: calc(28px + env(safe-area-inset-bottom)); }
  html.bm-lb-lock .bm-bar, html.bm-lb-lock .bm-burger { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bm-lb { transition: none; } }

/* ---------- Desktop: contenuti in un box di 1400px (gli sfondi restano a tutta larghezza) ---------- */
@media (min-width: 768px) {
  #dc-root > div > div:first-child > div > div:first-child { padding-left: calc(40px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(40px + max(0px, (100% - 1400px) / 2)) !important; }
  #dc-root > div > div:first-child > div > div:nth-child(2) { padding-left: calc(40px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(40px + max(0px, (100% - 1400px) / 2)) !important; }
  #top > div > div:nth-child(3) { padding-left: calc(72px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(56px + max(0px, (100% - 1400px) / 2)) !important; }
  #servizi > div:first-child { padding-left: calc(72px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(72px + max(0px, (100% - 1400px) / 2)) !important; }
  #servizi > div:nth-child(2) { padding-left: calc(72px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(72px + max(0px, (100% - 1400px) / 2)) !important; }
  /* famiglia: foto di Luca a tutta larghezza fino al bordo destro, testo allineato al box */
  #famiglia > div > div:first-child { padding-left: calc(64px + max(0px, (100vw - 1400px) / 2)) !important; }
  #foto > div:not(.bm-masonry) { padding-left: calc(48px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(48px + max(0px, (100% - 1400px) / 2)) !important; }
  #camere > div { padding-left: calc(56px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(56px + max(0px, (100% - 1400px) / 2)) !important; }
  #spiaggia > div > div:nth-child(3) { padding-left: calc(clamp(24px, 6vw, 80px) + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(clamp(24px, 6vw, 80px) + max(0px, (100% - 1400px) / 2)) !important; }
  #recensioni > div { padding-left: calc(56px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(56px + max(0px, (100% - 1400px) / 2)) !important; }
  #prenota > div > div:nth-child(3) { padding-left: calc(72px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(72px + max(0px, (100% - 1400px) / 2)) !important; }
  #faq > div { padding-left: calc(64px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(64px + max(0px, (100% - 1400px) / 2)) !important; }
  #contatti > div { padding-left: calc(64px + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(64px + max(0px, (100% - 1400px) / 2)) !important; }
  footer > div:nth-child(2) { padding-left: calc(clamp(24px, 5vw, 64px) + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(clamp(24px, 5vw, 64px) + max(0px, (100% - 1400px) / 2)) !important; }
  footer > div:nth-child(3) { padding-left: calc(clamp(24px, 5vw, 64px) + max(0px, (100% - 1400px) / 2)) !important; padding-right: calc(clamp(24px, 5vw, 64px) + max(0px, (100% - 1400px) / 2)) !important; }
  /* foto della sezione dopo l'hero: un po' più bassa (era 4:5) */
  #servizi > div:first-child > div:first-child > img:first-child { aspect-ratio: 1 / 1 !important; }
}

/* ---------- Hero: più alta, testo centrato; separatore = un'unica curva bianca, ampia e piena ---------- */
#top > div { height: 800px !important; }
#top > div > div:nth-child(3) { justify-content: center !important; padding-top: 72px !important; padding-bottom: 80px !important; }
#top > div::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 80px; pointer-events: none;
  background: url("data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%201440%20100%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M0%2C72%20C420%2C8%201020%2C8%201440%2C60%20L1440%2C100%20L0%2C100%20Z%22%20fill%3D%22%23fff%22/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%; }

/* ---------- "Qui non sei un cliente": sfondo blu notte, a contrasto con dotazioni (crema) e galleria (bianco) ---------- */
#famiglia > div { background: #0B2438 !important; }
#famiglia > div > div:first-child > span:first-child { color: #E0AB67 !important; }
#famiglia h2 { color: #FFFFFF !important; }
#famiglia h2 span { color: #7CC4CA !important; }
#famiglia > div > div:first-child p { color: rgba(255,255,255,.78) !important; }
#famiglia > div > div:first-child p strong { color: #FFFFFF !important; }
#famiglia > div > div:first-child p:last-child,
#famiglia > div > div:first-child p:last-child strong { color: #E0AB67 !important; }

@media (max-width: 767px) {
  #top > div { height: auto !important; min-height: 680px; }
  #top > div > div:nth-child(3) { min-height: 680px; padding: 80px 20px 84px !important; }   /* più aria sopra l'occhiello */
  #top > div::after { height: 40px; }
}

/* bottoncino dei cookie di iubenda (arriva con Google Tag Manager): su mobile sopra la barra in basso */
@media (max-width: 767px) {
  html body .iubenda-tp-btn.iubenda-tp-btn.iubenda-tp-btn.iubenda-tp-btn[data-tp-float][data-tp-float][data-tp-float] { bottom: calc(25vh - 22px) !important; left: 0 !important; right: auto !important; margin: 0 !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }   /* a metà della metà inferiore dello schermo */
  html.bm-lock body .iubenda-tp-btn.iubenda-tp-btn.iubenda-tp-btn.iubenda-tp-btn[data-tp-float][data-tp-float][data-tp-float],
  html.bm-lb-lock body .iubenda-tp-btn.iubenda-tp-btn.iubenda-tp-btn.iubenda-tp-btn[data-tp-float][data-tp-float][data-tp-float] { display: none !important; }
}

/* ---------- Calendario check-in / check-out (flatpickr) nello stile del sito ---------- */
.flatpickr-calendar.bm-cal { font-family: "Sora", system-ui, sans-serif; border-radius: 0; border: 1px solid #ECE6DC; box-shadow: 0 18px 40px rgba(11,36,56,.14); }
.flatpickr-calendar.bm-cal::before, .flatpickr-calendar.bm-cal::after { display: none; }
.bm-cal .flatpickr-months { background: #0B2438; padding: 6px 0; }
.bm-cal .flatpickr-months .flatpickr-month { color: #fff; fill: #fff; height: 40px; }
.bm-cal .flatpickr-current-month { font-size: 15px; font-weight: 600; padding-top: 10px; }
.bm-cal .flatpickr-current-month span.cur-month { font-weight: 600; }
.bm-cal .flatpickr-current-month input.cur-year { font-weight: 400; color: rgba(255,255,255,.8); }
.bm-cal .flatpickr-months .flatpickr-prev-month, .bm-cal .flatpickr-months .flatpickr-next-month { color: #E0AB67; fill: #E0AB67; top: 6px; padding: 12px 14px; }
.bm-cal .flatpickr-months .flatpickr-prev-month:hover svg, .bm-cal .flatpickr-months .flatpickr-next-month:hover svg { fill: #fff; }
.bm-cal .flatpickr-weekdays { background: #FAF7F2; height: 34px; }
.bm-cal span.flatpickr-weekday { color: #9A6A26; font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: transparent; }
.bm-cal .flatpickr-days { border: 0; }
.bm-cal .flatpickr-day { color: #0B2438; border-radius: 0; font-weight: 500; }
.bm-cal .flatpickr-day:hover, .bm-cal .flatpickr-day:focus { background: #FAF7F2; border-color: #FAF7F2; }
.bm-cal .flatpickr-day.today { border-color: #E0AB67; }
.bm-cal .flatpickr-day.today:hover { background: #FAF7F2; color: #0B2438; }
.bm-cal .flatpickr-day.inRange, .bm-cal .flatpickr-day.inRange:hover { background: #E8F3F4; border-color: #E8F3F4; box-shadow: -5px 0 0 #E8F3F4, 5px 0 0 #E8F3F4; }
.bm-cal .flatpickr-day.selected, .bm-cal .flatpickr-day.startRange, .bm-cal .flatpickr-day.endRange,
.bm-cal .flatpickr-day.selected:hover, .bm-cal .flatpickr-day.startRange:hover, .bm-cal .flatpickr-day.endRange:hover { background: #197D85; border-color: #197D85; color: #fff; border-radius: 0; }
.bm-cal .flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)), .bm-cal .flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)), .bm-cal .flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) { box-shadow: -10px 0 0 #197D85; }
.bm-cal .flatpickr-day.flatpickr-disabled, .bm-cal .flatpickr-day.prevMonthDay, .bm-cal .flatpickr-day.nextMonthDay { color: rgba(11,36,56,.25); }
.bm-cal.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) { box-shadow: -2px 0 0 #E8F3F4, 5px 0 0 #E8F3F4; }
#contatti input[placeholder="gg/mm/aaaa"] { cursor: pointer; background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%239A6A26' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 14px center !important; }
#contatti input[placeholder="gg/mm/aaaa"].active { border-color: #197D85 !important; }

/* ---------- Telefono con prefisso e bandiera (intl-tel-input) ---------- */
#contatti .iti { width: 100%; display: block; --iti-border-color: #ECE6DC; --iti-hover-color: #FAF7F2; --iti-dialcode-color: #0B2438; --iti-arrow-color: #9A6A26; --iti-dropdown-bg: #fff; --iti-border-width: 1px; }
#contatti .iti input[type=tel] { width: 100%; }
#contatti .iti__selected-country { font-family: inherit; }
#contatti .iti__selected-country-primary { padding: 0 6px 0 14px; }
#contatti .iti__selected-dial-code { font-size: 15px; font-weight: 500; color: #0B2438; }
.iti__dropdown-content { border-radius: 0 !important; border: 1px solid #ECE6DC !important; box-shadow: 0 18px 40px rgba(11,36,56,.14) !important; font-family: "Sora", system-ui, sans-serif; }
.iti__search-input { font-family: inherit; font-size: 16px; height: 44px; padding: 0 12px 0 36px !important; border: 0 !important; border-bottom: 1px solid #ECE6DC !important; border-radius: 0 !important; outline: none; color: #0B2438; }
.iti__country { font-size: 14px; color: #0B2438; padding: 10px 12px; }
.iti__country.iti__highlight { background: #FAF7F2 !important; }
.iti__dial-code { color: #9A6A26 !important; }

@media (max-width: 767px) {
  /* recensioni: una frase per riga, righe bilanciate */
  #recensioni > div > div:first-child p br { display: none; }
  #recensioni > div > div:first-child p span { display: block; text-wrap: balance; }
  #recensioni > div > div:first-child p span + span { margin-top: 2px; }
  /* barra in basso: icone lineari coordinate */
  .bm-bar a { gap: 6px !important; letter-spacing: .01em; }
  .bm-bar a svg { width: 22px; height: 22px; flex: none; }
}
@media (max-width: 767px) {
  #recensioni > div > div:first-child > span:nth-child(2) { text-wrap: balance; }
}

/* ---------- Form contatti: errori e messaggi ---------- */
#contatti .bm-err { border-color: #C0392B !important; box-shadow: inset 0 0 0 1px #C0392B; }
#contatti .iti.bm-err input { border-color: #C0392B !important; box-shadow: inset 0 0 0 1px #C0392B; }
#contatti fieldset.bm-err legend, #contatti label.bm-err { color: #C0392B !important; }
#contatti fieldset.bm-err label { border-color: #C0392B !important; }
.bm-form-msg { display: none; margin: 4px 0 0; font-size: 14px; line-height: 1.55; color: #0B2438; }
.bm-form-msg.err { color: #B3261E; }
.bm-form-msg a { color: inherit; font-weight: 600; text-decoration: underline; }
#contatti button:disabled { opacity: .7; cursor: default; }

/* ---------- Popup offerta di ottobre (promo.js) ---------- */
html.bm-promo-lock, html.bm-promo-lock body { overflow: hidden !important; }
.promo { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(11,36,56,.78); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); opacity: 0; transition: opacity .22s ease-out; font-family: "Sora", system-ui, sans-serif; }
.promo.is-open { opacity: 1; }
.promo-card { position: relative; width: 100%; max-width: 980px; max-height: calc(100vh - 48px); overflow: auto; background: #fff; color: #0B2438;
  display: grid; grid-template-columns: 42% 1fr; transform: translateY(14px) scale(.98); transition: transform .26s cubic-bezier(.2,.8,.2,1); }
.promo.is-open .promo-card { transform: none; }
.promo-img { position: relative; min-height: 100%; background: #0B2438 url("/assets/img/og-home.jpg") center / cover no-repeat; }
.promo-badge { position: absolute; top: 20px; left: 20px; background: #E0AB67; color: #0B2438; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 8px 12px; }
.promo-body { padding: 48px 48px 36px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.promo-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #FAF7F2; color: #0B2438; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.promo-x:hover { background: #ECE6DC; }
.promo-eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: #9A6A26; }
.promo-body h2 { margin: 0; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.promo-sub { margin: 12px 0 0; font-size: 16px; color: #4A6074; }
.promo-prices { margin: 26px 0 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.promo-price { background: #FAF7F2; padding: 18px 12px 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.promo-price span { font-size: 14px; font-weight: 600; color: #4A6074; text-transform: uppercase; letter-spacing: .1em; }
.promo-price strong { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -.03em; color: #0B2438; }
.promo-price strong small { font-size: 22px; margin-left: 2px; }
.promo-price.is-best { background: #0B2438; }
.promo-price.is-best span { color: rgba(255,255,255,.8); }
.promo-price.is-best strong { color: #E0AB67; }
.promo-code-l { margin: 26px 0 10px; font-size: 14px; font-weight: 600; color: #0B2438; }
.promo-code { width: 100%; display: flex; align-items: stretch; justify-content: space-between; padding: 0; cursor: pointer; font-family: inherit;
  background: #FFF8EE; border: 2px dashed #E0AB67; color: #0B2438; transition: background .18s ease-out; }
.promo-code:hover { background: #FDF0DC; }
.promo-code-v { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px 12px; font-size: 26px; font-weight: 700; letter-spacing: .14em; }
.promo-code-b { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 20px; background: #0B2438; color: #fff; font-size: 14px; font-weight: 600; }
.promo-code.is-copied .promo-code-b { background: #197D85; }
.promo-live { margin: 6px 0 0; min-height: 18px; font-size: 13px; color: #197D85; font-weight: 600; }
.promo-cta { margin-top: 10px; width: 100%; display: flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 22px; background: #E0AB67; color: #0B2438; font-size: 16px; font-weight: 700; text-decoration: none; }
.promo-cta:hover { filter: brightness(1.05); }
.promo-no { margin-top: 12px; padding: 10px; border: 0; background: none; font-family: inherit; font-size: 14px; color: #4A6074; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.promo-x:focus-visible, .promo-code:focus-visible, .promo-cta:focus-visible, .promo-no:focus-visible { outline: 3px solid #197D85; outline-offset: 3px; }
@media (max-width: 767px) {
  .promo { padding: 12px; align-items: center; }
  .promo-card { grid-template-columns: 1fr; max-height: calc(100svh - 24px); }
  .promo-img { min-height: 150px; }
  .promo-badge { top: 14px; left: 14px; font-size: 12px; }
  .promo-body { padding: 26px 20px 18px; }
  .promo-body h2 { font-size: 24px; }
  .promo-sub { font-size: 15px; }
  .promo-prices { margin-top: 18px; gap: 10px; }
  .promo-price strong { font-size: 38px; }
  .promo-code-l { margin-top: 18px; }
  .promo-code-v { font-size: 22px; padding: 14px 8px; }
  .promo-code-b { padding: 0 14px; }
}
@media (max-height: 700px) and (max-width: 767px) { .promo-img { min-height: 96px; } }
@media (prefers-reduced-motion: reduce) { .promo, .promo-card { transition: none; } }
