/* ===== Font self-hostati (GDPR + performance) =====
   Sono font "variabili": un solo file contiene tutti i pesi, quindi ogni
   famiglia ha un unico @font-face con un intervallo di font-weight. */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('../assets/fonts/caveat-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url('../assets/fonts/caveat-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../assets/fonts/cormorantgaramond-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('../assets/fonts/cormorantgaramond-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/manrope-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../assets/fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* =====================================================================
   Casa Mia — da Antonella | Tertenia, Sardegna
   PANNELLO GRAFICO — Design token
   ---------------------------------------------------------------------
   Modifica i valori QUI SOTTO per cambiare l'aspetto di TUTTO il sito:
   colori, caratteri, dimensioni dei titoli, raggi, spaziature.
   (Per cambiare davvero i font servono anche i file in /assets/fonts e i
   blocchi @font-face qui sopra.)
   ===================================================================== */
:root {
  /* --- Caratteri --- */
  --font-serif: 'Cormorant Garamond', serif;                     /* titoli */
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;  /* testo corrente */
  --font-script: 'Caveat', cursive;                              /* accenti "scritti a mano" */

  /* --- Colori brand --- */
  --accent: #0d8290;                                          /* colore principale (teal ~4.5:1 su bianco, WCAG AA) */
  --accent-dark: color-mix(in srgb, var(--accent) 88%, #000); /* hover dei bottoni pieni */
  --on-accent: #ffffff;                                       /* testo/icone sopra accent o sfondi scuri */

  /* --- Testo --- */
  --ink: #1b1b1b;            /* titoli e testo forte */
  --text: #333333;          /* testo corrente */
  --text-soft: #555555;     /* testo secondario */
  --muted: #666666;         /* note e didascalie */
  --subtle: #6a6a6a;        /* etichette maiuscole (5.4:1 su bianco, WCAG AA) */

  /* --- Superfici e bordi --- */
  --surface: #ffffff;       /* sfondo pagina e card */
  --surface-alt: #f7fafb;   /* pannello tenue (es. box posizione) */
  --panel: #fafcfc;         /* sfondo card contatti */
  --line: #ececec;          /* bordo tenue */
  --line-strong: #e2e2e2;   /* bordo marcato */

  /* --- Scala tipografica --- */
  --fs-h1: 44px;            /* titolo principale (hero) */
  --fs-section: 28px;       /* titoli di sezione (h2) */
  --fs-eyebrow: 24px;       /* occhiello "scritto a mano" */
  --fs-brand: 30px;         /* logo "Casa Mia" nell'header */
  --fs-brand-sub: 22px;     /* "da Antonella" nell'header */
  --fs-hero: 16.5px;        /* sottotitolo hero */
  --fs-lead: 16.5px;        /* paragrafo introduttivo */
  --fs-body: 16px;          /* testo base */
  --fs-sm: 14.5px;          /* testo piccolo */
  --fs-xs: 13px;            /* micro-testo / etichette */

  /* --- Raggi angoli --- */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;

  /* --- Spaziatura (scala 4/8px, palette disponibile) --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* --- Layout --- */
  --maxw: 1120px;           /* larghezza massima del contenuto */
  --header-offset: 90px;    /* compensazione header sticky quando si salta alle ancore */

  /* --- Movimento --- */
  --transition: 0.15s ease;
}

/* Skip-link accessibilità */
.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--on-accent); padding: 10px 16px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 8px; }

/* Focus visibile per navigazione da tastiera */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scrollbar-gutter: stable; color-scheme: light; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--surface);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }
img { display: block; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.serif { font-family: var(--font-serif); }
.script { font-family: var(--font-script); }

/* Ancore: compensano l'header sticky quando si salta alle sezioni */
#foto, #servizi, #posizione, #contatti { scroll-margin-top: var(--header-offset); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding-top: 14px; padding-bottom: 14px;
}
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 10px; line-height: 1; }
.brand-name { font-weight: 700; font-size: var(--fs-brand); letter-spacing: 0.5px; color: var(--ink); white-space: nowrap; }
.brand-sub { font-size: var(--fs-brand-sub); color: var(--accent); transform: translateY(2px); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav-link { text-decoration: none; color: var(--text-soft); font-size: 14px; font-weight: 600; }
.nav-cta {
  text-decoration: none; color: var(--on-accent); background: var(--accent);
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 10px 18px; border-radius: 0; font-size: 14px; font-weight: 700;
  white-space: nowrap; transition: background 0.15s ease;
}
.nav-cta:hover, .nav-cta:focus-visible { background: var(--accent-dark); }
.cta-short { display: none; }

/* Selettore lingua (IT / EN) */
.lang-switch { display: flex; align-items: center; margin-left: -10px; }
.lang-switch a {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 44px; padding: 0 6px;
  text-decoration: none; color: var(--subtle);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.6px;
  transition: color var(--transition);
}
.lang-switch a + a::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 1px; height: 14px; margin-top: -7px; background: var(--line-strong);
}
.lang-switch a:hover { color: var(--accent); }
.lang-switch a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

