/* appartamentopratonevoso.it - direzione "alpino moderno" */

:root {
  --bg: #FAF9F7;
  --surface: #FFFFFF;
  --border: #E5E5E3;
  --border-strong: #D8D6D1;
  --text: #2C3338;
  --text-muted: #6E767C;
  --accent: #C4521F;
  --accent-dark: #A3441A;
  --dark: #2C3338;
  --dark-2: #3A4148;
  --radius: 6px;
  --maxw: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }

h1, h2, h3 { line-height: 1.2; font-weight: 600; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section + .section { border-top: 1px solid var(--border); }
.lead { font-size: 1.1rem; color: var(--text-muted); max-width: 62ch; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff;
  padding: 10px 16px; z-index: 200;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 249, 247, 0.94);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 60px;
}
.brand {
  font-weight: 600; font-size: 0.95rem; color: var(--text);
  text-decoration: none; letter-spacing: -0.01em; line-height: 1.25;
}
.brand span { color: var(--text-muted); font-weight: 400; }

/* Su schermi stretti il nome sta su una riga sola: due righe alzano
   l'header e rubano spazio verticale proprio dove ce n'è meno. */
@media (max-width: 420px) {
  .brand { font-size: 0.82rem; white-space: nowrap; }
  .site-header .wrap { gap: 8px; padding: 0 14px; }
  .header-right { gap: 8px; }
  .lang-switch a, .lang-switch span { padding: 4px 5px; font-size: 0.74rem; }
}
.nav-main { display: none; gap: 22px; }
.nav-main a { color: var(--text); text-decoration: none; font-size: 0.92rem; }
.nav-main a:hover { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 14px; }

.lang-switch { display: flex; align-items: center; gap: 6px; }
.lang-switch a, .lang-switch span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.8rem; text-decoration: none; padding: 4px 7px;
  border-radius: 4px; border: 1px solid transparent; line-height: 1;
}
.lang-switch a { color: var(--text-muted); }
.lang-switch a:hover { border-color: var(--border-strong); color: var(--text); }
.lang-switch .is-current {
  color: var(--text); border-color: var(--border-strong); background: var(--surface);
  font-weight: 600;
}
.flag { width: 18px; height: 13px; border-radius: 2px; flex: none; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; background: none; border: 1px solid var(--border-strong);
  border-radius: var(--radius); cursor: pointer; color: var(--text);
}
.nav-toggle svg { width: 20px; height: 20px; }

.nav-mobile { border-top: 1px solid var(--border); background: var(--surface); }
.nav-mobile ul { list-style: none; margin: 0; padding: 8px 20px 16px; }
.nav-mobile a {
  display: block; padding: 11px 0; color: var(--text);
  text-decoration: none; border-bottom: 1px solid var(--border);
}

@media (min-width: 860px) {
  .nav-main { display: flex; }
  .nav-toggle { display: none; }
  .nav-mobile { display: none !important; }
}

/* ---------- hero ---------- */
.hero { padding: 48px 0 0; }
.hero h1 { margin-bottom: 0.35em; max-width: 20ch; }
.hero .lead { margin-bottom: 26px; }
.hero-band { margin-top: 34px; background: var(--border); }
.hero-band img { width: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; text-decoration: none;
  padding: 13px 26px; border-radius: var(--radius); border: 0;
  font-size: 1rem; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--accent-dark); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong); font-weight: 500;
}
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- badge ---------- */
.badges { display: flex; flex-wrap: wrap; gap: 8px; padding: 22px 0 0; list-style: none; margin: 0; }
.badges li {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border-strong); background: var(--surface);
  border-radius: 100px; padding: 7px 15px; font-size: 0.86rem;
}
.badges svg { width: 16px; height: 16px; color: var(--accent); flex: none; }

/* ---------- riquadro periodo ---------- */
.period {
  border-left: 4px solid var(--accent); background: var(--surface);
  border-top: 1px solid var(--border); border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 26px; margin: 34px 0 0;
}
.period strong { display: block; font-size: 1.2rem; margin-bottom: 4px; }
.period p { margin: 0; color: var(--text-muted); }

/* ---------- dotazioni ---------- */
.features {
  display: grid; gap: 14px; grid-template-columns: 1fr;
  list-style: none; padding: 0; margin: 28px 0 0;
}
.features li { display: flex; gap: 12px; align-items: flex-start; }
.features svg { width: 21px; height: 21px; color: var(--accent); flex: none; margin-top: 2px; }
.features strong { display: block; font-weight: 600; }
.features span { color: var(--text-muted); font-size: 0.92rem; }

@media (min-width: 620px) { .features { grid-template-columns: 1fr 1fr; gap: 18px 28px; } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }

/* ---------- galleria ---------- */
.gallery { margin-top: 28px; }
.gallery-row { display: grid; gap: 12px; margin-bottom: 12px; }
.gallery-row.is-1 { grid-template-columns: 1fr; }
.gallery-row.is-2 { grid-template-columns: 1fr; }
.gallery-row.is-3 { grid-template-columns: 1fr 1fr; }

@media (min-width: 680px) {
  .gallery-row.is-2 { grid-template-columns: 1fr 1fr; }
  .gallery-row.is-3 { grid-template-columns: repeat(3, 1fr); }
}

