/* ==== shared/theme.css ==== */
/* =============================================================================
   Regina Elena Home — design token (tema chiaro e scuro)
   -----------------------------------------------------------------------------
   I componenti usano SOLO questi token semantici, mai colori scritti a mano:
   così il cambio tema funziona ovunque, anche negli elementi creati via JS.
   Il tema attivo è in <html data-theme="light|dark">, impostato da
   shared/theme-init.js prima del primo rendering (nessun flash).
   Contrasti verificati WCAG AA (testo ≥ 4.5:1, bordi dei campi ≥ 3:1).
   ========================================================================== */

:root {
  color-scheme: light;

  /* Sfondi e superfici */
  --color-bg: #FBF8F3;              /* sfondo principale (bianco caldo) */
  --color-bg-alt: #F3ECE1;          /* sfondo secondario (sabbia) */
  --color-bg-alt-strong: #E9DECD;   /* sabbia scura: segnaposto immagini, tratteggi */
  --color-surface: #FFFFFF;         /* card, modali, pannelli */
  --color-chip-bg: rgba(251, 248, 243, .94); /* etichette sopra le foto */
  --color-header-solid: rgba(251, 248, 243, .97);

  /* Testi */
  --color-text: #142A3B;
  --color-text-muted: #44525F;
  --color-text-subtle: #5F6B76;
  --color-text-disabled: #8A8276;
  --color-text-faint: #B9B1A3;      /* giorni fuori mese nel calendario */
  --color-on-accent: #FFFFFF;       /* testo su pulsanti/elementi accento */
  --color-on-photo-ink: #142A3B;    /* testo scuro su pulsanti chiari sopra le foto (fisso) */

  /* Bordi */
  --color-border: #E3D8C7;
  --color-border-soft: #EEE6DA;

  /* Accento del brand (blu mediterraneo) */
  --color-accent: #1E4E78;
  --color-accent-hover: #163C5E;
  --color-accent-soft: #EAF0F5;     /* evidenziazioni leggere (intervallo date, icone) */
  --color-accent-ring: #D5E1EB;     /* alone del focus nei campi */
  --color-link: #1E4E78;
  --color-score: #0F2A42;           /* numeri di grande formato (punteggio) */
  --color-brand-deep: #0F2A42;      /* blu profondo: fondo dell'hero mentre carica */

  /* Salvia (accento secondario) */
  --color-sage: #7D9076;
  --color-sage-text: #4F6049;
  --color-sage-soft: #EEF2EB;

  /* Campi dei moduli */
  --color-input-bg: #FBF8F3;
  --color-input-bg-focus: #FFFFFF;
  --color-input-border: #988A75;

  /* Stati */
  --color-hover-bg: #F3ECE1;
  --color-selected-bg: #1E4E78;
  --color-selected-fg: #FFFFFF;
  --color-focus-ring: #1E4E78;
  --color-danger: #A63D2A;
  --color-danger-bg: #F8E9E5;
  --color-danger-border: #E7C9C1;
  --color-warn: #8A5A12;
  --color-warn-bg: #FBF1DF;
  --color-ok: #3D6A3A;
  --color-ok-bg: #E9F2E6;

  /* Overlay */
  --color-overlay: rgba(10, 24, 36, .4);
  --color-overlay-strong: rgba(10, 24, 36, .55);
  --color-map-grid: rgba(20, 42, 59, .05);

  /* Footer (blu notte in entrambi i temi) */
  --color-footer-bg: #0F2A42;
  --color-footer-text: #C8D4DE;
  --color-footer-heading: #FFFFFF;
  --color-footer-muted: #8FA6BA;
  --color-footer-line: rgba(255, 255, 255, .1);
  --color-footer-focus: #A9C3A1;

  /* Ombre */
  --shadow-1: 0 1px 2px rgba(20, 42, 59, .06), 0 1px 1px rgba(20, 42, 59, .04);
  --shadow-2: 0 12px 32px -12px rgba(20, 42, 59, .22);

  /* Filtro per i loghi monocromi scuri (corona, Booking.com) */
  --logo-filter: none;

  /* Tipografia, forme, movimento (uguali nei due temi) */
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --focus: 0 0 0 3px var(--color-bg), 0 0 0 5px var(--color-focus-ring);
}

/* Tema scuro: "notte sul mare". Non è un'inversione: le superfici restano calde e
   desaturate, il blu del brand si schiarisce solo dove serve leggibilità. */
:root[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: #0E161D;
  --color-bg-alt: #131E27;
  --color-bg-alt-strong: #22303C;
  --color-surface: #17222C;
  --color-chip-bg: rgba(14, 22, 29, .9);
  --color-header-solid: rgba(14, 22, 29, .96);

  --color-text: #ECE5D8;
  --color-text-muted: #BFB7AA;
  --color-text-subtle: #9C9589;
  --color-text-disabled: #7E786E;
  --color-text-faint: #56616B;
  --color-on-accent: #FFFFFF;

  --color-border: #2A3946;
  --color-border-soft: #1F2C37;

  --color-accent: #2E6A9C;
  --color-accent-hover: #3B7BB0;
  --color-accent-soft: #1A3043;
  --color-accent-ring: #2A4A66;
  --color-link: #93C0E6;
  --color-score: #B5D2EC;
  --color-brand-deep: #0A1520;

  --color-sage: #8FA487;
  --color-sage-text: #A9BF9F;
  --color-sage-soft: #1E2A20;

  --color-input-bg: #111B23;
  --color-input-bg-focus: #17222C;
  --color-input-border: #66788A;

  --color-hover-bg: #1D2A35;
  --color-selected-bg: #2E6A9C;
  --color-selected-fg: #FFFFFF;
  --color-focus-ring: #93C0E6;
  --color-danger: #F29B88;
  --color-danger-bg: #3A1F1A;
  --color-danger-border: #6B362C;
  --color-warn: #E8BC72;
  --color-warn-bg: #33280F;
  --color-ok: #A3CF9A;
  --color-ok-bg: #1B2D1B;

  --color-overlay: rgba(3, 8, 12, .6);
  --color-overlay-strong: rgba(3, 8, 12, .72);
  --color-map-grid: rgba(236, 229, 216, .05);

  --color-footer-bg: #091017;
  --color-footer-text: #BCC8D2;
  --color-footer-muted: #8D9FB0;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 16px 40px -12px rgba(0, 0, 0, .6);

  --logo-filter: brightness(0) invert(.92);
}