/* Title */
.title-section { padding: 34px 0 20px; }
.eyebrow { margin: 0 0 8px; font-size: var(--fs-eyebrow); color: var(--accent); }
h1 {
  margin: 0; font-weight: 700; font-size: var(--fs-h1); line-height: 1.12;
  letter-spacing: -0.3px; color: var(--ink); max-width: 860px; text-wrap: balance;
}
.hero-sub { margin: 14px 0 0; font-size: var(--fs-hero); color: var(--text-soft); max-width: 760px; }

/* Stat strip */
.stats { margin-top: 26px; display: flex; flex-wrap: wrap; border: 1px solid var(--line-strong); }
.stat { flex: 1 1 130px; padding: 16px 20px; border-right: 1px solid var(--line-strong); }
.stat:last-child { border-right: none; }
.stat-num { margin: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-num.accent { color: var(--accent); }
.stat-label { margin: 6px 0 0; font-size: 13px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--subtle); }

/* Gallery */
.gallery {
  position: relative; display: grid;
  grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr);
  gap: 6px; height: 480px; border-radius: var(--radius-sm); overflow: hidden;
}
.gallery button { padding: 0; border: none; cursor: pointer; overflow: hidden; background: #eee; }
.gallery button:first-child { grid-column: 1 / 3; grid-row: 1 / 3; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery button:hover img { transform: scale(1.05); }
/* .gallery .gallery-btn: serve a battere la regola generica .gallery button */
.gallery .gallery-btn {
  position: absolute; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; min-height: 44px;
  background: var(--accent); color: var(--on-accent); border: none;
  border-radius: var(--radius-sm); padding: 10px 20px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 700; letter-spacing: 0.3px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25); cursor: pointer;
  transition: background 0.15s ease;
}
.gallery .gallery-btn:hover, .gallery .gallery-btn:focus-visible { background: var(--accent-dark); }

/* Body layout */
.body-grid {
  display: block; padding: 44px 0 8px;
}
.col-main { min-width: 0; }
.block { padding: 30px 0; border-bottom: 1px solid var(--line); }
.block h2 { margin: 0 0 20px; font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-section); line-height: 1.15; color: var(--ink); }

/* Highlights */
.highlights { display: flex; flex-direction: column; gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.highlight { display: flex; gap: 16px; align-items: flex-start; }
.highlight-ico {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--surface));
  display: flex; align-items: center; justify-content: center; color: var(--accent); font-weight: 800;
}
.highlight p { margin: 0; }
.highlight .h-title { margin-bottom: 2px; font-weight: 700; color: var(--ink); }
.highlight .h-sub { color: var(--muted); font-size: 14.5px; }

/* Description */
.desc-lead { margin: 0 0 18px; font-size: var(--fs-lead); color: var(--text); max-width: 68ch; }
.desc-lead strong { color: var(--ink); }
.offers-title { margin: 0 0 12px; font-weight: 700; color: var(--ink); }
.offers { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; max-width: 68ch; }
.offers li { display: flex; gap: 12px; font-size: 16px; color: var(--text); }

