/* Casa Melozzo — palette lifted from the flat itself:
   white gloss + slate worktop, orange bench, lime bedroom wall, red chairs */
:root {
  --ink: #22211f;
  --ink-soft: #5c5a55;
  --paper: #ffffff;
  --smoke: #f5f3ef;
  --line: #e6e2da;
  --orange: #e8720c;   /* entrance bench */
  --lime: #97a410;     /* bedroom wall */
  --red: #d23b34;      /* chairs & pillows */
  --slate: #47555e;    /* kitchen worktop */
  --display: "Archivo Black", "Archivo", sans-serif;
  --body: "Archivo", sans-serif;
  --mono: "IBM Plex Mono", monospace;
  --maxw: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--display);
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: .01em;
  white-space: nowrap;
}
.topnav { display: flex; gap: 1.4rem; margin-inline: auto; }
.topnav a {
  text-decoration: none; font-size: .92rem; font-weight: 500;
  color: var(--ink-soft);
}
.topnav a:hover { color: var(--ink); }
.topbar-right { display: flex; align-items: center; gap: .8rem; }
.lang-toggle {
  font-family: var(--mono); font-size: .8rem; font-weight: 500;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  padding: .35rem .7rem; cursor: pointer; color: var(--ink-soft);
  appearance: none; -webkit-appearance: none; max-width: 7.5rem;
}
.lang-toggle:hover { border-color: var(--ink); color: var(--ink); }
[dir="rtl"] .eyebrow { letter-spacing: 0; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; text-align: center;
  font-weight: 600; font-size: 1rem;
  padding: .85rem 1.6rem; border-radius: 10px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 2px 10px rgba(232,114,12,.35); }
.btn-ghost { border: 1.5px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: .5rem 1.1rem; font-size: .9rem; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(340px, 44%) 1fr;
  min-height: min(88vh, 760px);
  border-bottom: 1px solid var(--line);
}
.hero-copy {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(2rem, 5vw, 4.5rem);
  gap: 1.4rem;
}
.eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--orange); font-weight: 500;
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.01em;
}
.hero-sub { font-size: 1.1rem; color: var(--ink-soft); max-width: 34rem; }
.rating-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.rating-badge {
  display: flex; flex-direction: column; text-decoration: none;
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: .6rem 1rem; min-width: 10.5rem;
}
.rating-badge:hover { border-color: var(--ink); }
.rating-num { font-family: var(--display); font-size: 1.25rem; }
.rating-src { font-size: .78rem; color: var(--ink-soft); }
.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }
.hero-photo { position: relative; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-link {
  position: absolute; right: 1.2rem; bottom: 1.2rem;
  font-family: var(--body); font-weight: 600; font-size: .9rem;
  background: rgba(255,255,255,.94); color: var(--ink);
  border: none; border-radius: 999px; padding: .6rem 1.2rem; cursor: pointer;
}

/* ---------- stats ---------- */
.stats {
  display: flex; flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.stat {
  flex: 1 1 120px;
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: 1.3rem .8rem;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: none; }
.stat strong { font-family: var(--display); font-size: 1.5rem; }
.stat span { font-size: .82rem; color: var(--ink-soft); }
.stat-hl { background: var(--smoke); }
.stat-hl strong { color: var(--orange); }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) clamp(1rem, 4vw, 2.5rem); max-width: var(--maxw); margin: 0 auto; }
.section-tinted {
  max-width: none;
  background: var(--smoke);
}
.section-tinted > * { max-width: var(--maxw); margin-inline: auto; }
.section-head { margin-bottom: 2.2rem; }
.section h2 {
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  letter-spacing: -.01em;
  margin-bottom: .6rem;
}
.section-sub { color: var(--ink-soft); max-width: 44rem; font-size: 1.05rem; }