/* Transizione morbida SOLO durante il cambio tema (classe aggiunta da shared/theme.js) */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease, fill .3s ease, box-shadow .3s ease !important;
}
@media (prefers-reduced-motion: reduce) {
  html.theme-transition, html.theme-transition *, html.theme-transition *::before, html.theme-transition *::after { transition: none !important; }
}

/* ==== shared/base.css ==== */
/* =============================================================================
   Regina Elena Home — base condivisa (sito, privacy, pagine del server, admin)
   Font self-hosted, reset, primitive (pulsanti, focus, icone). Solo token di theme.css.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/fraunces-opsz.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/fraunces-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/manrope.woff2') format('woff2-variations');
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.icon { width: 1.15em; height: 1.15em; flex: none; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Elementi che funzionano solo con JavaScript: nascosti se JS non è attivo
   (theme-init.js aggiunge la classe "js" a <html>). Nessun pulsante "morto". */
html:not(.js) [data-requires-js] { display: none !important; }

/* Pulsanti */
.btn {
  --btn-bg: var(--color-accent); --btn-fg: var(--color-on-accent); --btn-bd: var(--color-accent);
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 46px; padding: .7em 1.35em;
  font-family: var(--sans); font-weight: 600; font-size: .95rem; letter-spacing: .01em; line-height: 1.2;
  color: var(--btn-fg); background: var(--btn-bg); border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm); text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.btn:hover { --btn-bg: var(--color-accent-hover); --btn-bd: var(--color-accent-hover); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--color-text); --btn-bd: var(--color-border); }
.btn-ghost:hover { --btn-bg: var(--color-hover-bg); --btn-bd: var(--color-bg-alt-strong); }
.btn-light { --btn-bg: #fff; --btn-fg: var(--color-on-photo-ink); --btn-bd: #fff; }
.btn-light:hover { --btn-bg: #F3ECE1; --btn-bd: #F3ECE1; }
.btn-danger { --btn-bg: var(--color-surface); --btn-fg: var(--color-danger); --btn-bd: var(--color-danger-border); }
.btn-danger:hover { --btn-bg: var(--color-danger); --btn-fg: var(--color-surface); --btn-bd: var(--color-danger); }
.btn-sm { min-height: 38px; padding: .5em 1em; font-size: .875rem; }
.btn .icon { width: 18px; height: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==== shared/layout.css ==== */
/* Componente: layout (sito pubblico) — contenitori, sezioni, titoli, dialog, link-button, noscript */
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { overflow-x: hidden; }
body.is-locked { overflow: hidden; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--color-text); color: var(--color-bg); padding: 10px 14px; border-radius: var(--r-sm); text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

.eyebrow { margin: 0 0 12px; font-size: .95rem; font-weight: 600; color: var(--color-sage-text); }
.eyebrow-light { color: rgba(255, 255, 255, .9); font-size: 1rem; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; letter-spacing: -.012em; margin: 0; color: var(--color-text); }
h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); line-height: 1.1; font-variation-settings: 'opsz' 96; }
p { margin: 0; }

.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-intro { max-width: 720px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-intro.split { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: end; }
.section-lead { margin-top: 18px; font-size: 1.08rem; line-height: 1.7; color: var(--color-text-muted); max-width: 62ch; }
.section-intro.split .section-lead { margin-top: 0; }
.section-lead strong { color: var(--color-text); font-weight: 650; }

/* Dialog e pulsanti icona condivisi (prenotazione, galleria) */
/* ---------- Dialog condivisi ---------- */
dialog { padding: 0; border: 0; color: var(--color-text); }
dialog::backdrop { background: var(--color-overlay-strong); }

.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; flex: none; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--color-text-muted); cursor: pointer; }
.icon-btn:hover { background: var(--color-hover-bg); color: var(--color-text); }
.icon-btn .icon { width: 22px; height: 22px; }

