/* ==============================================================
   VISTAMARE — Stile globale
   Palette: navy #0d2c4d · blu #1a6fa8 · azzurro #29b6f6
            sabbia #f5e6c8 · bianco #fff · testo #1a2535
   ============================================================== */

/* --- Variabili --- */
:root {
  --navy:       #0d2c4d;
  --blue:       #1a6fa8;
  --blue-mid:   #2196f3;
  --blue-light: #e3f2fd;
  --sand:       #f5e6c8;
  --sand-dark:  #c9a96e;
  --white:      #ffffff;
  --off-white:  #f7fafd;
  --text:       #1a2535;
  --muted:      #607080;
  --border:     #d9e8f3;

  --radius:    12px;
  --radius-lg: 20px;
  --shadow:    0 4px 20px rgba(13,44,77,.10);
  --shadow-lg: 0 8px 40px rgba(13,44,77,.18);
  --transition: .3s ease;

  --container: 1280px;
  --header-h: 64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
iframe { display: block; }

/* --- Tipografia --- */
h1 { font-size: clamp(1.9rem, 5vw, 3.4rem); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; line-height: 1.3; }
p  { font-size: 1rem; }

/* --- Layout --- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 48px);
}
.section        { padding-block: clamp(48px, 8vw, 96px); }
.section--alt   { background: var(--off-white); }
.section--sand  { background: var(--sand); }
.section--navy  { background: var(--navy); color: var(--white); }

/* --- Header --- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
#site-header.scrolled { box-shadow: var(--shadow); }
#site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Logo */
.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -.4px;
  flex-shrink: 0;
}
.logo span { color: var(--blue); }

/* Nav desktop */
#nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
#nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}
#nav ul a {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
#nav ul a:hover,
#nav ul a.active {
  color: var(--navy);
  background: var(--blue-light);
}
#nav .btn { margin-left: 8px; }

/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  margin-left: auto;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  min-width: 44px;
  min-height: 44px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Mobile nav */
@media (max-width: 920px) {
  .hamburger { display: flex; }
  #nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: calc(100dvh - var(--header-h));
    z-index: 99;
    background: rgba(255,255,255,.98);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 16px;
    gap: 8px;
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  #nav.open { transform: translateX(0); }
  #nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  #nav ul a {
    display: block;
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius);
  }
  #nav .btn { margin: 8px 0 0; padding: 1rem; font-size: 1rem; min-height: 52px; }
  body.nav-open { overflow: hidden; touch-action: none; }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-size: .92rem;
  font-weight: 600;
  min-height: 44px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(26,111,168,.32);
}
.btn-primary:hover { background: var(--navy); box-shadow: 0 6px 24px rgba(26,111,168,.42); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-white {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 4px 16px rgba(0,0,0,.14);
}
.btn-white:hover { background: var(--sand); }

/* --- Hero (home) --- */
.hero {
  position: relative;
  min-height: 88vh;
  min-height: 88dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--navy);
}
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.1s ease;
  will-change: opacity;
}
.hero__bg.active { opacity: 1; }
.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg,
    rgba(13,44,77,.72) 0%,
    rgba(13,44,77,.42) 50%,
    rgba(13,44,77,.18) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 24px clamp(16px, 6vw, 48px);
  max-width: 860px;
}
.hero__tag {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
  padding: .4rem 1.1rem;
  border-radius: 99px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(6px);
}
.hero h1 { margin-bottom: 16px; text-shadow: 0 2px 16px rgba(0,0,0,.3); }
.hero__sub {
  font-size: clamp(.95rem, 2vw, 1.25rem);
  font-weight: 400;
  opacity: .88;
  margin-bottom: 32px;
}
.hero__actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.4);
  color: #fff;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  transition: background var(--transition);
}
.hero__arrow:hover { background: rgba(255,255,255,.32); }
.hero__arrow--prev { left: 16px; }
.hero__arrow--next { right: 16px; }
.hero__dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 8px;
}
.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  border: 1.5px solid rgba(255,255,255,.6);
  transition: background var(--transition), transform var(--transition);
  min-width: 8px;
  min-height: 8px;
}
.hero__dot.active { background: #fff; transform: scale(1.35); }

/* --- Page hero (pagine interne) --- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding-block: clamp(48px, 9vw, 100px);
  text-align: center;
  color: #fff;
}
.page-hero h1 { margin-bottom: 14px; }
.page-hero p {
  font-size: 1.05rem;
  opacity: .82;
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: 24px;
}

/* --- Section headings --- */
.section-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 6px;
  display: block;
}
.section--navy .section-label { color: var(--sand); }
.section-title { margin-bottom: 10px; }
.section-lead {
  font-size: 1rem;
  color: var(--muted);
  max-width: 620px;
  line-height: 1.7;
}
.section--navy .section-lead { color: rgba(255,255,255,.72); }
.section-head { margin-bottom: clamp(28px, 5vw, 56px); }
.section-head--center { text-align: center; }
.section-head--center .section-lead { margin-inline: auto; }

/* --- Cards standard --- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
a.card, a.card * { color: inherit; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card__img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.card__placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--sand) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  text-align: center;
  padding: 16px;
}
.card__body { padding: 20px; flex: 1; }
.card__tag {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .9px;
  color: var(--blue);
  margin-bottom: 6px;
}
.card h3 { margin-bottom: 8px; }
.card p { font-size: .9rem; color: var(--muted); }
.card__meta {
  margin-top: 12px;
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.card__meta span::before { content: '·'; margin-right: 6px; }
.card__meta span:first-child::before { content: ''; margin: 0; }

/* --- Room detail cards --- */
.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(18px, 3vw, 28px);
}
.detail-card h3 { font-size: 1.15rem; margin-bottom: 4px; color: var(--navy); }
.detail-card .meta { color: var(--muted); font-size: .88rem; margin-bottom: 16px; }
.amenities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}
.amenities li {
  font-size: .85rem;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.amenities li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}
