/* ============================================================
   CSS VARIABLES & RESET — Mobile-First
   ============================================================ */
:root {
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --color-bg: #F8F9FA;
  --color-primary: #C5A059;
  --color-primary-dark: #A8893E;
  --color-text: #1A1A1A;
  --color-text-light: #555555;
  --color-card-bg: #FFFFFF;
  --color-border: #E5E7EB;
  --color-airbnb: #FF385C;
  --color-airbnb-dark: #E0314F;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1DA851;
  --color-star: #F5A623;

  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.10);
  --shadow-nav: 0 4px 20px rgba(0, 0, 0, 0.06);

  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;

  --transition: all 0.3s ease;

  --max-width: 1200px;
  --touch-target: 44px; /* dimensione minima per i target touch */
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 1000;
  font-weight: 600;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 480px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

/* ============================================================
   TIPOGRAFIA
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

@media (max-width: 480px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.2rem; }
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(247, 244, 238, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-primary);
  box-shadow: none;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.navbar.scrolled {
  background: rgba(255, 254, 251, 0.98);
  box-shadow: 0 6px 24px rgba(26, 20, 12, 0.05);
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 4.75rem;
  padding: 0 0.85rem;
}
@media (min-width: 768px) {
  .nav-container {
    height: 5rem;
    padding: 0 1.35rem;
    gap: 1.15rem;
  }
}
@media (min-width: 1200px) {
  .nav-container {
    height: 5.5rem;
    padding: 0 0.35rem;
    gap: 1.75rem;
  }
}

/* Mobile-first lockup: portico beside a readable ROME / cityflats stack */
.logo {
  display: flex;
  align-items: center;
  color: var(--color-text);
  min-width: 0;
  flex: 1 1 auto;
  direction: ltr;
}
.logo-lockup {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  align-items: center;
  min-width: 0;
  line-height: 1;
}
.logo-mark {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: block;
  width: 2.95rem;
  height: 1.65rem;
  background: currentColor;
  color: var(--color-primary);
  -webkit-mask-image: url("images/brand/portico.svg");
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
  mask-image: url("images/brand/portico.svg");
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  mask-mode: alpha;
}
.logo-rome {
  grid-column: 2;
  grid-row: 1;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--color-primary);
  line-height: 1;
  margin: 0 -0.26em 0 0;
  align-self: end;
}
.logo-rest {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 500;
  color: #1A1A1A;
  letter-spacing: 0.02em;
  line-height: 1;
  margin: 0.12rem 0 0;
  padding-top: 0.18rem;
  border-top: 1px solid var(--color-primary);
}
@media (min-width: 768px) {
  .logo {
    flex: 0 0 auto;
  }
  .logo-lockup {
    column-gap: 0.7rem;
  }
  .logo-mark {
    width: 3.35rem;
    height: 1.85rem;
  }
  .logo-rome {
    font-size: 0.98rem;
    letter-spacing: 0.28em;
    margin-right: -0.28em;
  }
  .logo-rest {
    font-size: 1.72rem;
  }
}
@media (min-width: 1200px) {
  .logo {
    flex: 0 0 auto;
  }
  .logo-lockup {
    column-gap: 0.8rem;
  }
  .logo-mark {
    width: 3.7rem;
    height: 2.05rem;
  }
  .logo-rome {
    font-size: 1.08rem;
    letter-spacing: 0.3em;
    margin-right: -0.3em;
  }
  .logo-rest {
    font-size: 1.95rem;
  }
  .nav-links {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.nav-links ul {
  display: flex;
  gap: 1.15rem;
}
@media (min-width: 1200px) {
  .nav-links ul {
    width: 100%;
    justify-content: space-evenly;
    gap: 0.75rem;
  }
}
.nav-links a {
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: #3a332c;
  position: relative;
  padding: 0.25rem 0.15rem;
  transition: color 0.25s ease;
  min-height: var(--touch-target);
  display: inline-flex;
  align-items: center;
}
@media (min-width: 1200px) {
  .nav-links a {
    font-size: 1rem;
  }
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0.15rem;
  right: 0.15rem;
  bottom: 0.15rem;
  width: auto;
  height: 1px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--color-primary);
}
.nav-links a:hover::after,
.nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.nav-cta {
  display: none;
  background: transparent;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--color-primary);
  border-radius: 2px;
  min-height: var(--touch-target);
  align-items: center;
  justify-content: center;
  box-shadow: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--color-primary);
  color: #fff;
  box-shadow: none;
}
@media (min-width: 1200px) {
  .nav-cta {
    display: inline-flex;
  }
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  z-index: 1102;
  flex-shrink: 0;
  min-width: var(--touch-target);
  min-height: var(--touch-target);
  align-items: center;
  justify-content: center;
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #3a332c;
  border-radius: 0;
  transition: var(--transition);
  transform-origin: center;
}
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #121014;
  color: #fff;
  text-align: center;
  overflow: hidden;
  padding: 2rem 0;
}
@media (min-width: 768px) {
  .hero {
    min-height: 85vh;
  }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.35) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 750px;
  padding: 1.5rem 1rem;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.1);
  padding: 0.4rem 1rem;
  border-radius: 50px;
  backdrop-filter: blur(4px);
}
.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  line-height: 1.2;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.hero-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 1.8rem;
  line-height: 1.7;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}