/* Bedrooms */
.bedrooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bedroom button {
  width: 100%; padding: 0; border: none; cursor: pointer; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 4 / 3; background: #eee; display: block;
}
.bedroom img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.bedroom button:hover img { transform: scale(1.06); }
.bedroom .b-name { margin: 12px 0 2px; font-weight: 700; color: var(--ink); }
.bedroom .b-detail { margin: 0; color: var(--muted); font-size: 14.5px; }

/* Amenities */
.amenities { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; }
.amenity { display: flex; gap: 14px; align-items: center; padding: 4px 0; font-size: 16px; color: var(--text); }
.amenity .check { flex: 0 0 auto; color: var(--accent); font-weight: 800; font-size: 17px; }

/* Accordion solo su mobile (es. "Cosa troverai"): su desktop resta sempre aperto,
   l'apertura/chiusura è gestita da js/script.js */
.acc-mobile > summary { list-style: none; }
.acc-mobile > summary::-webkit-details-marker { display: none; }

/* Location */
.location-card {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface-alt); border: 1px solid #e6eef0; border-radius: var(--radius-sm); padding: 22px; margin-bottom: 16px;
}
.location-ico {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.location-card .l-place { margin: 0 0 6px; font-weight: 700; color: var(--ink); }
.location-card .l-desc { margin: 0; color: var(--text-soft); font-size: 15.5px; }
.map-wrap { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
/* Mappa: anteprima statica (nessun dato a terzi) + riquadro per caricare quella di Google.
   L'iframe viene creato da js/script.js solo dopo il clic su "Mostra la mappa di Google". */
.map-preview, .map-preview picture { display: block; }
.map-preview img, .map-frame { width: 100%; height: 340px; display: block; border: 0; }
.map-preview img { object-fit: cover; filter: saturate(0.9); }
.map-wrap.has-consent .map-preview img { filter: saturate(0.7) blur(1.5px); }
.map-consent {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px; text-align: center; background: rgba(255,255,255,0.55);
}
.map-consent[hidden] { display: none; }
.map-consent-text {
  margin: 0; max-width: 420px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.92); font-size: var(--fs-xs); line-height: 1.45; color: var(--text);
}
.map-consent-text a { color: var(--accent); }
.map-consent-btn { border: 0; cursor: pointer; font-family: var(--font-sans); min-height: 44px; }
.map-credit {
  position: absolute; right: 0; bottom: 0; margin: 0; padding: 2px 8px;
  background: rgba(255,255,255,0.85); font-size: 11px; color: var(--text-soft);
}
.map-credit a { color: inherit; }
/* Bottone "Apri in Google Maps": su mobile centrato sotto la mappa,
   su desktop dentro il box posizione, di fianco a "Marina di Tertenia" */
.map-actions { margin-top: 14px; text-align: center; }
@media (max-width: 900px) {
  .map-preview img, .map-frame { height: 275px; }
}
@media (min-width: 901px) {
  .location-grid { display: grid; grid-template-columns: 1fr auto; }
  .location-card { grid-column: 1 / -1; grid-row: 1; padding-right: 260px; }
  .location-grid .map-wrap { grid-column: 1 / -1; grid-row: 2; }
  .map-actions { grid-column: 2; grid-row: 1; align-self: center; margin: 0 22px 16px 0; }
}
.map-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.map-btn-icon {
  width: 16px; height: 16px; flex: 0 0 auto; fill: none;
  stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.map-pin {
  position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  padding: 7px 14px 7px 10px; font-size: 13px; font-weight: 700; color: var(--ink); pointer-events: none;
}
.map-pin .dot {
  width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
}
/* Contact card */
.contact-card-wrap { position: sticky; top: 100px; }
.contact-card { border: 1px solid #d7e3e5; overflow: hidden; }
.contact-card .cc-head { background: var(--accent); padding: 22px 24px; }
.contact-card .cc-head .cc-title { margin: 0; font-family: var(--font-serif); font-weight: 700; font-size: 25px; color: var(--on-accent); line-height: 1.1; }
.contact-card .cc-head .cc-sub { margin: 6px 0 0; color: var(--on-accent); font-size: 14px; }
.contact-card .cc-body { padding: 24px; background: var(--panel); }
.contact-card .cc-bullets { margin: 0 0 22px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 13px; }
.contact-card .cc-bullets li { display: flex; gap: 12px; font-size: 15px; color: var(--text); }
.contact-card .cc-bullets .check { color: var(--accent); font-weight: 800; }
.contact-card .cc-btn { display: block; text-align: center; text-decoration: none; background: var(--ink); color: var(--on-accent); padding: 15px; font-size: 15px; font-weight: 700; letter-spacing: 0.3px; }
.contact-card .cc-respond { margin: 13px 0 0; text-align: center; color: var(--subtle); font-size: 13px; }

/* Footer */
.site-footer { margin-top: 40px; background: var(--accent); color: var(--on-accent); }
.site-footer .footer-main {
  display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-end; justify-content: space-between;
  padding-top: 56px; padding-bottom: 56px;
}
.footer-brand { display: flex; align-items: baseline; gap: 12px; line-height: 1; }
.footer-brand .fb-name { font-family: var(--font-serif); font-weight: 700; font-size: 40px; color: var(--on-accent); }
.footer-brand .fb-sub { font-family: var(--font-script); font-size: 30px; color: rgba(255,255,255,0.92); }
.footer-tagline { margin: 18px 0 0; font-size: 17px; max-width: 460px; color: var(--on-accent); }
.footer-meta { text-align: right; font-size: 14px; color: var(--on-accent); line-height: 1.9; }
.footer-meta strong { color: var(--on-accent); }
.footer-meta p { margin: 0; }
.footer-meta .cin { margin: 10px 0 0; letter-spacing: 0.5px; }
.footer-contact { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 0; }
.footer-contact a { color: var(--on-accent); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.5); align-self: flex-end; padding: 2px 0; }
.footer-contact a:hover, .footer-contact a:focus-visible { border-bottom-color: var(--on-accent); }
.footer-bar { border-top: 1px solid rgba(255,255,255,0.22); }
.footer-bar .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 16px; padding-bottom: 16px; font-size: 13px; color: var(--on-accent);
}
.footer-bar a { color: var(--on-accent); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.5); }
.footer-bar a:hover, .footer-bar a:focus-visible { border-bottom-color: var(--on-accent); }