/* ---------- gallery ---------- */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.filter {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--body); font-weight: 600; font-size: .9rem;
  padding: .5rem 1.05rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-soft);
}
.filter .dot { width: .6rem; height: .6rem; border-radius: 50%; }
.filter[aria-selected="true"] { border-color: var(--ink); color: var(--ink); background: var(--smoke); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .7rem;
}
.grid button {
  border: none; padding: 0; cursor: pointer; background: var(--smoke);
  border-radius: 10px; overflow: hidden; position: relative;
  aspect-ratio: 4 / 3;
}
.grid button img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.grid button:hover img { transform: scale(1.035); }
.grid .ph-tag {
  position: absolute; left: .6rem; bottom: .6rem;
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  background: rgba(255,255,255,.92); border-radius: 999px; padding: .22rem .6rem;
  display: inline-flex; align-items: center; gap: .4rem;
}
.ph-tag .dot { width: .5rem; height: .5rem; border-radius: 50%; }
.grid button.hidden { display: none; }

/* ---------- reviews ---------- */
.review-badges { display: flex; gap: .8rem; flex-wrap: wrap; margin-bottom: 2rem; }
.big-badge {
  flex: 1 1 220px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.1rem 1.3rem;
  display: flex; flex-direction: column; gap: .15rem;
}
.big-badge-num { font-family: var(--display); font-size: 1.9rem; }
.big-badge-num small { font-size: 1rem; color: var(--ink-soft); font-family: var(--body); font-weight: 600; }
.big-badge-label { font-size: .85rem; color: var(--ink-soft); }
.review-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: .9rem;
}
.review-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.3rem 1.4rem;
  display: flex; flex-direction: column; gap: .8rem;
}
.review-card blockquote { font-size: .98rem; }
.review-card blockquote strong { background: #fdeeda; }
.review-meta { display: flex; align-items: baseline; gap: .6rem; margin-top: auto; }
.review-name { font-weight: 700; font-size: .92rem; }
.review-src { font-family: var(--mono); font-size: .72rem; color: var(--ink-soft); }
.review-stars { color: var(--orange); font-size: .85rem; letter-spacing: .1em; }
.review-links { margin-top: 1.6rem; color: var(--ink-soft); font-size: .95rem; }
.review-links a { font-weight: 600; }

/* ---------- match days ---------- */
.match-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: .9rem;
}
.match-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem;
}
.match-num {
  font-family: var(--display); font-size: 2.4rem; line-height: 1;
  color: var(--orange); margin-bottom: .9rem;
}
.match-num span { font-size: 1rem; margin-left: .2rem; }
.match-card:nth-child(2) .match-num { color: var(--slate); }
.match-card:nth-child(3) .match-num { color: var(--lime); }
.match-card:nth-child(4) .match-num { color: var(--red); }
.match-card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.match-card p:not(.match-num) { font-size: .95rem; color: var(--ink-soft); }

/* ---------- the flat ---------- */
.house-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 4rem); }
.house-text h2 { margin-bottom: 1rem; }
.house-text p { margin-bottom: 1rem; color: var(--ink-soft); font-size: 1.02rem; }
.amenities {
  list-style: none;
  display: grid; grid-template-columns: 1fr 1fr; gap: .55rem .9rem;
  align-content: center;
}
.amenities li {
  display: flex; align-items: center; gap: .6rem;
  font-size: .95rem;
  padding: .55rem .2rem;
  border-bottom: 1px solid var(--line);
}
.amenities li .am-ico { font-size: 1.05rem; width: 1.5rem; text-align: center; }

/* ---------- location ---------- */
.loc-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); }
.map-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); min-height: 420px; background: var(--smoke); }
#map { position: absolute; inset: 0; }
.map-pin { display: flex; align-items: center; gap: .45rem; }
.map-pin-dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  border: 3px solid #fff; box-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.pin-casa .map-pin-dot { background: var(--orange); width: 20px; height: 20px; }
.pin-stadio .map-pin-dot { background: var(--slate); }
.map-pin-label {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; white-space: nowrap;
  background: #fff; color: var(--ink); border-radius: 999px; padding: .28rem .65rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.18);
}
.pin-casa .map-pin-label { background: var(--ink); color: #fff; }
.map-link {
  position: absolute; right: .9rem; bottom: .9rem;
  background: rgba(255,255,255,.94); font-size: .85rem; font-weight: 600;
  padding: .5rem 1rem; border-radius: 999px; text-decoration: none;
}
.distances { list-style: none; align-self: center; }
.distances li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .8rem .2rem; border-bottom: 1px solid var(--line);
  font-size: .98rem;
}
.distances .dist { font-family: var(--mono); font-size: .85rem; color: var(--ink-soft); white-space: nowrap; }
.distances li:first-child { font-weight: 700; }
.distances li:first-child .dist { color: var(--orange); font-weight: 500; }

