/* ==========================================================================
   Appartamento EURopa — foglio di stile unico
   Palette ripresa dai colori reali della casa: beige, rosa cipria, blu navy.
   ========================================================================== */

:root {
  --bg: #fbf8f5;
  --surface: #ffffff;
  --surface-2: #f4ede7;
  --ink: #232936;
  --ink-soft: #5c6474;
  --line: #e6ddd5;
  --navy: #2c3a52;
  --navy-dark: #1e2838;
  --rose: #c98b93;
  --rose-soft: #f6e8e8;
  --wa: #25d366;
  --wa-dark: #128c4a;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(35, 41, 54, .06), 0 6px 18px rgba(35, 41, 54, .06);
  --shadow-md: 0 2px 4px rgba(35, 41, 54, .06), 0 18px 40px rgba(35, 41, 54, .12);
  --wrap: 1160px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.01em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; margin-bottom: .35em; }

p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 6px; }

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251, 248, 245, .86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 20px rgba(35, 41, 54, .05); }

.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 72px;
}

.brand {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 600;
  text-decoration: none; color: var(--ink); margin-right: auto; white-space: nowrap;
}
.brand em { font-style: normal; color: var(--rose); }

.nav { display: flex; align-items: center; gap: 1.1rem; }
.nav__list { display: flex; gap: 1.1rem; list-style: none; margin: 0; padding: 0; }
.nav__list a {
  text-decoration: none; color: var(--ink-soft); font-size: .95rem; font-weight: 500;
  padding: .4rem 0; border-bottom: 2px solid transparent;
}
.nav__list a:hover { color: var(--ink); border-bottom-color: var(--rose); }

.lang-switch { display: flex; gap: .15rem; align-items: center; }
.lang-switch a {
  display: inline-flex; align-items: center; gap: .35rem;
  text-decoration: none; color: var(--ink-soft); font-size: .82rem; font-weight: 600;
  padding: .3rem .45rem; border-radius: 8px; letter-spacing: .03em;
}
.lang-switch__flag {
  width: 18px; height: 12px; flex: none; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(35, 41, 54, .13);
}
.lang-switch a[aria-current="true"] { background: var(--surface-2); color: var(--ink); }
.lang-switch a:hover { color: var(--ink); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 10px;
  padding: .5rem .6rem; cursor: pointer; color: var(--ink);
}

/* ---------------------------------------------------------------- pieces -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: .97rem;
  padding: .8rem 1.35rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--navy-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { background: var(--surface); }
.btn--wa { background: var(--wa); color: #06301c; }
.btn--wa:hover { background: var(--wa-dark); color: #fff; }
.btn--block { width: 100%; }

.badge {
  display: inline-block; background: var(--rose-soft); color: #8c4f57;
  font-size: .82rem; font-weight: 600; letter-spacing: .01em;
  padding: .4rem .8rem; border-radius: 999px; margin: 0 0 1.1rem;
}

.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section--alt { background: var(--surface-2); }
.section__head { max-width: 42rem; margin-bottom: 2.5rem; }
.section__head p { color: var(--ink-soft); margin: 0; }

/* ------------------------------------------------------------------ hero -- */

.hero { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 4.5rem); }
.hero__grid {
  display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1.05fr .95fr; align-items: center;
}
.hero__lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 34rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.6rem 0 0; }

.hero__media { position: relative; }
.hero__media img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 26px; box-shadow: var(--shadow-md);
}
.hero__note {
  position: absolute; left: 1rem; bottom: 1rem; right: 1rem;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-radius: var(--radius-sm); padding: .7rem .9rem;
  font-size: .85rem; color: var(--ink-soft); box-shadow: var(--shadow-sm);
}