/* Pulsante testuale (es. "Cancella date") */
.link-btn { border: 0; background: none; padding: 8px 0; min-height: 36px; font-size: .85rem; font-weight: 700; color: var(--color-link); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn[hidden] { display: none; }

.noscript { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; margin: 0; padding: 12px 16px; background: var(--color-warn-bg); color: var(--color-warn); text-align: center; font-size: .9rem; }
@media (max-width: 960px) {
  .section-intro.split { grid-template-columns: 1fr; gap: 0; }
  .section-intro.split .section-lead { margin-top: 18px; }
}

/* ==== components/navbar/navbar.css ==== */
/* Componente: navbar — intestazione fissa, menu desktop e pannello mobile */
/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  color: #fff;
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header::before { /* velatura per leggibilità sopra la foto */
  content: ''; position: absolute; inset: 0 0 -40px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(10, 24, 36, .55), rgba(10, 24, 36, 0));
  transition: opacity .3s var(--ease);
}
.site-header.is-solid { background: var(--color-header-solid); color: var(--color-text); box-shadow: 0 1px 0 var(--color-border); }
.site-header.is-solid::before { opacity: 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1280px; margin: 0 auto; padding: 14px clamp(20px, 4vw, 40px); min-height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; flex: none; }
.brand img { width: 40px; height: auto; transition: filter .3s var(--ease); }
.site-header:not(.is-solid) .brand img { filter: brightness(0) invert(1); }
.brand-name { font-family: var(--serif); font-size: 1.25rem; line-height: 1; font-variation-settings: 'opsz' 48; white-space: nowrap; }
.brand-name span { font-family: var(--sans); font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; margin-left: 4px; opacity: .8; vertical-align: 2px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { position: relative; padding: 8px 0; font-size: .92rem; font-weight: 600; text-decoration: none; color: inherit; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.nav-links a:hover::after, .nav-links a[aria-current="true"]::after { transform: scaleX(1); }
.nav-extra { display: flex; align-items: center; gap: 16px; }

/* Selettore lingua dentro la navbar (colori legati allo stato dell'intestazione) */
.lang-switch button[aria-pressed="true"] span[aria-hidden] { color: var(--color-brand-deep); }
.site-header.is-solid .lang-switch button[aria-pressed="true"] span[aria-hidden] { color: var(--color-bg); }
.site-header:not(.is-solid) .nav-cta { --btn-bg: #fff; --btn-fg: var(--color-on-photo-ink); --btn-bd: #fff; }

.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: transparent; color: inherit; border-radius: var(--r-sm); cursor: pointer; place-items: center; }
.nav-toggle-bars { display: grid; gap: 5px; width: 22px; }
.nav-toggle-bars span { height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-overlay { position: fixed; inset: 0; z-index: 90; background: var(--color-overlay); }
.nav-overlay[hidden] { display: none; }

/* Tema scuro: la corona blu diventa chiara quando l'intestazione è piena */
[data-theme="dark"] .site-header.is-solid .brand img { filter: var(--logo-filter); }
@media (max-width: 1080px) {
  .site-nav { gap: 20px; }
  .nav-links { gap: 20px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: grid; z-index: 2; }
  .site-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1;
    width: min(340px, 86vw);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 88px 24px 28px;
    background: var(--color-bg); color: var(--color-text);
    box-shadow: var(--shadow-2);
    transform: translateX(100%); visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s linear .3s;
    overflow-y: auto;
  }
  .site-header.menu-open .site-nav { transform: none; visibility: visible; transition: transform .3s var(--ease), visibility 0s; }
  .site-header.menu-open { color: var(--color-text); }
  .site-header.menu-open .nav-toggle { color: var(--color-text); }
  .nav-links { flex-direction: column; gap: 0; }
  .nav-links a { display: block; padding: 16px 0; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; border-bottom: 1px solid var(--color-border); }
  .nav-links a::after { display: none; }
  .nav-extra { flex-direction: column; align-items: stretch; gap: 20px; margin-top: 28px; }
  .nav-extra .lang-switch, .nav-extra .theme-toggle { align-self: flex-start; }
  .nav-tools { align-self: flex-start; }
  .site-header .lang-switch button[aria-pressed="true"] span[aria-hidden] { color: var(--color-bg); }
  .site-header:not(.is-solid) .nav-cta { --btn-bg: var(--color-accent); --btn-fg: #fff; --btn-bd: var(--color-accent); }
  .nav-cta { min-height: 48px; }
}

/* Senza JavaScript il pannello mobile non si può aprire: i link restano visibili sotto l'intestazione */
@media (max-width: 860px) {
  html:not(.js) .site-header { position: relative; background: var(--color-header-solid); color: var(--color-text); }
  html:not(.js) .site-header::before { display: none; }
  html:not(.js) .site-header .brand img { filter: none; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .site-nav { position: static; transform: none; visibility: visible; width: 100%; padding: 0; box-shadow: none; background: none; }
  html:not(.js) .nav-links a { font-size: 1.1rem; padding: 10px 0; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 1.1rem; }
  .brand-name span { display: none; }
}

/* Strumenti: lingua + tema, affiancati */
.nav-tools { display: inline-flex; align-items: center; gap: 8px; }

/* ==== components/lang-switch/lang-switch.css ==== */
/* Componente: lang-switch — selettore lingua IT/EN */
.lang-switch { display: inline-flex; border: 1px solid currentColor; border-radius: var(--r-sm); padding: 2px; opacity: .9; }
.lang-switch button { min-width: 36px; min-height: 30px; border: 0; border-radius: 4px; background: transparent; color: inherit; font-size: .76rem; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: currentColor; }
/* Lingua attiva: "pillola" piena del colore del testo, etichetta del colore di sfondo (vale in entrambi i temi) */
.lang-switch button[aria-pressed="true"] span[aria-hidden] { color: var(--color-bg); }

/* ==== components/theme-toggle/theme-toggle.css ==== */
/* Componente: theme-toggle — pulsante sole/luna.
   Eredita il colore dal contesto (currentColor), come il selettore lingua accanto. */

.theme-toggle {
  position: relative;
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; padding: 0;
  border: 1px solid currentColor; border-radius: var(--r-sm);
  background: transparent; color: inherit; cursor: pointer;
  opacity: .9;
}
.theme-toggle:hover { opacity: 1; background: color-mix(in srgb, currentColor 12%, transparent); }
.theme-toggle-icon { grid-area: 1 / 1; width: 18px; height: 18px; transition: transform .35s var(--ease), opacity .25s var(--ease); }

/* Tema chiaro: luna (per passare allo scuro). Tema scuro: sole (per tornare al chiaro). */
.theme-toggle-sun { opacity: 0; transform: rotate(-60deg) scale(.6); }
[data-theme="dark"] .theme-toggle-moon { opacity: 0; transform: rotate(60deg) scale(.6); }
[data-theme="dark"] .theme-toggle-sun { opacity: 1; transform: none; }

/* Tooltip accessibile: visibile al passaggio del mouse e al focus da tastiera */
.theme-toggle-tip {
  position: absolute; top: calc(100% + 8px); left: 50%; z-index: 5;
  transform: translate(-50%, -4px);
  padding: 5px 9px; border-radius: var(--r-sm);
  background: var(--color-text); color: var(--color-bg);
  font-size: .75rem; font-weight: 600; letter-spacing: 0; white-space: nowrap;
  pointer-events: none; opacity: 0; visibility: hidden;
  transition: opacity .15s var(--ease), transform .15s var(--ease), visibility 0s linear .15s;
}
.theme-toggle:hover .theme-toggle-tip,
.theme-toggle:focus-visible .theme-toggle-tip {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
  transition: opacity .15s var(--ease), transform .15s var(--ease), visibility 0s;
}
.theme-toggle.tip-hidden .theme-toggle-tip { opacity: 0; visibility: hidden; }

/* ==== components/hero/hero.css ==== */
/* Componente: hero — foto a tutta pagina con titolo */
/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(92vh, 860px); min-height: min(92svh, 860px); display: flex; align-items: flex-end; color: #fff; overflow: hidden; background: var(--color-brand-deep); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10, 24, 36, .78) 0%, rgba(10, 24, 36, .35) 45%, rgba(10, 24, 36, .05) 75%); }
.hero-inner { position: relative; z-index: 1; padding-top: 140px; padding-bottom: clamp(48px, 8vw, 96px); }
.hero-title { color: #fff; font-size: clamp(2.7rem, 7vw, 5.4rem); line-height: 1.02; font-weight: 340; letter-spacing: -.02em; max-width: 12ch; font-variation-settings: 'opsz' 144; text-wrap: balance; }
.hero-lead { margin-top: 22px; max-width: 52ch; font-size: clamp(1.02rem, 1.4vw, 1.18rem); line-height: 1.65; color: rgba(255, 255, 255, .9); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 32px; }
.link-light { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 600; text-decoration: none; padding: 10px 2px; border-bottom: 1px solid rgba(255, 255, 255, .45); }
.link-light:hover { border-color: #fff; }
.link-light .icon { transition: transform .2s var(--ease); }
.link-light:hover .icon { transform: translateX(3px); }
@media (max-width: 640px) {
  .hero { min-height: 88svh; }
  .hero-inner { padding-top: 120px; }
  .hero-actions .btn { width: 100%; }
}

/* Senza JavaScript l'intestazione non è sovrapposta alla foto */
html:not(.js) .hero-inner { padding-top: 64px; }

/* ==== components/highlights/highlights.css ==== */
/* Componente: highlights — striscia "in breve" sotto l'hero */
/* ---------- Punti chiave ---------- */
.facts { background: var(--color-bg-alt); border-bottom: 1px solid var(--color-border); }
.facts-list { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts-list li { padding: 26px 24px 24px; border-left: 1px solid var(--color-border); }
.facts-list li:first-child { border-left: 0; padding-left: 0; }
.facts-list strong { display: block; font-family: var(--serif); font-weight: 450; font-size: 1.2rem; line-height: 1.25; }
.facts-list span { display: block; margin-top: 4px; font-size: .9rem; color: var(--color-text-muted); }
@media (max-width: 860px) {
  .facts-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts-list li { padding: 20px 16px; border-left: 0; border-top: 1px solid var(--color-border); }
  .facts-list li:nth-child(-n+2) { border-top: 0; }
  .facts-list li:nth-child(odd) { padding-left: 0; }
  .facts-list li:nth-child(even) { border-left: 1px solid var(--color-border); }
}

/* ==== components/area/area.css ==== */
/* Componente: area — il territorio e i luoghi vicini */
/* ---------- Territorio ---------- */
.places { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px); }
.place-a { grid-column: 1 / span 7; }
.place-b { grid-column: 8 / span 5; align-self: end; }
.place-c { grid-column: 1 / span 5; }
.place-d { grid-column: 6 / span 7; margin-top: clamp(0px, 6vw, 72px); }
.place figure { margin: 0; }
.place-media { overflow: hidden; border-radius: var(--r-md); background: var(--color-bg-alt-strong); aspect-ratio: 4 / 3; }
.place-b .place-media, .place-c .place-media { aspect-ratio: 5 / 4; }
.place-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.place:hover .place-media img { transform: scale(1.03); }
.place figcaption { padding-top: 16px; }
.place-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.place h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-variation-settings: 'opsz' 48; }
.distance { flex: none; font-size: .78rem; font-weight: 700; letter-spacing: .04em; color: var(--color-sage-text); white-space: nowrap; }
.place p { margin-top: 6px; color: var(--color-text-muted); max-width: 46ch; }
@media (max-width: 860px) {
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .place-a, .place-b, .place-c, .place-d { grid-column: auto; margin-top: 0; align-self: start; }
  .place-media, .place-b .place-media, .place-c .place-media { aspect-ratio: 4 / 3; }
}

@media (max-width: 640px) {
  .places { grid-template-columns: 1fr; gap: 36px; }
}

/* ==== components/rooms/rooms.css ==== */
/* Componente: rooms — alloggi: scelta, descrizioni, servizi, prezzo */
/* ---------- Alloggi ---------- */
.stays { background: var(--color-surface); border-top: 1px solid var(--color-border-soft); position: relative; }
.anchor-alias { position: absolute; top: 0; }

.stay-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); margin-bottom: clamp(56px, 8vw, 96px); }
.stay-picker a { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px 20px 0; text-decoration: none; border-left: 1px solid var(--color-border); padding-left: 24px; transition: background-color .2s var(--ease); }
.stay-picker a:first-child { border-left: 0; padding-left: 0; }
.stay-picker a:hover .picker-name { color: var(--color-accent); }
.picker-name { font-family: var(--serif); font-size: 1.2rem; transition: color .2s var(--ease); }
.picker-meta { font-size: .88rem; color: var(--color-text-subtle); }

.stay { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(64px, 9vw, 112px); margin-bottom: clamp(64px, 9vw, 112px); border-bottom: 1px solid var(--color-border-soft); scroll-margin-top: 90px; }
.stay:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.stay-reverse .gallery { order: 2; }

.gallery { position: sticky; top: 96px; }
.stay-portrait .gallery-main { aspect-ratio: 4 / 4.4; }
.stay-portrait .gallery-thumbs button { aspect-ratio: 16 / 9; }

.stay-info { padding-top: 6px; }
.stay-title { font-size: clamp(1.9rem, 3vw, 2.5rem); line-height: 1.1; font-variation-settings: 'opsz' 96; }
.stay-desc { margin-top: 16px; font-size: 1.05rem; line-height: 1.7; color: var(--color-text-muted); }

.spaces { margin: 28px 0 0; border-top: 1px solid var(--color-border); }
.spaces > div { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
.spaces dt { font-weight: 700; font-size: .95rem; }
.spaces dd { margin: 0; color: var(--color-text-muted); font-size: .95rem; }
.spaces-compact { display: flex; flex-wrap: wrap; border-top: 0; gap: 8px; }
.spaces-compact > div { display: block; padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 999px; }
.spaces-compact dt { font-weight: 600; font-size: .88rem; }

.amenities-title { margin-top: 30px; font-family: var(--sans); font-size: .95rem; font-weight: 700; letter-spacing: 0; color: var(--color-text); }
.amenities { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; }
.amenities li { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.amenities .icon { color: var(--color-sage-text); width: 20px; height: 20px; }

.stay-book { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding: 18px 20px; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--r-md); }
.price { color: var(--color-text-muted); font-size: .95rem; }
.price strong { font-family: var(--serif); font-weight: 450; font-size: 1.7rem; color: var(--color-text); margin: 0 2px; font-variant-numeric: lining-nums; }
.stay-note { margin-top: 12px; font-size: .86rem; color: var(--color-text-subtle); }
@media (max-width: 960px) {
  .stay { grid-template-columns: 1fr; }
  .stay-reverse .gallery { order: 0; }
  .gallery { position: static; }
}

@media (max-width: 860px) {
  .stay-picker { grid-template-columns: 1fr; }
  .stay-picker a, .stay-picker a:first-child { border-left: 0; padding: 16px 0; border-top: 1px solid var(--color-border); flex-direction: row; justify-content: space-between; align-items: baseline; gap: 12px; }
  .stay-picker a:first-child { border-top: 0; }
}

@media (max-width: 640px) {
  .spaces > div { grid-template-columns: 1fr; gap: 2px; }
  .amenities { grid-template-columns: 1fr 1fr; gap: 12px; font-size: .92rem; }
  .stay-book { flex-direction: column; align-items: stretch; text-align: left; }
  .stay-book .btn { width: 100%; }
  .stay-picker a { flex-direction: column !important; gap: 2px !important; }
}

@media (max-width: 380px) {
  .amenities { grid-template-columns: 1fr; }
}

/* ==== components/reviews/reviews.css ==== */
/* Componente: reviews — recensioni Booking.com */
/* ---------- Recensioni ---------- */
.reviews { background: var(--color-bg-alt); border-top: 1px solid var(--color-border); }
.reviews-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.reviews-summary { position: sticky; top: 108px; }
.score { display: flex; align-items: center; gap: 20px; margin-top: 32px; padding: 20px 0; border-top: 1px solid var(--color-bg-alt-strong); border-bottom: 1px solid var(--color-bg-alt-strong); }
.score p { margin: 0; }
.score-value { font-family: var(--serif); font-weight: 380; font-size: clamp(3.2rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -.02em; color: var(--color-score); font-variation-settings: 'opsz' 144; font-variant-numeric: lining-nums; }
.score-max { font-size: .4em; margin-left: 4px; color: var(--color-text-subtle); letter-spacing: 0; }
.score-word { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.score-source { margin-top: 6px !important; display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--color-text-muted); }
.booking-logo { height: 16px; width: auto; filter: var(--logo-filter); }
.reviews-link { margin-top: 28px; background: var(--color-surface); }
.reviews-link .icon { width: 16px; height: 16px; }

.review-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.review { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--r-md); }
.review figure { margin: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; padding: clamp(22px, 3vw, 30px); }
.review blockquote { margin: 0; }
.review blockquote p { font-family: var(--serif); font-size: 1.16rem; line-height: 1.5; color: var(--color-text); font-variation-settings: 'opsz' 24; }
.review-featured { grid-column: 1 / -1; }
.review-featured blockquote p { font-size: clamp(1.35rem, 2.2vw, 1.65rem); line-height: 1.42; font-variation-settings: 'opsz' 48; max-width: 34ch; }
.review figcaption { display: flex; flex-direction: column; gap: 2px; padding-top: 14px; border-top: 1px solid var(--color-border-soft); font-size: .9rem; }
.review figcaption strong { font-weight: 700; color: var(--color-text); }
.review figcaption span { color: var(--color-text-subtle); }
@media (max-width: 960px) {
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-summary { position: static; }
}

@media (max-width: 640px) {
  .review-list { grid-template-columns: 1fr; }
  .score { gap: 16px; }
}

/* ==== components/contacts/contacts.css ==== */
/* Componente: contacts — contatti e dati del titolare */
/* ---------- Contatti ---------- */
.contact { background: var(--color-bg); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(36px, 6vw, 88px); align-items: stretch; }
.contact-list { list-style: none; margin: 36px 0 0; padding: 0; display: grid; gap: 4px; }
.contact-list > li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--color-border); }
.contact-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--color-accent-soft); color: var(--color-link); }
.contact-icon .icon { width: 20px; height: 20px; }
.contact-label { font-size: .88rem; font-weight: 600; color: var(--color-text-subtle); margin-bottom: 2px; }
.contact-values { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.contact-values a { color: var(--color-text); font-weight: 600; font-size: 1.02rem; text-decoration: none; padding: 4px 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.contact-values a:hover { color: var(--color-link); border-color: var(--color-link); }
.contact address { font-style: normal; font-size: 1.02rem; margin-bottom: 6px; }
.owner-data { margin: 4px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: .95rem; }
.owner-data div { display: contents; }
.owner-data dt { color: var(--color-text-subtle); }
.owner-data dd { margin: 0; font-weight: 600; color: var(--color-text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.owner-note { margin-top: 10px !important; font-size: .88rem; }
.owner-note a { color: var(--color-link); font-weight: 600; }
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ==== components/maps/maps.css ==== */
/* Componente: maps — mappa Google caricata su richiesta */
.map { position: relative; min-height: 420px; border-radius: var(--r-md); overflow: hidden; background: var(--color-bg-alt); border: 1px solid var(--color-border); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: clamp(24px, 4vw, 40px);
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--color-map-grid) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--color-map-grid) 39px 40px),
    var(--color-bg-alt);
}
.map-pin { width: 44px; height: 44px; padding: 10px; margin-bottom: auto; border-radius: 50%; background: var(--color-surface); color: var(--color-link); box-shadow: var(--shadow-1); }
.map-title { font-family: var(--serif); font-size: 1.5rem; }
.map-text { margin-top: 8px; max-width: 46ch; font-size: .92rem; color: var(--color-text-muted); }
.map-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.map-actions .btn-ghost { background: var(--color-chip-bg); }
@media (max-width: 960px) {
  .map { min-height: 360px; }
}

/* ==== components/footer/footer.css ==== */
/* Componente: footer — piè di pagina */
/* ---------- Footer ---------- */
.site-footer { background: var(--color-footer-bg); color: var(--color-footer-text); padding: clamp(56px, 7vw, 80px) 0 28px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 36px; }
.footer-brand img { width: 150px; height: auto; opacity: .95; }
.footer-title { font-size: .9rem; font-weight: 700; color: var(--color-footer-heading); margin-bottom: 10px; }
.site-footer address { font-style: normal; line-height: 1.7; }
.site-footer a { color: var(--color-footer-heading); text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { border-color: currentColor; }
.site-footer p { line-height: 1.8; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--color-footer-line); font-size: .82rem; color: var(--color-footer-muted); }
.footer-bottom p { line-height: 1.7; }
.site-footer :focus-visible { box-shadow: 0 0 0 2px var(--color-footer-focus); }
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand img { width: 120px; }
}