/* ---------- practical ---------- */
.prac-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .9rem; }
.prac-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.3rem; }
.prac-card h3 { font-size: .8rem; font-family: var(--mono); font-weight: 500; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-soft); margin-bottom: .5rem; }
.prac-card p { font-size: .96rem; }

/* ---------- book ---------- */
.book { text-align: center; }
.book .section-sub { margin-inline: auto; }
.book-cols {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.4rem; text-align: left;
}
.req-form {
  border: 1.5px solid var(--line); border-radius: 16px;
  padding: clamp(1.2rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: 1rem;
}
.req-form h3 { font-size: 1.1rem; }
.req-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .8rem; }
.req-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.req-form input, .req-form select, .req-form textarea {
  font: inherit; font-weight: 400; color: var(--ink);
  padding: .6rem .7rem; border: 1.5px solid var(--line); border-radius: 8px; background: var(--paper);
}
.req-form input:focus, .req-form select:focus, .req-form textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--orange); }
.req-form .hp { position: absolute; left: -9999px; height: 0; width: 0; padding: 0; border: 0; }
.req-submit { align-self: flex-start; }
.req-note { font-size: .8rem; color: var(--ink-soft); font-weight: 400; }
.req-status { font-weight: 700; color: var(--lime); min-height: 1.2em; }
.book-side { display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.book-side-label { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
.book-btns { display: flex; flex-direction: column; gap: 1rem; }
.btn-book {
  display: flex; flex-direction: column; gap: .15rem;
  padding: 1.1rem 2rem; border-radius: 14px;
  color: #fff; font-size: 1.08rem;
}
.btn-book small { font-weight: 500; font-size: .8rem; opacity: .85; }
.btn-airbnb { background: #e00b41; }
.btn-booking { background: #003b95; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 5.5rem;
  text-align: center; font-size: .9rem; color: var(--ink-soft);
}
.footer .brand-name { font-family: var(--display); color: var(--ink); }
.footer-fine { font-size: .75rem; margin-top: .4rem; }

/* ---------- sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
}
.sticky-rating { font-family: var(--display); font-size: 1rem; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: #141311;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { max-width: min(92vw, 1400px); max-height: 88vh; display: flex; flex-direction: column; gap: .8rem; }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: #d8d5cf; font-size: .9rem; display: flex; justify-content: space-between; gap: 1rem; }
.lightbox figcaption #lbCount { font-family: var(--mono); font-size: .8rem; }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: none; color: #fff;
  font-size: 2.4rem; cursor: pointer; line-height: 1; padding: .8rem;
  opacity: .8;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { opacity: 1; }
.lb-close { top: .8rem; right: 1.2rem; }
.lb-prev { left: .6rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .6rem; top: 50%; transform: translateY(-50%); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .topnav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-photo { order: -1; height: 46vh; }
  .hero-photo-link { display: none; }
  .house-cols, .loc-cols, .book-cols { grid-template-columns: 1fr; }
  .req-row { grid-template-columns: 1fr 1fr; }
  .amenities { grid-template-columns: 1fr 1fr; }
  .sticky-cta { display: flex; }
  .stat { flex: 1 1 33%; border-bottom: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .topbar .btn { display: none; } /* c'è già la CTA fissa in basso */
  .topbar { justify-content: space-between; }
  .grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .amenities { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1 1 100%; }
}