@media (min-width: 480px) {
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* ============================================================
   BOTTONI
   ============================================================ */
.btn,
.btn-book-now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  letter-spacing: 0.3px;
  min-height: var(--touch-target);
  text-align: center;
  width: auto;
}
.btn-book-now {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: #fff;
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
  width: 100%;
  margin-top: 0.5rem;
}
.btn-book-now:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(46, 204, 113, 0.6);
  color: #fff;
}
.btn-book-now:active {
  transform: scale(0.96);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(197, 160, 89, 0.35);
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(197, 160, 89, 0.5);
}
.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.btn-airbnb {
  background: var(--color-airbnb);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 56, 92, 0.3);
  justify-content: center;
  width: 100%;
  margin-top: 0.5rem;
}
.btn-airbnb:hover,
.btn-airbnb:focus-visible {
  background: var(--color-airbnb-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(255, 56, 92, 0.45);
}
.btn-airbnb:active {
  transform: scale(0.96);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  min-height: var(--touch-target);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: rgba(197, 160, 89, 0.04);
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
  min-height: var(--touch-target);
}
.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background: var(--color-whatsapp-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
}
.btn-whatsapp:active {
  transform: scale(0.96);
}

/* ============================================================
   SEZIONI COMUNI
   ============================================================ */
.section {
  padding: 3rem 0;
}
@media (min-width: 768px) {
  .section {
    padding: 5rem 0;
  }
}
.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
  background: rgba(197, 160, 89, 0.08);
  padding: 0.3rem 1rem;
  border-radius: 50px;
}
.section-header h2 {
  margin-bottom: 0.75rem;
}
.section-header p {
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
}

/* ============================================================
   GRIGLIA APPARTAMENTI
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}
@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.apartment-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
  display: flex;
  flex-direction: column;
}
@media (hover: hover) and (pointer: fine) {
  .apartment-card:hover {
    box-shadow: var(--shadow-card-hover);
  }
}
.apartment-card:active {
  transform: scale(0.96);
  transition: transform 0.08s ease;
}
.card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}
.card-image-wrapper img {
  width: 100%;
  height: 130%;
  object-fit: cover;
  will-change: transform;
}
.zone-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex: 1;
}
.card-body h3 {
  font-size: 1.2rem;
  margin: 0;
}
.card-body h3 a {
  color: var(--color-text);
  transition: var(--transition);
}
.card-body h3 a:hover {
  color: var(--color-primary);
}
.card-occupancy {
  color: var(--color-text-light);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
/* Nuovo stile per il codice CIN */
.cin-code {
  font-size: 0.85rem;
  color: #777;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.2rem 0;
}
.cin-code i {
  color: var(--color-primary);
}
.cin-note {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #666;
  margin: 0.15rem 0 0.65rem;
  max-width: 40rem;
}
.cin-note a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.apartment-card .cin-note {
  font-size: 0.75rem;
  margin: 0.1rem 0 0.45rem;
}
.legal-wrap {
  max-width: 42rem;
  margin: 5.5rem auto 4rem;
  padding: 0 1.25rem 3rem;
}
.legal-wrap h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.legal-wrap .legal-updated {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.legal-wrap h2 {
  font-size: 1.2rem;
  margin: 1.75rem 0 0.6rem;
}
.legal-wrap p,
.legal-wrap li {
  line-height: 1.65;
  color: #444;
}
.legal-wrap ul {
  padding-left: 1.2rem;
}
.services-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0.3rem 0;
}
.service-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
}
.service-item i {
  color: var(--color-primary);
  font-size: 0.95rem;
  width: 1.2rem;
  text-align: center;
}
.card-body .btn-airbnb,
.card-body .btn-book-now {
  margin-top: auto;
  align-self: stretch;
  width: 100%;
}