/* Pagina privacy */
.legal-page { max-width: 780px; padding-top: 48px; padding-bottom: 24px; }
.legal-page h1 { margin: 0; }
.legal-updated { margin: 10px 0 0; font-size: var(--fs-xs); color: var(--subtle); }
.legal-lead { margin: 24px 0 8px; font-size: var(--fs-lead); color: var(--text); }
.legal-section { padding: 26px 0; border-bottom: 1px solid var(--line); }
.legal-section h2 { margin: 0 0 14px; font-family: var(--font-serif); font-weight: 700; font-size: var(--fs-section); line-height: 1.15; color: var(--ink); }
.legal-section h3 { margin: 22px 0 8px; font-size: 17px; color: var(--ink); }
.legal-section p, .legal-section li { color: var(--text); }
.legal-section p { margin: 0 0 12px; }
.legal-section ul { margin: 0 0 12px; padding-left: 22px; }
.legal-section li { margin-bottom: 6px; }
.legal-section a { color: var(--accent); }
.legal-section a:hover, .legal-section a:focus-visible { color: var(--accent-dark); }
.legal-section code { font-size: 0.92em; background: var(--surface-alt); padding: 1px 5px; border-radius: var(--radius-sm); }
.legal-back { margin: 28px 0 0; }

/* Calendario disponibilità */
.cal-intro { margin: 0 0 20px; color: var(--muted); font-size: 15.5px; max-width: 620px; }
.calendar {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 20px 22px 22px; background: var(--surface);
  max-width: 780px; overflow: hidden;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.cal-nav {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-size: 20px; line-height: 1; cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease;
}
.cal-nav:hover:not(:disabled), .cal-nav:focus-visible { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color: var(--accent); }
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-months { flex: 1 1 auto; min-width: 0; display: flex; gap: 24px; justify-content: center; }
.cal-month { flex: 1 1 0; min-width: 0; max-width: 320px; }
.cal-title { margin: 0 0 12px; text-align: center; font-family: var(--font-serif); font-weight: 700; font-size: 21px; color: var(--ink); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-wd { text-align: center; font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; color: var(--subtle); padding-bottom: 4px; }
.cal-day {
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1 / 1; font-size: 14px; border-radius: 5px; color: var(--text);
}
.cal-day.is-blank { visibility: hidden; }
.cal-day.is-past { color: #c4c4c4; text-decoration: line-through; }
.cal-day.is-free {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: color-mix(in srgb, var(--accent) 60%, var(--ink)); font-weight: 600;
}
.cal-day.is-busy {
  background: #f2f2f2; color: #b3b3b3; text-decoration: line-through; text-decoration-thickness: 1px;
}
.cal-status { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--subtle); }
.cal-status.is-error { color: #a3402f; }
.cal-disclaimer { margin: 14px auto 0; max-width: 620px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--subtle); }
.cal-legend { display: flex; gap: 22px; justify-content: center; margin-bottom: 16px; }
.cal-key { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.cal-swatch { width: 15px; height: 15px; border-radius: var(--radius-sm); }
.cal-swatch.is-free { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--surface)); }
.cal-swatch.is-busy { background: #f2f2f2; border: 1px solid #e2e2e2; }
.cal-cta {
  display: inline-block; margin-top: 20px; text-decoration: none;
  background: var(--accent); color: var(--on-accent); padding: 13px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; letter-spacing: 0.3px;
}
.cal-cta:hover, .cal-cta:focus-visible { background: var(--accent-dark); }

/* Contatto per prenotare (sotto il calendario) */
.cal-contact { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.cal-contact-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--ink); }
/* Mobile/tablet (default): bottone "Scrivici una mail" + bottone "Copia mail" */
.cal-contact-actions {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 12px; margin-top: 14px; font-size: 17px; color: var(--muted);
}
.cal-contact-actions .cal-cta { margin-top: 0; min-height: 44px; }
.cal-contact-actions .copy-mail-btn { min-height: 44px; }
/* Email in chiaro: su mobile in una riga sotto i bottoni, senza "Scrivi a" */
.cal-contact-addr { order: 3; flex-basis: 100%; overflow-wrap: anywhere; }
.cal-contact-prefix { display: none; }
.cal-contact-addr a { color: var(--accent); font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; }
.cal-contact-addr a:hover, .cal-contact-addr a:focus-visible { color: var(--accent-dark); }
.copy-mail-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--surface));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--accent); border-radius: var(--radius-sm); padding: 8px 14px;
  font-family: var(--font-sans); font-size: 13.5px; font-weight: 800;
  cursor: pointer; transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.copy-mail-btn:hover, .copy-mail-btn:focus-visible {
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border-color: var(--accent); color: var(--accent-dark);
}
.copy-mail-btn.is-copied {
  background: #e8f5df;
  border-color: #8bc66b;
  color: #2f6b1f;
}
.copy-mail-icon {
  width: 17px; height: 17px; flex: 0 0 auto; fill: none;
  stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* Desktop (mouse e schermo largo): email in chiaro al posto del bottone "Scrivici" */
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .cal-contact-actions { gap: 14px; margin-top: 10px; }
  .cal-contact-btn { display: none; }
  .cal-contact-addr { order: 0; flex-basis: auto; }
  .cal-contact-prefix { display: inline; }
  .cal-contact-actions .copy-mail-btn { min-height: 38px; }
}