/* ==== components/cookie-notice/cookie-notice.css ==== */
/* Componente: cookie-notice — banner informativo (nessun consenso: solo strumenti tecnici) */
/* ---------- Informativa (banner) ---------- */
.notice-bar {
  position: fixed; left: 16px; bottom: 16px; z-index: 80;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: 380px; padding: 12px 10px 12px 16px;
  background: var(--color-surface); color: var(--color-text-muted);
  border: 1px solid var(--color-border); border-radius: var(--r-md); box-shadow: var(--shadow-2);
  font-size: .84rem; line-height: 1.5;
  animation: notice-in .35s var(--ease) both;
}
.notice-bar[hidden] { display: none; }
.notice-bar a { color: var(--color-link); font-weight: 700; }
.notice-close { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -4px 0 0; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--color-text-subtle); cursor: pointer; }
.notice-close:hover { background: var(--color-hover-bg); color: var(--color-text); }
.notice-close .icon { width: 18px; height: 18px; }
@keyframes notice-in { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 640px) {
  .notice-bar { left: 10px; right: 10px; bottom: 10px; max-width: none; }
}

/* ==== components/booking/booking.css ==== */
/* Componente: booking — modale di prenotazione: passaggi, campi, riepilogo, invio */
/* ---------- Prenotazione ---------- */
.booking { width: min(760px, calc(100vw - 32px)); max-height: min(92vh, 860px); max-height: min(92dvh, 860px); border-radius: var(--r-lg); background: var(--color-surface); box-shadow: var(--shadow-2); overflow: hidden; }
.booking[open] { display: flex; animation: dialog-in .25s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } }
.booking-form { display: flex; flex-direction: column; width: 100%; min-height: 0; }