.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1.4rem; list-style: none; margin: 2.2rem 0 0; padding: 1.4rem 0 0;
  border-top: 1px solid var(--line);
}
.facts li strong { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.facts li span { font-size: .85rem; color: var(--ink-soft); }

/* ----------------------------------------------------------------- about -- */

.about__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 4vw, 3.5rem); }
.about__text p { color: var(--ink-soft); }
.quote {
  margin: 1.5rem 0 0; padding: 1.4rem 1.6rem; background: var(--surface);
  border-left: 4px solid var(--rose); border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.quote p { margin: 0; }

.rooms { display: grid; gap: .8rem; align-content: start; }
.room {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.room h3 { display: flex; align-items: center; gap: .6rem; }
.room h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rose); flex: none;
}
.room p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- gallery -- */

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.6rem; }
.chip {
  font: inherit; font-size: .88rem; font-weight: 600;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
  padding: .45rem 1rem; border-radius: 999px; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.chip:hover { border-color: var(--rose); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

.grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
}
.tile {
  position: relative; padding: 0; border: 0; cursor: zoom-in; background: var(--surface-2);
  border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 3 / 4;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile::after {
  content: attr(data-caption); position: absolute; inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(20, 24, 33, .78), rgba(20, 24, 33, 0));
  color: #fff; font-size: .78rem; line-height: 1.35; text-align: left;
  padding: 1.6rem .7rem .6rem; opacity: 0; transition: opacity .22s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tile:hover::after, .tile:focus-visible::after { opacity: 1; }

/* -------------------------------------------------------------- lightbox -- */

.lightbox {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center;
  background: rgba(18, 22, 30, .93); padding: 1rem;
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: min(92vw, 1100px); text-align: center; }
.lightbox__figure img {
  max-height: 78vh; width: auto; margin-inline: auto; border-radius: var(--radius-sm);
}
.lightbox__caption { color: #e9e4de; font-size: .9rem; margin: .9rem 0 0; }
.lightbox__counter { color: #a9a49d; font-size: .8rem; margin: .35rem 0 0; }
.lightbox__btn {
  position: absolute; background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px;
  width: 46px; height: 46px; font-size: 1.3rem; cursor: pointer;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox__btn--prev { left: max(1rem, 3vw); top: 50%; transform: translateY(-50%); }
.lightbox__btn--next { right: max(1rem, 3vw); top: 50%; transform: translateY(-50%); }
.lightbox__btn--close { top: 1rem; right: 1rem; }

/* -------------------------------------------------------------- services -- */

.services { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.service {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
}
.service__icon { width: 26px; height: 26px; color: var(--rose); margin-bottom: .6rem; }
.service__icon svg { width: 100%; height: 100%; }
.service p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* -------------------------------------------------------------- location -- */

.location__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.distances { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.distances li {
  display: flex; justify-content: space-between; gap: 1.5rem;
  padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .95rem;
}
.distances span:last-child { color: var(--ink-soft); white-space: nowrap; }

.map-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
}
.map-card p { color: var(--ink-soft); font-size: .95rem; }
.map-card__zone { margin: 0 0 .9rem; font-family: var(--serif); font-size: 1.08rem; color: var(--ink); }

.places { margin-top: 2.5rem; }
.places h3 { margin-bottom: 1rem; }
.places__grid { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.place {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
}
.place__img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.place__body { padding: 1.1rem 1.2rem; }
.place h4 { margin: 0 0 .35rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.place__distance {
  display: inline-block; background: var(--rose-soft); color: #8c4f57;
  font-size: .76rem; font-weight: 600; border-radius: 999px;
  padding: .15rem .6rem; margin-bottom: .5rem;
}
.place p { margin: 0; font-size: .88rem; color: var(--ink-soft); }

/* ---------------------------------------------------------- come arrivare -- */

.arrival__grid {
  display: grid; gap: 1rem; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.arrival__option {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm);
}
.arrival__badge {
  display: inline-block; background: var(--rose-soft); color: #8c4f57;
  font-size: .76rem; font-weight: 600; border-radius: 999px;
  padding: .15rem .6rem; margin: 0 0 .55rem;
}
.arrival__option h3 { margin: 0 0 .55rem; font-family: var(--serif); font-size: 1.06rem; font-weight: 600; }
.arrival__steps { margin: 0; padding-left: 1.1rem; display: grid; gap: .45rem; }
.arrival__steps li { font-size: .88rem; color: var(--ink-soft); }
.arrival__maps { margin: 1.4rem 0 0; }

/* ------------------------------------------------------------- attrazioni -- */

.attractions { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.attractions__row {
  display: grid; grid-template-columns: 1.5fr 1fr auto auto; gap: .9rem; align-items: center;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: .75rem 1rem; box-shadow: var(--shadow-sm);
}
.attractions__name { font-family: var(--serif); font-weight: 600; }
.attractions__how { color: var(--ink-soft); font-size: .88rem; }
.attractions__time { font-weight: 600; white-space: nowrap; }
.attractions__badge {
  background: #e8f1e9; color: #3d6a45; font-size: .74rem; font-weight: 600;
  border-radius: 999px; padding: .15rem .6rem; white-space: nowrap; text-align: center;
}
.attractions__badge--cambio { background: var(--rose-soft); color: #8c4f57; }
.attractions__note { margin: 1.2rem 0 0; font-size: .88rem; color: var(--ink-soft); }

@media (max-width: 760px) {
  .attractions__row { grid-template-columns: 1fr auto; row-gap: .35rem; }
  .attractions__name { grid-column: 1; grid-row: 1; }
  .attractions__time { grid-column: 2; grid-row: 1; }
  .attractions__how { grid-column: 1 / -1; grid-row: 2; }
  .attractions__badge { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
}

/* ------------------------------------------------------------------ faq -- */

.faq__grid {
  display: grid; gap: 1rem; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.faq__item {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm);
}
.faq__q { margin: 0 0 .45rem; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }
.faq__a { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* --------------------------------------------------------------- contact -- */

.contact__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 4vw, 3rem); align-items: start; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.3rem, 3vw, 2rem); box-shadow: var(--shadow-sm);
}

.form { display: grid; gap: 1rem; }
.form__row { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.field { display: grid; gap: .35rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: .95rem; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .7rem .8rem; width: 100%;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--navy); background: #fff;
}
.field--check { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; color: var(--ink-soft); }
.field--check input { width: auto; margin-top: .25rem; }
.field--check label { font-weight: 400; color: inherit; }
.hp { position: absolute; left: -9999px; }

.form__msg { border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .92rem; margin: 0; }
.form__msg--ok { background: #e8f6ee; color: #14603a; }
.form__msg--err { background: #fdecec; color: #8d2222; }
.form__msg[hidden] { display: none; }

.contact__aside { display: grid; gap: 1rem; }
.wa-card { background: var(--navy); color: #e9edf4; border: 0; }
.wa-card h3 { color: #fff; }
.wa-card p { color: #c3cbdb; font-size: .93rem; }
.wa-list { display: grid; gap: .6rem; margin-top: 1.1rem; }

/* ---------------------------------------------------------------- footer -- */

.site-footer { background: var(--navy); color: #c3cbdb; padding: 3rem 0 2rem; font-size: .9rem; }
.site-footer a { color: #fff; }
.site-footer__grid { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; }
.site-footer__brand { font-family: var(--serif); font-size: 1.3rem; color: #fff; margin: 0 0 .3rem; }
.site-footer__meta { text-align: right; }
.site-footer__note { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .82rem; color: #97a2b5; }

/* -------------------------------------------------------------- reveal --- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------ responsive -- */

/* Le voci di menu sono otto: sotto i 1240 px non stanno su una riga in tutte le
   lingue (il francese è il più lungo e ha bisogno di circa 1200 px), quindi la
   navigazione diventa un menu a tendina. */
@media (max-width: 1240px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: .2rem;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1.25rem; box-shadow: var(--shadow-md);
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: .2rem; }
  .nav__list a { display: block; padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .nav .lang-switch { width: 100%; padding-top: .9rem; border-top: 1px solid var(--line); }
  .site-header__inner { gap: .75rem; }
}

@media (max-width: 900px) {
  .hero__grid, .about__grid, .location__grid, .contact__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .hero__media img { aspect-ratio: 4 / 3; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .brand { font-size: 1.08rem; }
  .form__row { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .site-footer__grid { flex-direction: column; }
  .site-footer__meta { text-align: left; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .tile:hover { transform: none; }
}

@media print {
  .site-header, .lightbox, .contact__aside, .hero__cta { display: none; }
}