/* ============================================================
   WHY BOOK DIRECTLY
   ============================================================ */
.why-book-directly {
  background: #fff;
  padding: 3rem 0;
}
@media (min-width: 768px) {
  .why-book-directly {
    padding: 5rem 0;
  }
}
.why-book-directly .section-header p {
  max-width: 700px;
}
.safety-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
@media (min-width: 600px) {
  .safety-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}
@media (min-width: 1024px) {
  .safety-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.safety-item {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.safety-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}
.safety-item i {
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 0.8rem;
}
.safety-item h4 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}
.safety-item p {
  color: var(--color-text-light);
  font-size: 0.9rem;
  line-height: 1.6;
}
.official-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* ============================================================
   POSIZIONE (Mappa + Pannello Zone)
   ============================================================ */
.posizione {
  background: #fff;
}
.location-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 768px) {
  .location-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

.map-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  height: 100%;
  min-height: 300px; /* garantisce che la mappa sia visibile anche su mobile */
}

#map {
  height: 100%;
  min-height: 350px;
  width: 100%;
}
@media (max-width: 767px) {
  #map {
    min-height: 280px;
  }
  .map-wrapper {
    min-height: 280px;
  }
  .zones-panel {
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
}

.zones-panel {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  max-height: none; /* su mobile nessun limite, scroll della pagina */
  overflow-y: visible;
}
@media (min-width: 768px) {
  .zones-panel {
    max-height: 500px;
    overflow-y: auto;
  }
}

.zones-panel h3 {
  font-family: var(--font-heading);
  margin-bottom: 1rem;
  font-size: 1.2rem;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
}

.zone-group {
  margin-bottom: 1.2rem;
}

.zone-title {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s;
  min-height: var(--touch-target);
}
.zone-title:hover {
  color: var(--color-primary);
}

.zone-group ul {
  padding-left: 1.2rem;
}

.zone-apartment {
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--color-border);
  cursor: pointer;
  transition: background 0.2s;
}
.zone-apartment:hover {
  background: rgba(197, 160, 89, 0.05);
}
.zone-link {
  display: block;
  color: inherit;
}
.zone-link strong {
  display: block;
  color: var(--color-text);
  font-size: 0.95rem;
}
.zone-apartment span {
  font-size: 0.8rem;
  color: var(--color-text-light);
}
.zone-apartment .distances {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.78rem;
  color: #777;
}
.zone-apartment .distances i {
  margin-right: 0.2rem;
  color: var(--color-primary);
}

/* ============================================================
   RECENSIONI
   ============================================================ */
.recensioni {
  background: var(--color-bg);
}
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}
@media (min-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.testimonial-card {
  background: var(--color-card-bg);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.testimonial-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.stars {
  color: var(--color-star);
  font-size: 0.9rem;
  letter-spacing: 2px;
}
.testimonial-card blockquote p {
  font-style: italic;
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  position: relative;
  padding-left: 0.8rem;
  border-left: 3px solid var(--color-primary);
}
.testimonial-card cite {
  font-style: normal;
  font-size: 0.85rem;
  color: var(--color-text);
}
.testimonial-card cite span {
  color: var(--color-text-light);
}

/* ============================================================
   CONTATTI CTA
   ============================================================ */
.contatti-cta {
  background: #fff;
}
.cta-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-card);
}
@media (min-width: 768px) {
  .cta-card {
    padding: 3rem 2rem;
  }
}
.cta-card h2 {
  margin-bottom: 0.75rem;
}
.cta-card p {
  color: var(--color-text-light);
  max-width: 550px;
  margin: 0 auto 1.5rem auto;
  font-size: 0.95rem;
}
.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
}
.cta-buttons .btn {
  min-width: 200px;
  flex: 1 1 auto;
  max-width: 300px;
}
@media (max-width: 480px) {
  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-buttons .btn {
    width: 100%;
    max-width: none;
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.8);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1.5fr;
  }
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-heading);
  margin-bottom: 0.8rem;
  font-size: 1.2rem;
}
.footer-col p {
  font-size: 0.85rem;
  line-height: 1.7;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer-col li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}