.booking-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 0; }
.booking-head .eyebrow { margin-bottom: 4px; font-size: .9rem; }
.booking-head h2 { font-size: 1.6rem; line-height: 1.15; font-variation-settings: 'opsz' 72; }

.stepper { list-style: none; display: flex; gap: 6px; margin: 18px 24px 0; padding: 0 0 16px; border-bottom: 1px solid var(--color-border); counter-reset: s; }
.stepper li { flex: 1; display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 600; color: var(--color-text-subtle); min-width: 0; }
.stepper li span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stepper li::after { content: ''; flex: 1; height: 1px; background: var(--color-border); min-width: 8px; }
.stepper li:last-child::after { display: none; }
.step-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--color-border); font-size: .76rem; font-weight: 700; background: var(--color-surface); }
.stepper li[aria-current="step"] { color: var(--color-text); }
.stepper li[aria-current="step"] .step-n { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.stepper li.is-done { color: var(--color-text-muted); }
.stepper li.is-done .step-n { background: var(--color-sage-soft); border-color: var(--color-sage); color: var(--color-sage-text); }

.booking-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 24px 24px; overscroll-behavior: contain; }
.step[hidden] { display: none !important; }
.step[data-step="1"] { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 18px 24px; align-items: start; }
.step[data-step="1"] .avail { grid-column: 1 / -1; }
.step-title { font-size: 1.3rem; font-variation-settings: 'opsz' 48; }
.step-intro { margin-top: 6px; color: var(--color-text-muted); font-size: .94rem; }