.shot {
  margin: 0; border: 1px solid var(--border); border-radius: 10px;
  overflow: hidden; background: var(--surface);
}
.shot button {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; font: inherit; color: inherit; text-align: left;
}
.shot img { width: 100%; object-fit: cover; }
.gallery-row.is-1 .shot img { aspect-ratio: 2.22 / 1; }
.gallery-row.is-2 .shot img { aspect-ratio: 3 / 2; }
.gallery-row.is-3 .shot img { aspect-ratio: 4 / 3; }
.shot figcaption {
  padding: 10px 14px; font-size: 0.84rem; color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ---------- lightbox ---------- */
.lightbox {
  padding: 0; border: 0; background: transparent;
  max-width: 100vw; max-height: 100vh; width: 100%; height: 100%;
}
.lightbox::backdrop { background: rgba(20, 22, 25, 0.94); }
.lightbox-inner {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 24px;
}
.lightbox img { max-width: 100%; max-height: 76vh; border-radius: 6px; }
.lightbox figure { margin: 0; max-width: 100%; }
.lightbox figcaption { color: #D6DADD; font-size: 0.9rem; text-align: center; padding-top: 14px; }
.lightbox-close {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px;
  background: rgba(255, 255, 255, 0.14); border: 0; border-radius: 50%;
  color: #fff; font-size: 1.5rem; cursor: pointer; line-height: 1;
}
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; background: rgba(255, 255, 255, 0.14); border: 0;
  border-radius: 50%; color: #fff; font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }

/* ---------- posizione / mappa ---------- */
.place-grid { display: grid; gap: 30px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .place-grid { grid-template-columns: 1fr 1fr; gap: 40px; } }

.map {
  height: 340px; border-radius: 10px; border: 1px solid var(--border);
  background: #E8EAE6; overflow: hidden;
}
.map-note { font-size: 0.84rem; color: var(--text-muted); margin-top: 10px; }

.nearby { list-style: none; padding: 0; margin: 0 0 22px; }
.nearby li { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.nearby li:first-child { border-top: 1px solid var(--border); }
.nearby svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 3px; }
.nearby strong { display: block; }
.nearby span { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- numeri ---------- */
.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  margin: 28px 0 0; list-style: none; padding: 0;
}
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats li { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.stats b { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; }
.stats span { color: var(--text-muted); font-size: 0.88rem; }

/* ---------- faq ---------- */
.faq { margin-top: 24px; max-width: 78ch; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  cursor: pointer; padding: 17px 34px 17px 0; font-weight: 500;
  position: relative; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq .faq-body { padding: 0 0 18px; color: var(--text-muted); max-width: 68ch; }
.faq .faq-body p:last-child { margin-bottom: 0; }

/* ---------- modulo ---------- */
.contact { background: var(--dark); color: #fff; }
.contact h2 { color: #fff; }
.contact .lead { color: #AEB6BC; }
.contact-grid { display: grid; gap: 34px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.15fr; gap: 56px; } }
.contact-aside p { color: #AEB6BC; }
.contact-aside a { color: #fff; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.88rem; margin-bottom: 6px; color: #D6DADD; }
.field .req { color: #E8A07B; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit; font-size: 0.97rem;
  background: var(--dark-2); border: 1px solid #4A525A; border-radius: var(--radius);
  color: #fff;
}
.field input::placeholder, .field textarea::placeholder { color: #8A939B; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.field-error { display: none; color: #F0997B; font-size: 0.85rem; margin-top: 6px; }
.field.has-error input, .field.has-error textarea { border-color: #E24B4A; }
.field.has-error .field-error { display: block; }

.consent { display: flex; flex-wrap: wrap; gap: 11px; align-items: flex-start; margin: 20px 0; }
.consent input { width: 18px; height: 18px; flex: none; margin-top: 3px; accent-color: var(--accent); }
.consent label { font-size: 0.87rem; color: #AEB6BC; line-height: 1.5; flex: 1; min-width: 0; }
.consent a { color: #fff; }
.consent .field-error { flex-basis: 100%; margin: 0; }
.consent.has-error .field-error { display: block; }
.consent.has-error input { outline: 2px solid #E24B4A; outline-offset: 2px; }

.hp-field {
  position: absolute !important; left: -9999px !important;
  width: 1px !important; height: 1px !important; overflow: hidden !important;
}

.form-status { margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); font-size: 0.93rem; display: none; }
.form-status.is-ok { display: block; background: #1E4234; color: #9FE1CB; border: 1px solid #2E6650; }
.form-status.is-ko { display: block; background: #4A1F1F; color: #F7C1C1; border: 1px solid #7A3333; }

/* ---------- footer ---------- */
.site-footer { background: #23282D; color: #97A0A7; padding: 40px 0; font-size: 0.89rem; }
.site-footer a { color: #D6DADD; }
.footer-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; } }
.site-footer h3 { color: #fff; font-size: 0.92rem; margin-bottom: 0.6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 3px 0; }
.footer-bottom {
  border-top: 1px solid #383F45; margin-top: 30px; padding-top: 18px;
  font-size: 0.84rem; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
}

/* ---------- pagine di testo ---------- */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.2em 0; font-size: 0.94rem; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 600; background: var(--surface); }
.table-scroll { overflow-x: auto; }
