/* ===== Font locali (variable), niente dipendenza da Google Fonts ===== */
@font-face {
  font-family: 'DM Sans';
  src: url('../fonts/DMSans.woff2') format('woff2'),
       url('../fonts/DMSans-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay.woff2') format('woff2'),
       url('../fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Playfair Display';
  src: url('../fonts/PlayfairDisplay-Italic.woff2') format('woff2'),
       url('../fonts/PlayfairDisplay-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Tema "Realteek" — bianco pulito, accento azzurro cielo, pillole scure */
  --bg: #ffffff;
  --canvas: #f6f8fa;
  --fg: #15171c;
  --muted: #6b7280;
  --accent: #3f8fcc;          /* azzurro corsivo / dettagli */
  --accent-deep: #2f76ac;
  --dark: #0f1115;            /* pillole/azioni scure */
  --dark-press: #23262e;
  --line: rgba(16, 18, 23, .10);
  --line-2: rgba(16, 18, 23, .16);
  --radius: 16px;
  --max: 1200px;
  --display: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.12; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }

/* Spazio in alto per le pagine interne (header solido in flusso) */
#app > .container:first-child { padding-top: 2.25rem; padding-bottom: 1rem; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; left: 0; right: 0; z-index: 30;
  background: #fff; border-bottom: 1px solid var(--line);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 76px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.logo span { color: var(--accent); margin-left: .15rem; }
.logo.has-logo { display: inline-flex; align-items: center; }
.logo.has-logo img { display: block; width: auto; height: auto; max-height: 46px; }
.main-nav { margin-left: auto; display: flex; gap: 1.8rem; align-items: center; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; transition: color .15s; }
.main-nav a:hover { color: var(--fg); }
.login-btn { flex: 0 0 auto; background: #fff; color: var(--fg); border: 1px solid var(--line-2);
  padding: .55rem 1.4rem; border-radius: 999px; font-weight: 600; font-size: .92rem; transition: background .15s, color .15s; }
.login-btn:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

/* Switch lingua */
.lang-switch { flex: 0 0 auto; margin-left: 1rem; display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--line-2); border-radius: 999px; background: #fff; }
.lang-switch button { border: 0; background: transparent; cursor: pointer; font: 600 .8rem var(--sans);
  color: var(--muted); padding: .3rem .6rem; border-radius: 999px; transition: background .15s, color .15s; }
.lang-switch button:hover { color: var(--fg); }
.lang-switch button.active { background: var(--dark); color: #fff; }
body.is-home .lang-switch { background: rgba(15, 17, 21, .32); backdrop-filter: blur(6px); border-color: rgba(255, 255, 255, .5); }
body.is-home .lang-switch button { color: rgba(255, 255, 255, .95); }
body.is-home .lang-switch button.active { background: #fff; color: var(--fg); }
body.is-home .site-header.scrolled .lang-switch { background: #fff; border-color: var(--line-2); }
body.is-home .site-header.scrolled .lang-switch button { color: var(--muted); }
body.is-home .site-header.scrolled .lang-switch button.active { background: var(--dark); color: #fff; }

/* Pulsante telefono nell'header */
.header-tel { flex: 0 0 auto; margin-left: 1.4rem; display: inline-flex; align-items: center; gap: .45rem;
  background: var(--dark); color: #fff; padding: .55rem 1.2rem; border-radius: 999px; font-weight: 600;
  font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; transition: background .15s, color .15s, transform .15s; }
.header-tel:hover { background: var(--dark-press); transform: translateY(-1px); }
.header-tel svg { flex: 0 0 auto; }
body.is-home .header-tel { background: #fff; color: var(--fg); }
body.is-home .header-tel:hover { background: #eef1f4; }
body.is-home .site-header.scrolled .header-tel { background: var(--dark); color: #fff; }

/* Pulsante WhatsApp nell'header */
.header-wa { flex: 0 0 auto; margin-left: .55rem; width: 40px; height: 40px; border-radius: 50%;
  display: inline-grid; place-items: center; background: #25d366; color: #fff;
  transition: transform .15s, box-shadow .2s; }
.header-wa:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(37, 211, 102, .40); }
.header-wa svg { width: 20px; height: 20px; }

/* Hamburger: visibile solo su mobile (vedi media query in fondo) */
.nav-toggle { display: none; flex: 0 0 auto; width: 44px; height: 44px; margin-left: .35rem;
  align-items: center; justify-content: center; flex-direction: column; gap: 5px;
  background: transparent; border: 0; cursor: pointer; padding: 10px; border-radius: 10px; color: var(--fg); }
.nav-toggle span { display: block; width: 100%; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .2s ease, opacity .2s ease; }
.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.is-home .nav-toggle { color: #fff; }
body.is-home .site-header.scrolled .nav-toggle { color: var(--fg); }

/* Home: header trasparente sovrapposto all'hero */
body.is-home .site-header { position: absolute; background: transparent; border-bottom-color: transparent; }
body.is-home .site-header .logo,
body.is-home .site-header .logo span,
body.is-home .site-header .main-nav a { color: #fff; }
body.is-home .site-header .logo,
body.is-home .site-header .main-nav a { text-shadow: 0 1px 14px rgba(0, 0, 0, .38); }
body.is-home .site-header.scrolled .logo,
body.is-home .site-header.scrolled .main-nav a { text-shadow: none; }
body.is-home .site-header .main-nav a:hover { color: rgba(255, 255, 255, .78); }
body.is-home .login-btn { background: #fff; color: var(--fg); border-color: #fff; }
body.is-home .login-btn:hover { background: var(--dark); color: #fff; border-color: var(--dark); }

/* Home: dopo lo scroll l'header diventa solido e fisso */
body.is-home .site-header.scrolled {
  position: fixed; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(16, 18, 23, .06);
}
body.is-home .site-header.scrolled .logo,
body.is-home .site-header.scrolled .logo span,
body.is-home .site-header.scrolled .main-nav a { color: var(--fg); }
body.is-home .site-header.scrolled .logo span { color: var(--accent); }
body.is-home .site-header.scrolled .main-nav a:hover { color: var(--accent); }

/* ============ HERO ============ */
.hero-slider { position: relative; height: min(88vh, 780px); min-height: 540px; overflow: hidden; background: #0b6e80; }
.hero-slider .slides { position: absolute; inset: 0; }
.hero-slider .slides--fallback { background: linear-gradient(135deg, #6fb6e6, #2f76ac); }
.hero-slider .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s ease; }
.hero-slider .slide.active { opacity: 1; }
.hero-slider .slide img, .hero-slider .slide video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 5rem 1.5rem 7rem;
  background: linear-gradient(to bottom, rgba(8, 20, 30, .30), rgba(8, 20, 30, .08) 42%, rgba(8, 20, 30, .42));
}
.hero-caption { color: #fff; max-width: 60rem; }
.hero-caption .eyebrow {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.4rem); margin: 0 0 .25rem; text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}
.hero-caption h1 {
  font-size: clamp(2.2rem, 6vw, 4rem); margin: 0; font-weight: 700; letter-spacing: -.02em;
  text-shadow: 0 2px 26px rgba(0, 0, 0, .32);
}
.hero-cta { display: inline-block; margin-top: 1.4rem; background: #fff; color: var(--fg);
  padding: .8rem 1.7rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22); transition: transform .15s, background .15s; }
.hero-cta:hover { transform: translateY(-2px); background: #f2f4f6; }
.hero-slider .dots { position: absolute; bottom: 78px; left: 0; right: 0; display: flex; justify-content: center; gap: .5rem; z-index: 4; }
.hero-slider .dots button { width: 9px; height: 9px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; transition: background .15s, transform .15s; }
.hero-slider .dots button.active { background: #fff; transform: scale(1.2); }

/* Barra di ricerca a pillola, sovrapposta al bordo inferiore dell'hero */
.hero-search-wrap { position: relative; z-index: 6; margin-top: -42px; }
.search-bar {
  display: flex; align-items: center; gap: .3rem; background: #fff; border-radius: 999px;
  padding: .5rem .55rem; box-shadow: 0 22px 55px rgba(16, 18, 23, .18); max-width: 900px; margin: 0 auto;
}
.sb-field { display: flex; align-items: center; gap: .55rem; padding: .45rem 1rem; flex: 1 1 0; min-width: 0; border-right: 1px solid var(--line); }
.sb-field:last-of-type { border-right: 0; }
.sb-field svg { flex: 0 0 auto; color: var(--muted); }
.sb-field input, .sb-field select {
  border: 0; outline: 0; background: transparent; font: inherit; font-size: .95rem; color: var(--fg);
  width: 100%; min-width: 0; appearance: none; -webkit-appearance: none;
}
.sb-field select { cursor: pointer; }
.sb-go {
  flex: 0 0 auto; background: var(--dark); color: #fff; border: 0; border-radius: 999px;
  padding: .85rem 1.6rem; font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .15s;
}
.sb-go:hover { background: var(--dark-press); }

/* ============ SEZIONE "HANDPICKED" ============ */
.handpicked { padding: 4.5rem 1.5rem 3rem; }
.handpicked-head { text-align: center; margin-bottom: 1.5rem; }
.handpicked-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0; font-weight: 700; }
.handpicked-head em { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--accent); }

/* Blocco "Contattaci" centrato (telefono + WhatsApp) */
.contattaci { text-align: center; margin: .25rem 0 2rem; }
.contattaci-label { font-family: var(--serif); font-style: italic; color: var(--accent); font-size: 1.35rem; margin: 0 0 .5rem; }
.contattaci-row { display: inline-flex; align-items: center; gap: .9rem; }
.contattaci-tel { font-family: var(--display); font-size: clamp(1.3rem, 3vw, 1.7rem); font-weight: 700; letter-spacing: -.01em; color: var(--fg); font-variant-numeric: tabular-nums; }
.contattaci-tel:hover { color: var(--accent-deep); }
.wa-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #25d366; color: #fff; flex: 0 0 auto; transition: transform .15s, box-shadow .2s; }
.wa-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(37, 211, 102, .45); }

/* Pillole tipologie */
.pill-row { display: flex; align-items: center; gap: .6rem; margin: 1.5rem 0 2.25rem; }
.pills { display: flex; gap: .55rem; overflow-x: auto; scroll-behavior: smooth; flex: 1; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: 0 0 auto; padding: .55rem 1.15rem; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; color: var(--muted); font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.pill:hover { color: var(--fg); border-color: var(--fg); }
.pill.active { background: var(--dark); color: #fff; border-color: var(--dark); }
.pill-scroll {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2);
  background: #fff; color: var(--fg); font-size: 1.2rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: background .15s, border-color .15s;
}
.pill-scroll:hover { background: var(--canvas); border-color: var(--fg); }

.handpicked-foot { text-align: center; margin-top: 2.75rem; }

/* Bottoni scuri a pillola */
.btn, .btn-dark, button[type="submit"] {
  display: inline-block; background: var(--dark); color: #fff; border: 0;
  padding: .85rem 1.7rem; border-radius: 999px; cursor: pointer; font-size: .98rem; font-weight: 600;
  font-family: inherit; transition: background .15s, transform .1s;
}
.btn:hover, .btn-dark:hover, button[type="submit"]:hover { background: var(--dark-press); }
.btn:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: default; }

/* ============ GRIGLIA CARD ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.75rem; }
.card { display: block; background: #fff; border-radius: 18px; transition: transform .15s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 42px rgba(16, 18, 23, .10); }
.card-media { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #eef1f4; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.noimg { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: .85rem; }
.card-body { padding: .95rem .4rem 0; }
.card-title { margin: 0 0 .3rem; font-size: 1.12rem; font-weight: 700; }
.card-meta { display: flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .88rem; margin: 0 0 .5rem; }
.card-meta svg { flex: 0 0 auto; }
.card-desc { color: var(--muted); font-size: .9rem; margin: 0 0 .6rem; }
.card-price { font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--fg); margin: 0; }

/* ============ CATALOGO ============ */
.filtri { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }
.filtri select, .filtri input { padding: .7rem .9rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: 1rem; font-family: inherit; }
.filtri button[type="submit"] { padding: .7rem 1.5rem; }

/* ============ SCHEDA ============ */
.scheda { max-width: 900px; }
.galleria-main { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); background: #eef1f4; }
.galleria-thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; }
.galleria-thumbs .thumb { flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 8px; opacity: .6; transition: opacity .15s; }
.galleria-thumbs .thumb img { width: 90px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.galleria-thumbs .thumb:hover { opacity: 1; }
.galleria-thumbs .thumb.active { opacity: 1; outline: 2px solid var(--accent); outline-offset: 1px; }
.scheda-luogo { color: var(--muted); display: flex; align-items: center; gap: .3rem; }
.scheda-data { color: var(--muted); font-size: .9rem; }
.scheda-mappa { margin-top: 2rem; }
.scheda-map { width: 100%; height: 360px; border: 0; border-radius: var(--radius); display: block; }
.scheda-specs { display: flex; gap: 1.25rem; color: var(--muted); margin: 1rem 0; flex-wrap: wrap; }
.scheda-price { font-family: var(--display); font-size: 1.9rem; font-weight: 700; color: var(--fg); }

/* ============ FORM / CONTATTI ============ */
.contatti-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contatti { max-width: 560px; }
.dove-siamo { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.dove-siamo h2 { margin: 0 0 1rem; font-size: 1.3rem; }
.ds-riga { display: flex; align-items: center; gap: .5rem; margin: 0 0 .55rem; color: var(--muted); font-size: .95rem; }
.ds-riga svg { flex: 0 0 auto; color: var(--accent); }
.ds-riga a:hover { color: var(--accent-deep); }
.ds-map { width: 100%; height: 320px; border: 0; border-radius: 12px; display: block; margin-top: 1rem; }
@media (max-width: 820px) {
  .contatti-layout { grid-template-columns: 1fr; gap: 1.75rem; }
  .contatti { max-width: none; }
}
.form { display: grid; gap: .8rem; max-width: 560px; }
.form .campo { display: grid; gap: .3rem; font-size: .9rem; color: var(--fg); }
.form input, .form textarea { padding: .75rem .9rem; border: 1px solid var(--line-2); border-radius: 12px; font-size: 1rem; font-family: inherit; }
.form input:focus, .form textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(63, 143, 204, .18); }
.privacy-check { display: flex; align-items: flex-start; gap: .55rem; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.privacy-check input { margin-top: .15rem; flex: 0 0 auto; }
.privacy-check a { color: var(--accent-deep); text-decoration: underline; }

/* ============ PAGINE STATICHE ============ */
.pagina { max-width: 760px; }
.pagina h1 { font-size: 2rem; margin-bottom: 1.25rem; }
.pagina-contenuto { white-space: pre-wrap; line-height: 1.7; color: var(--fg); }

/* ============ FOOTER ============ */
.site-footer { background: var(--fg); color: rgba(255, 255, 255, .70); margin-top: 5rem; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; padding-block: 3.25rem 2.5rem; }
.footer-col h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; margin: 0 0 1.1rem; font-weight: 600; }
.f-name { color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; }
.f-desc { margin: .8rem 0 0; font-size: .92rem; line-height: 1.65; max-width: 36ch; color: rgba(255, 255, 255, .60); }
.f-contatti, .f-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; font-size: .92rem; }
.f-contatti li { display: flex; align-items: flex-start; gap: .55rem; }
.f-contatti svg { flex: 0 0 auto; margin-top: .15rem; color: var(--accent); }
.f-contatti a:hover, .f-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 1.25rem; display: flex;
  flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; font-size: .82rem; color: rgba(255, 255, 255, .55); }
.footer-bottom a:hover { color: #fff; }
.footer-credit a { color: rgba(255, 255, 255, .82); }
.footer-credit a:hover { color: var(--accent); }
@media (max-width: 760px) {
  .footer-top { grid-template-columns: 1fr; gap: 2rem; padding-top: 2.5rem; }
  .footer-bottom { justify-content: flex-start; gap: .4rem 1.25rem; }
}

/* ============ STATI / SKELETON ============ */
.state { color: var(--muted); padding: 2rem 0; }
.state--error { color: #b91c1c; }
.skel { position: relative; overflow: hidden; background: #e9edf0; border-radius: 8px; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent); animation: shimmer 1.3s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.skel-card { pointer-events: none; }
.skel-media { aspect-ratio: 4 / 3; border-radius: 18px; }
.skel-media-wide { width: 100%; aspect-ratio: 16 / 9; }
.skel-line { height: .8rem; margin: .5rem 0; }
.skel-price { height: 1.15rem; margin-top: .8rem; }
.card-price, .scheda-price { font-variant-numeric: tabular-nums; }

/* ============ ACCESSIBILITÀ ============ */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, .card:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px;
}
#app:focus { outline: none; } /* main è focusabile solo come bersaglio dello skip-link */

/* Skip link: visibile solo con tastiera (focus) */
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--dark); color: #fff; padding: .7rem 1.15rem; border-radius: 10px;
  font-weight: 600; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); transition: top .18s ease;
}
.skip-link:focus { top: 12px; outline: 2px solid #fff; outline-offset: 2px; }

/* Nota "richiesta per l'annuncio X" sopra il modulo contatti */
.ctx-annuncio {
  margin: 0 0 1.2rem; padding: .8rem 1.05rem; background: var(--canvas);
  border-left: 3px solid var(--accent); border-radius: 8px; font-size: .95rem; color: var(--muted);
}
.ctx-annuncio a { color: var(--accent-deep); font-weight: 600; text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============ RESPONSIVE ============ */
/* Target di tocco comodi sui dispositivi touch (a prescindere dalla larghezza) */
@media (pointer: coarse) {
  .pill { min-height: 44px; }
  .pill-scroll { width: 44px; height: 44px; }
  .lang-switch button { min-height: 38px; padding-left: .8rem; padding-right: .8rem; }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-tel { display: none; }        /* la pillola col numero è troppo larga qui */
  .header-inner { gap: .5rem; }

  /* Da menu inline a pannello a tendina (nascosto finché non si apre) */
  .main-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-left: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; padding: .25rem 1.5rem .75rem;
    border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(16, 18, 23, .10);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  }
  .site-header.nav-open .main-nav { opacity: 1; visibility: visible; transform: none; }

  /* Nel pannello i link sono sempre scuri e leggibili (anche in home) */
  .main-nav a,
  body.is-home .site-header .main-nav a,
  body.is-home .site-header.scrolled .main-nav a {
    color: var(--fg); text-shadow: none; min-height: 48px; display: flex; align-items: center;
    padding: 0 .25rem; border-bottom: 1px solid var(--line); font-size: 1rem;
  }
  .main-nav a:last-child { border-bottom: 0; }
  .main-nav a:hover { color: var(--accent); }
}
@media (max-width: 760px) {
  .search-bar { flex-direction: column; align-items: stretch; border-radius: 22px; padding: .6rem; gap: .2rem; }
  .sb-field { border-right: 0; border-bottom: 1px solid var(--line); padding: .7rem .9rem; }
  .sb-field:last-of-type { border-bottom: 0; }
  .sb-go { width: 100%; margin-top: .35rem; }
  .hero-search-wrap { margin-top: -24px; }
}
@media (max-width: 600px) {
  .btn, button[type="submit"], .filtri select, .filtri input,
  .form input, .form textarea, .sb-field input, .sb-field select { min-height: 44px; }
  .hero-slider { min-height: 480px; }
}