.avail:empty { display: none; }
.avail { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--color-bg-alt); color: var(--color-text-muted); font-size: .86rem; }
.avail.is-error { background: var(--color-warn-bg); color: var(--color-warn); }
.avail button { border: 0; background: none; padding: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.avail .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field-label, .field label { display: block; font-size: .8rem; font-weight: 700; color: var(--color-text-muted); margin-bottom: 8px; }
.selection { margin: 0; display: grid; gap: 0; border: 1px solid var(--color-border); border-radius: var(--r-md); }
.selection > div { display: flex; justify-content: space-between; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--color-border-soft); }
.selection > div:first-child { border-top: 0; }
.selection dt { font-size: .82rem; color: var(--color-text-subtle); font-weight: 600; }
.selection dd { margin: 0; font-weight: 700; font-size: .9rem; text-align: right; font-variant-numeric: tabular-nums; }
.step1-side .field { margin-top: 16px; }

.field select, .field input[type="text"], .field input[type="email"], .field input[type="tel"] {
  width: 100%; min-height: 48px; padding: 10px 12px; font-size: 1rem;
  border: 1px solid var(--color-input-border); border-radius: var(--r-sm); background: var(--color-input-bg); color: var(--color-text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field select:focus, .field input:focus { outline: none; border-color: var(--color-accent); box-shadow: 0 0 0 3px var(--color-accent-ring); background: var(--color-input-bg-focus); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: var(--color-danger); }
.field-error { margin-top: 6px; font-size: .84rem; font-weight: 600; color: var(--color-danger); }
.field-error[hidden] { display: none; }
.field-hint { margin-top: 6px; font-size: .8rem; color: var(--color-text-subtle); }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 16px; margin-top: 20px; }
.field-wide { grid-column: 1 / -1; }
.check-field { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 14px; background: var(--color-input-bg); border: 1px solid var(--color-border); border-radius: var(--r-sm); }
.check-field input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--color-accent); cursor: pointer; }
.check-field label { margin: 0; font-size: .88rem; font-weight: 500; color: var(--color-text-muted); cursor: pointer; }
.check-field label a { color: var(--color-link); font-weight: 700; }
.check-field .field-error { grid-column: 2; margin-top: 0; }