.detail-note {
  margin-top: 14px;
  font-size: .82rem;
  color: var(--muted);
  font-style: italic;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* Photo strip (miniature camere) */
.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
}
.photo-strip img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
}

/* --- Grids --- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 3vw, 32px); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 32px); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2.5vw, 24px); }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .amenities { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
}

/* --- Testo introduttivo (home) --- */
.intro {
  font-size: clamp(.98rem, 1.4vw, 1.1rem);
  line-height: 1.85;
  color: var(--text);
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
}
.intro p + p { margin-top: 1.4em; }

/* --- Mappa --- */
.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.map-wrap iframe {
  width: 100%;
  height: 280px;
  border: none;
}

/* --- Experience cards (esperienze) --- */
.exp-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  display: block;
  color: inherit;
}
.exp-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.exp-card__icon {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-light);
}
.exp-card__body { padding: 16px 18px; }
.exp-card h3 { font-size: .98rem; margin-bottom: 4px; color: var(--navy); }
.exp-card p { font-size: .84rem; color: var(--muted); }

/* --- Contatti --- */
.contact-link { color: var(--blue); }
.contact-link:hover { text-decoration: underline; }
.section--navy .contact-link { color: #7dd3fc; }

/* --- Policy --- */
.policy-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
}
.policy-block + .policy-block { margin-top: 16px; }
.policy-block h2 { font-size: 1.1rem; margin-bottom: 10px; color: var(--navy); }
.policy-block p,
.policy-block li { font-size: .9rem; line-height: 1.72; }
.policy-block ul { padding-left: 20px; }
.policy-block li { list-style: disc; margin-bottom: 4px; }

/* --- Autorizzazioni --- */
.cin-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.cin-card h3 { font-size: 1rem; margin-bottom: 12px; }
.cin-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cin-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }

/* --- Footer --- */
footer {
  background: var(--navy);
  color: rgba(255,255,255,.68);
  padding-block: 40px;
  font-size: .88rem;
}
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.footer-links a {
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
  font-size: .85rem;
}
.footer-links a:hover { color: #fff; }
.footer-copy { color: rgba(255,255,255,.45); font-size: .82rem; }

/* --- WhatsApp bubble --- */
.wa-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
}
.wa-panel {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 12px;
  min-width: 240px;
  display: none;
}
.wa-panel.open { display: block; }
.wa-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: background var(--transition);
  min-height: 44px;
}
.wa-link:last-child { margin-bottom: 0; }
.wa-link:hover { background: var(--blue-light); }
.wa-link-name { font-size: .88rem; font-weight: 600; display: block; color: var(--text); }
.wa-link-num  { font-size: .78rem; color: var(--muted); display: block; }
.wa-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  border-radius: 99px;
  padding: .7rem 1.2rem;
  font-weight: 600;
  font-size: .9rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.42);
  min-height: 44px;
  white-space: nowrap;
}

/* --- Modal prenotazione --- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13,44,77,.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  padding: clamp(20px, 4vw, 36px);
  position: relative;
}
.modal-box h2 { font-size: 1.3rem; margin-bottom: 16px; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  border: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.modal-close:hover { background: var(--border); }
.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.modal-tab {
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  color: var(--muted);
  transition: background var(--transition), color var(--transition);
  min-height: 44px;
}
.modal-tab.active { background: var(--blue-light); color: var(--blue); }
.modal-tab:hover:not(.active) { background: var(--off-white); }

/* --- Animazioni scroll --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .65s ease, transform .65s ease;
}
.fade-in.visible { opacity: 1; transform: none; }
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .2s; }
.delay-3 { transition-delay: .3s; }
.delay-4 { transition-delay: .4s; }

/* --- CTA centrale --- */
.cta-center { text-align: center; margin-top: clamp(24px, 4vw, 40px); }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--off-white); }
::-webkit-scrollbar-thumb { background: var(--blue-light); border-radius: 3px; }

/* --- Mobile touch targets & layout (≤480px) --- */
@media (max-width: 480px) {
  /* Bottoni: min-height 48px, font più grande, padding generoso */
  .btn {
    min-height: 48px;
    font-size: 1rem;
    padding: .9rem 1.8rem;
  }

  /* Hero: bottoni a piena larghezza e impilati */
  .hero__actions {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .hero__actions .btn {
    width: 100%;
    max-width: 320px;
  }

  /* Page-hero CTA */
  .page-hero .btn {
    width: 100%;
    max-width: 320px;
  }

  /* Bottone "Prenota ora" inline nel contenuto */
  .cta-center .btn {
    width: 100%;
    max-width: 300px;
  }

  /* WA button: area di tocco 52px, testo leggibile */
  .wa-btn {
    min-height: 52px;
    padding: .85rem 1.3rem;
    font-size: .95rem;
    gap: 10px;
  }

  /* WA panel: larghezza adattiva, non esce dallo schermo */
  .wa-panel {
    right: 0;
    min-width: min(280px, calc(100vw - 40px));
  }

  /* Bubble leggermente più vicina agli angoli */
  .wa-bubble {
    right: 14px;
    bottom: 14px;
  }

  /* Modal: padding ridotto, piena larghezza */
  .modal-box {
    padding: 20px 16px;
    border-radius: var(--radius);
  }
  .modal-tabs {
    gap: 6px;
  }
  .modal-tab {
    flex: 1;
    text-align: center;
    padding: .6rem .5rem;
    font-size: .82rem;
  }
}