.footer-col a {
  color: rgba(255,255,255,0.75);
  transition: var(--transition);
}
.footer-col a:hover {
  color: var(--color-primary);
}
.footer-col i {
  color: var(--color-primary);
  width: 1.2rem;
  text-align: center;
  font-size: 0.9rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
}
.footer-bottom a {
  color: rgba(255,255,255,0.65);
  text-decoration: underline;
  transition: var(--transition);
}
.footer-bottom a:hover {
  color: var(--color-primary);
}

/* ============================================================
   RESPONSIVE NAVBAR MOBILE
   ============================================================ */
@media (max-width: 1199px) {
  .mobile-menu-toggle {
    display: flex;
    flex-shrink: 0;
    background: transparent;
    border-radius: 0;
    border: none;
  }
  .nav-cta {
    display: none !important;
  }
  .nav-links {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    height: 100dvh;
    background: rgba(8, 8, 10, 0.78);
    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
    padding: 0;
    z-index: 1100;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }
  .nav-links.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links ul {
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
  }
  .nav-links a {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 7vw, 2.4rem);
    color: #fff;
    padding: 0.7rem 1rem;
    min-height: 52px;
    display: inline-flex;
  }
  .nav-links a::after { display: none; }
}

/* ============================================================
   EXTRA FIX PER ACCESSIBILITÀ E FOCUS
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

/* ============================================================
   PAGINA SINGOLO APPARTAMENTO
   ============================================================ */
.apartment-gallery {
  padding-top: 1.5rem;
  padding-bottom: 1rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: 2fr 1fr;
    max-height: 450px;
  }
}
.gallery-grid .main-photo {
  width: 100%;
  height: 250px;
  object-fit: cover;
}
@media (min-width: 768px) {
  .gallery-grid .main-photo {
    height: 100%;
  }
}
.secondary-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .secondary-photos {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
}
.secondary-photos img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}
@media (min-width: 768px) {
  .secondary-photos img {
    height: 100%;
  }
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .details-grid {
    grid-template-columns: 1fr 320px;
    gap: 3rem;
  }
}

.occupancy {
  font-size: 1rem;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1.2rem;
}

.services-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
}

.service-badge {
  background: rgba(197, 160, 89, 0.1);
  color: var(--color-primary-dark);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.service-badge i {
  font-size: 0.9rem;
}

.details-main h2 {
  margin: 1.5rem 0 0.8rem;
  font-size: 1.4rem;
}
.details-main p {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.distance-list {
  list-style: none;
  padding: 0;
}
.distance-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed var(--color-border);
  font-size: 0.9rem;
}
.distance-list li i {
  color: var(--color-primary);
  width: 1.4rem;
  text-align: center;
}

.booking-sidebar {
  position: static;
}
@media (min-width: 1024px) {
  .booking-sidebar {
    position: sticky;
    top: 5rem;
  }
}

.booking-card {
  background: var(--color-card-bg);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.booking-card .price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.booking-card .price span {
  font-size: 0.9rem;
  color: var(--color-text-light);
}
.booking-card .btn-airbnb {
  width: 100%;
  margin: 1rem 0;
}
.booking-card .small {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

.simple-footer {
  background: var(--color-text);
  color: #fff;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem;
}
.simple-footer a {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ============================================================
   APARTMENT FAQ + LOCAL TIPS
   ============================================================ */
.apartment-faq {
  background: var(--color-bg);
  padding: 4rem 0 5rem;
  border-top: 1px solid var(--color-border);
}
.apartment-faq .section-header {
  text-align: center;
  margin-bottom: 0;
}
.apartment-faq .faq-list {
  max-width: 860px;
  margin: 2rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.apartment-faq .faq-list details,
.apartment-faq .faq-item {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 0;
  overflow: hidden;
}
.apartment-faq .faq-list summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1.15rem 1.4rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--color-text);
}
.apartment-faq .faq-list summary::-webkit-details-marker {
  display: none;
}
.apartment-faq .faq-list summary::after {
  content: '\f078';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: var(--color-primary);
  font-size: 0.85rem;
  flex-shrink: 0;
}
.apartment-faq .faq-list details[open] summary::after {
  content: '\f077';
}
.apartment-faq .faq-answer {
  padding: 0 1.4rem 1.25rem;
}
.apartment-faq .faq-answer p {
  color: var(--color-text-light);
  line-height: 1.7;
  font-size: 0.98rem;
  margin-bottom: 0.75rem;
}
.apartment-faq .faq-answer p:last-child {
  margin-bottom: 0;
}

.local-tips {
  max-width: 960px;
  margin: 3rem auto 0;
}
.local-tips > h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}
.local-tips > .tips-intro {
  text-align: center;
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 auto 1.75rem;
  line-height: 1.65;
}
.restaurant-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 640px) {
  .restaurant-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1024px) {
  .restaurant-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
.restaurant-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  transition: var(--transition);
}
.restaurant-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.restaurant-card h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--color-text);
  margin: 0;
}
.restaurant-type {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}
.restaurant-card p {
  color: var(--color-text-light);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}