.summary { margin: 18px 0 0; border: 1px solid var(--color-border); border-radius: var(--r-md); }
.summary > div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--color-border-soft); }
.summary > div:first-child { border-top: 0; }
.summary dt { font-size: .84rem; color: var(--color-text-subtle); font-weight: 600; }
.summary dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary .sum-total dd { font-family: var(--serif); font-size: 1.35rem; font-weight: 450; }
.assurances { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.assurances li { display: flex; gap: 10px; font-size: .9rem; color: var(--color-text-muted); }
.assurances .icon { color: var(--color-sage-text); margin-top: 2px; }
.form-alert { margin-top: 16px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--color-danger-bg); color: var(--color-danger); font-size: .9rem; font-weight: 600; }
.form-alert[hidden] { display: none; }

.step-done { text-align: center; padding: 24px 8px 8px; outline: none; }
.done-mark { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--color-ok-bg); color: var(--color-ok); margin-bottom: 16px; }
.done-mark .icon { width: 28px; height: 28px; }
.step-done p { margin: 10px auto 0; max-width: 46ch; color: var(--color-text-muted); }
.done-sub { font-size: .9rem; color: var(--color-text-subtle) !important; }

.booking-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-top: 1px solid var(--color-border); background: var(--color-bg); }
.quote { min-width: 0; }
.quote-total { font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; font-weight: 450; font-variant-numeric: lining-nums; }
.quote-detail { margin-top: 2px; font-size: .84rem; color: var(--color-text-subtle); }
.quote-detail.is-error { color: var(--color-danger); font-weight: 600; }
.booking-actions { display: flex; gap: 10px; flex: none; }
.booking-actions [hidden] { display: none; }
.btn .btn-spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.booking.is-done .quote { visibility: hidden; }