/* Bottone "Controlla disponibilità" (es. sotto il parcheggio) */
.avail-btn {
  display: inline-block; text-decoration: none;
  background: var(--accent); color: var(--on-accent); border-radius: var(--radius-sm);
  font-weight: 700; letter-spacing: 0.3px; padding: 12px 22px; font-size: 15px;
  transition: background 0.15s ease;
}
.avail-btn:hover, .avail-btn:focus-visible { background: var(--accent-dark); }
.avail-btn-sm {
  margin-top: 12px; padding: 8px 16px; font-size: 13.5px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--surface));
}
.avail-btn-sm:hover, .avail-btn-sm:focus-visible { background: color-mix(in srgb, var(--accent) 20%, var(--surface)); }

/* Ultima sezione: nessun bordo inferiore */
.block-last { border-bottom: none; }

/* Sezione disponibilità centrata */
#disponibilita { text-align: center; }
#disponibilita .cal-intro { margin-left: auto; margin-right: auto; }
#disponibilita .calendar { margin-left: auto; margin-right: auto; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15,20,22,0.94); display: none; flex-direction: column; }
.lightbox.open { display: flex; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; color: var(--on-accent); }
.lb-counter { font-size: 15px; font-weight: 600; color: rgba(255,255,255,0.85); }
.lb-close { background: none; border: none; color: var(--on-accent); font-size: 30px; cursor: pointer; line-height: 1; }
.lb-body { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 0 18px 30px; }
.lb-nav { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); background: rgba(255,255,255,0.08); color: var(--on-accent); font-size: 22px; cursor: pointer; }
.lb-stage { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.lb-stage img { max-width: 100%; max-height: calc(100% - 40px); object-fit: contain; border-radius: var(--radius-sm); }
.lb-cap { margin: 0; color: rgba(255,255,255,0.9); font-size: 15px; }

/* Pagina 404 */
.error-page { text-align: center; padding: 90px 24px 100px; }
.error-page h1 { margin: 0 auto; }
.error-page .eyebrow { margin-bottom: 10px; }
.error-page .hero-sub { margin: 16px auto 28px; max-width: 520px; }
.error-page .nav-cta { display: inline-block; }

/* Responsive */
@media (max-width: 900px) {
  .body-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-card-wrap { position: static; }
  .nav-link { display: none; }
  :root { --fs-h1: 34px; }
  .gallery { grid-template-columns: 1fr 1fr; height: 360px; }
  .gallery button:first-child { grid-column: 1 / 3; grid-row: 1; }
  .bedrooms { grid-template-columns: 1fr; }
  .amenities { grid-template-columns: 1fr; }
  .cal-months { gap: 20px; }
  .cal-month { max-width: 340px; margin: 0 auto; }
  .footer-meta { text-align: left; }
  .footer-contact a { align-self: flex-start; }
}

/* Telefoni */
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .site-header .wrap { gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .cal-nav { width: 44px; height: 44px; }
  :root { --fs-h1: 29px; --fs-hero: 15.5px; --fs-brand: 23px; --fs-brand-sub: 17px; }
  .brand { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
  .nav { gap: 14px; }
  .lang-switch { margin-left: -6px; }
  .lang-switch a { min-width: 32px; padding: 0 4px; }
  .nav-cta { padding: 9px 14px; font-size: 13px; }
  .cta-full { display: none; }
  .cta-short { display: inline; }

  .title-section { padding: 26px 0 16px; }
  .stats { margin-top: 20px; }
  .stat { flex-basis: 30%; padding: 14px 16px; border: 1px solid var(--line-strong); }

  /* Galleria: 1 foto grande + 2 piccole, il resto nel lightbox */
  .gallery { height: auto; gap: 5px; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; }
  .gallery button:first-child { grid-column: 1 / 3; grid-row: 1; aspect-ratio: 16 / 10; }
  .gallery > button:nth-child(2), .gallery > button:nth-child(3) { aspect-ratio: 4 / 3; }
  .gallery > button:nth-child(4), .gallery > button:nth-child(5) { display: none; }

  .body-grid { padding-top: 32px; }
  .amenities { gap: 12px 0; }

  .acc-mobile > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    min-height: 44px; cursor: pointer;
  }
  .acc-mobile > summary::after {
    content: '+'; flex: 0 0 auto; font-size: 28px; line-height: 1; font-weight: 400; color: var(--accent);
  }
  .acc-mobile[open] > summary::after { content: '2'; } /* segno meno */
  .acc-mobile:not([open]) > summary h2 { margin-bottom: 0; }
  .calendar { padding: 16px 12px 18px; }
  .cal-legend { gap: 16px; }
}

/* Rispetto delle preferenze di movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