.restaurant-address {
  font-size: 0.88rem !important;
  color: var(--color-text) !important;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}
.restaurant-address i {
  color: var(--color-primary);
  margin-top: 0.2rem;
  flex-shrink: 0;
}
.maps-link {
  margin-top: auto;
  padding-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.maps-link:hover {
  color: var(--color-primary);
}

/* ============================================================
   ULTRA-RESPONSIVE FINE-TUNING
   ============================================================ */
@media (max-width: 480px) {
  .container {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }
  .section {
    padding: 2.5rem 0;
  }
  .section-header {
    margin-bottom: 2rem;
  }
  .card-body {
    padding: 1rem;
  }
  .card-body h3 {
    font-size: 1.1rem;
  }
  .hero-content {
    padding: 1rem;
  }
  .hero-eyebrow {
    font-size: 0.7rem;
    padding: 0.3rem 0.8rem;
  }
  .btn,
  .btn-book-now {
    padding: 0.75rem 1.2rem;
    font-size: 0.9rem;
  }
  .safety-item {
    padding: 1.2rem;
  }
  .safety-item i {
    font-size: 1.8rem;
  }
  .zones-panel {
    padding: 1rem;
  }
  .testimonial-card {
    padding: 1.2rem;
  }
  .cta-card {
    padding: 1.8rem 1rem;
  }
  .footer-col h4 {
    font-size: 1.1rem;
  }
  .gallery-grid .main-photo {
    height: 200px;
  }
  .secondary-photos img {
    height: 100px;
  }
}

/* ============================================================
   LANGUAGE SWITCHER + i18n FOUC guard + CJK / Arabic
   ============================================================ */
html[data-lang]:not([data-lang="en"]):not(.i18n-ready) body {
  visibility: hidden;
}
html[data-lang="zh"] {
  --font-heading: 'Noto Serif SC', 'Playfair Display', serif;
  --font-body: 'Noto Sans SC', 'Inter', sans-serif;
}
html[data-lang="ar"] {
  --font-heading: 'Noto Naskh Arabic', 'Playfair Display', serif;
  --font-body: 'Noto Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}
html[data-lang="zh"] h1,
html[data-lang="zh"] h2,
html[data-lang="zh"] h3 {
  letter-spacing: 0;
}
html[data-lang="zh"] .restaurant-type,
html[data-lang="ar"] .restaurant-type {
  text-transform: none;
  letter-spacing: 0;
}
.cin-code,
.price,
.cta-price strong {
  unicode-bidi: isolate;
  direction: ltr;
}
html[dir="rtl"] .skip-link {
  left: auto;
  right: 0;
}
html[dir="rtl"] .nav-links a::after {
  transform-origin: right;
}
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-inline-start: 0.35rem;
  direction: ltr;
}
.coming-soon-body .navbar {
  border-bottom-color: var(--color-primary);
}
.coming-soon-body .logo-mark,
.coming-soon-body .logo-rome {
  color: var(--color-primary);
}
.coming-soon-body .logo-rest {
  color: #f4efe4;
}

.lang-switch-select {
  min-width: 5.5rem;
  min-height: 44px;
  padding: 0 1.6rem 0 0.15rem;
  border: none;
  border-bottom: 1px solid var(--color-primary);
  border-radius: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C5A059' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.15rem center;
  background-size: 10px 6px;
  color: var(--color-primary);
  font-weight: 600;
  letter-spacing: 0.08em;
  font-size: 0.84rem;
  font-family: var(--font-body);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.lang-switch-select:hover,
.lang-switch-select:focus-visible {
  border-color: var(--color-primary);
  outline: none;
}
.coming-soon-body .lang-switch-select {
  color: var(--soon-gold, #C5A059);
  border: none;
  border-bottom: 1px solid var(--color-primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C5A059' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}
@media (max-width: 767px) {
  .nav-container .lang-switch {
    margin-inline-start: 0.15rem;
    margin-inline-end: 0.1rem;
  }
}
html[dir="rtl"] .testimonial-card blockquote p {
  padding-left: 0;
  padding-right: 0.8rem;
  border-left: 0;
  border-right: 3px solid var(--color-primary);
}
html[dir="rtl"] .note-highlight {
  border-left: 0 !important;
  border-right: 4px solid #2ecc71;
}
html[dir="rtl"] .btn-outline .fa-arrow-left {
  transform: scaleX(-1);
}
html[dir="rtl"] .price-notification {
  right: auto !important;
  left: 20px;
}

/* ============================================================
   MOBILE-FIRST: header, hero, form, listing chrome
   ============================================================ */
@media (max-width: 767px) {
  .nav-container {
    padding-inline: 0.7rem;
    height: 4.75rem;
  }
  .nav-container.container {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }
  .logo {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }
  .logo-lockup {
    min-width: 0;
  }
  .lang-switch {
    margin-inline-start: 0;
    flex-shrink: 0;
  }
  .lang-switch-select {
    min-width: 3.9rem;
    width: auto;
    max-width: 5.2rem;
    min-height: 44px;
    padding: 0 1.35rem 0 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
  }
  .legal-wrap {
    margin-top: 4.75rem;
    padding: 0 1rem calc(2.5rem + env(safe-area-inset-bottom, 0px));
  }
  .legal-wrap h1 {
    font-size: 1.65rem;
    overflow-wrap: anywhere;
  }
  .apartment-gallery {
    padding-top: 1rem;
    padding-bottom: 0.75rem;
  }
  html[dir="rtl"] .logo {
    max-width: none;
  }
  .hero h1 {
    white-space: normal;
    max-width: 100%;
  }
  .mobile-menu-toggle {
    display: flex;
    flex-shrink: 0;
    background: transparent;
    border-radius: 0;
    border: none;
  }
  .navbar .btn-outline {
    flex: 0 1 auto;
    max-width: min(42vw, 9.75rem);
    padding: 0.4rem 0.55rem;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .navbar .btn-outline span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body:not([data-page="index"]) .navbar .btn-outline {
    max-width: min(38vw, 8.5rem);
  }
  .hero-content,
  .hero-content.container {
    max-width: 100%;
    width: 100%;
    padding: 0.75rem 0.85rem;
    box-sizing: border-box;
  }
  .hero-subtitle {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }
  .hero-trustline {
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
  }
  .details-main h1 {
    overflow-wrap: anywhere;
    font-size: 1.45rem;
  }
  .services-inline {
    gap: 0.4rem;
  }
  .service-badge {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
  }
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important;
  }
  .apartment-cta-bar {
    gap: 0.5rem;
    padding-inline: 0.75rem;
  }
  .apartment-cta-bar .cta-price small {
    letter-spacing: 0;
    text-transform: none;
    max-width: 12rem;
  }
  .apartment-cta-bar .cta-go {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }
  html[data-lang="zh"] .hero-eyebrow {
    letter-spacing: 0;
  }
  .stats-grid > *,
  .stat-item {
    min-width: 0;
  }
  .stat-label {
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
    padding-inline: 0.15rem;
  }
}

html[dir="rtl"] .hero,
html[dir="rtl"] .hero-content,
html[dir="rtl"] .hero-trustline {
  text-align: center;
}

html[data-lang="zh"] .hero h1,
html[data-lang="zh"] .hero-subtitle {
  word-break: break-word;
  overflow-wrap: anywhere;
}