/* intl-tel-input (prefisso internazionale) */
/* intl-tel-input */
.iti { width: 100%; }
.iti__country-list { max-width: min(360px, calc(100vw - 64px)); font-size: .92rem; z-index: 5; }
.iti__country-list { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border); box-shadow: var(--shadow-2); }
.iti__country.iti__highlight { background: var(--color-accent-soft); }
.iti__dial-code { color: var(--color-text-subtle); }
.iti__divider { border-bottom-color: var(--color-border); }
.iti--separate-dial-code .iti__selected-flag { background-color: var(--color-hover-bg); }
.iti__arrow { border-top-color: var(--color-text-muted); }
.iti__arrow--up { border-top-color: transparent; border-bottom-color: var(--color-text-muted); }
@media (max-width: 640px) {
  .booking { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .booking-head { padding: 14px 16px 0; }
  .booking-head h2 { font-size: 1.3rem; }
  .stepper { margin: 12px 16px 0; padding-bottom: 12px; }
  .stepper li { font-size: .74rem; gap: 6px; }
  .stepper li:not([aria-current="step"]) span:last-child { display: none; }
  .booking-body { padding: 16px; }
  .step[data-step="1"] { grid-template-columns: 1fr; }
  .fields { grid-template-columns: 1fr; }
  .summary > div { grid-template-columns: 1fr; gap: 2px; }
  .booking-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
  .quote { flex: 1 1 100%; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .quote-total { font-size: 1.35rem; }
  .quote-detail { text-align: right; }
  .booking-actions { flex: 1 1 100%; }
  .booking-actions .btn { flex: 1; }
}
.done-total { font-family: var(--serif); font-size: 1.35rem; color: var(--color-text) !important; }

/* ==== components/calendar/calendar.css ==== */
/* Componente: calendar — calendario date (Flatpickr) con override isolati per i due temi */
.calendar { min-height: 300px; }
.calendar .cal-anchor { display: none !important; }
.cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.cal-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; font-size: .8rem; color: var(--color-text-subtle); }
.cal-legend li { display: inline-flex; align-items: center; gap: 6px; }
.lg { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.lg-busy { background: repeating-linear-gradient(135deg, var(--color-bg-alt-strong) 0 3px, var(--color-bg-alt) 3px 6px); }
.lg-sel { background: var(--color-selected-bg); }

/* Flatpickr — integrato nello stile del sito */
.calendar .flatpickr-calendar { width: 100% !important; box-shadow: none; border: 1px solid var(--color-border); border-radius: var(--r-md); font-family: var(--sans); background: var(--color-surface); }
.calendar .flatpickr-calendar.inline { top: 0; }
.calendar .flatpickr-rContainer, .calendar .flatpickr-days { width: 100% !important; }
.calendar .dayContainer { width: 100% !important; min-width: 0 !important; max-width: none !important; padding: 4px 6px 8px; }
.calendar .flatpickr-innerContainer { justify-content: center; }
.calendar .flatpickr-months { padding: 6px 4px 0; }
.calendar .flatpickr-months .flatpickr-month { height: 44px; color: var(--color-text); fill: var(--color-text); }
.calendar .flatpickr-current-month { font-size: 1rem; font-weight: 700; padding-top: 10px; }
.calendar .flatpickr-current-month .cur-month { font-weight: 700; }
.calendar .flatpickr-months .flatpickr-prev-month, .calendar .flatpickr-months .flatpickr-next-month { height: 44px; padding: 14px; color: var(--color-text-muted); fill: var(--color-text-muted); }
.calendar .flatpickr-months .flatpickr-prev-month:hover svg, .calendar .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--color-link); }
.calendar span.flatpickr-weekday { color: var(--color-text-subtle); font-weight: 700; font-size: .74rem; }
.calendar .flatpickr-day { max-width: none; flex-basis: 14.2857%; height: 40px; line-height: 38px; border-radius: var(--r-sm); color: var(--color-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.calendar .flatpickr-day:hover, .calendar .flatpickr-day:focus { background: var(--color-accent-soft); border-color: var(--color-accent-soft); color: var(--color-text); }
.calendar .flatpickr-day.today { border-color: var(--color-bg-alt-strong); }
.calendar .flatpickr-day.selected, .calendar .flatpickr-day.startRange, .calendar .flatpickr-day.endRange,
.calendar .flatpickr-day.selected:hover, .calendar .flatpickr-day.startRange:hover, .calendar .flatpickr-day.endRange:hover { background: var(--color-selected-bg); border-color: var(--color-selected-bg); color: var(--color-selected-fg); box-shadow: none; }
.calendar .flatpickr-day.inRange { background: var(--color-accent-soft); border-color: var(--color-accent-soft); box-shadow: -5px 0 0 var(--color-accent-soft), 5px 0 0 var(--color-accent-soft); color: var(--color-text); }
.calendar .flatpickr-day.flatpickr-disabled, .calendar .flatpickr-day.flatpickr-disabled:hover,
.calendar .flatpickr-day.notAllowed, .calendar .flatpickr-day.notAllowed.prevMonthDay, .calendar .flatpickr-day.notAllowed.nextMonthDay {
  color: var(--color-text-disabled); background: transparent; border-color: transparent; cursor: not-allowed; font-weight: 500;
}
.calendar .flatpickr-day.is-busy, .calendar .flatpickr-day.is-busy:hover {
  background: repeating-linear-gradient(135deg, var(--color-bg-alt-strong) 0 3px, var(--color-bg-alt) 3px 6px); color: var(--color-text-disabled); text-decoration: line-through;
}
.calendar .flatpickr-day.prevMonthDay, .calendar .flatpickr-day.nextMonthDay { color: var(--color-text-faint); }
.calendar .flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1) { box-shadow: none; }

/* Elementi di Flatpickr con colori propri: allineati ai token (tema chiaro e scuro) */
.calendar .flatpickr-current-month input.cur-year, .calendar .flatpickr-current-month .cur-month { color: var(--color-text); }
.calendar .flatpickr-weekdays, .calendar .flatpickr-months .flatpickr-month { background: transparent; }
.calendar .numInputWrapper span { border-color: var(--color-border); }
.calendar .numInputWrapper span.arrowUp::after { border-bottom-color: var(--color-text-muted); }
.calendar .numInputWrapper span.arrowDown::after { border-top-color: var(--color-text-muted); }
.calendar .numInputWrapper:hover { background: var(--color-hover-bg); }
@media (max-width: 640px) {
  .calendar .flatpickr-day { height: 42px; line-height: 40px; }
}

/* ==== components/gallery/gallery.css ==== */
/* Componente: gallery — galleria foto degli alloggi e visualizzatore a schermo intero */
.gallery-main { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--color-bg-alt-strong); border-radius: var(--r-md); overflow: hidden; cursor: zoom-in; aspect-ratio: 4 / 3; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gallery-main:hover img { transform: scale(1.02); }
.gallery-count { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: var(--r-sm); background: var(--color-chip-bg); color: var(--color-text); font-size: .82rem; font-weight: 700; }
.gallery-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 12px; }
.gallery-thumbs li { flex: 1 1 0; min-width: 0; }
.gallery-thumbs button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; cursor: zoom-in; background: var(--color-bg-alt-strong); aspect-ratio: 4 / 3; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s var(--ease); }
.gallery-thumbs button:hover img { opacity: .86; }

/* Visualizzatore (resta scuro in entrambi i temi: è una "camera oscura" per le foto) */
/* ---------- Lightbox ---------- */
.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; background: rgba(8, 18, 28, .96); color: #fff; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(8, 18, 28, .96); }
.lb-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 64px 72px 24px; max-width: 100%; max-height: 100%; }
.lb-figure img { max-width: min(1400px, 100%); max-height: calc(100dvh - 140px); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.lb-figure figcaption { font-size: .92rem; color: #D5DEE6; text-align: center; }
.lb-count { color: #8FA6BA; margin-left: 8px; font-variant-numeric: tabular-nums; }
.lb-btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-btn .icon { width: 24px; height: 24px; }
.lb-btn:focus-visible { box-shadow: 0 0 0 2px #fff; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close { right: 16px; top: 16px; }
@media (max-width: 640px) {
  .lb-figure { padding: 64px 8px 80px; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}
