/* ==========================================================================
   Ponza Relax Mare — Stylesheet
   Palette: blu mare profondo, turchese, bianco, sabbia
   ========================================================================== */

:root {
  --c-deep:    #0a4d68;   /* mare profondo */
  --c-sea:     #088395;   /* turchese */
  --c-light:   #e6f4f7;   /* azzurro chiarissimo */
  --c-white:   #ffffff;
  --c-sand:    #f4e6c8;   /* sabbia */
  --c-sand-dk: #c9a96e;   /* sabbia scura/accento */
  --c-ink:     #1a2e3a;   /* testo principale */
  --c-mute:    #5a6b78;   /* testo secondario */
  --c-border:  #d8e3e8;

  --shadow-sm: 0 1px 2px rgba(10,77,104,.06), 0 2px 8px rgba(10,77,104,.06);
  --shadow-md: 0 4px 12px rgba(10,77,104,.10), 0 8px 24px rgba(10,77,104,.08);

  --radius:    10px;
  --radius-lg: 18px;

  --container: 1180px;

  --ff-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --ff-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--c-sea); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-deep); }

h1, h2, h3, h4 {
  font-family: var(--ff-serif);
  font-weight: 500;
  color: var(--c-deep);
  line-height: 1.2;
  margin: 0 0 .6em;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }
p  { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 80px 0; }
@media (max-width: 700px) { section { padding: 56px 0; } }

.eyebrow {
  display: inline-block;
  font-family: var(--ff-sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--c-sea);
  margin-bottom: 14px;
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head p { color: var(--c-mute); font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  color: var(--c-deep);
  font-weight: 600;
  letter-spacing: .02em;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-sea), var(--c-deep));
  display: grid; place-items: center;
  color: white;
  font-family: var(--ff-serif);
  font-weight: 600;
  font-size: 1rem;
  flex: none;
}
.nav-list {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-list a {
  color: var(--c-ink);
  font-weight: 500;
  font-size: .98rem;
  position: relative;
  padding: 6px 0;
}
.nav-list a:hover,
.nav-list a.active {
  color: var(--c-deep);
}
.nav-list a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--c-sand-dk);
  border-radius: 2px;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--c-deep);
  margin: 5px 0;
  border-radius: 2px;
  transition: .25s;
}
@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    transition: transform .3s ease;
  }
  .nav-list.open { transform: translateY(0); }
  .nav-list li { border-bottom: 1px solid var(--c-border); }
  .nav-list li:last-child { border-bottom: 0; }
  .nav-list a { display: block; padding: 14px 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: center;
  color: white;
  background:
    linear-gradient(135deg, rgba(10,77,104,.55), rgba(8,131,149,.35)),
    linear-gradient(180deg, var(--c-deep) 0%, var(--c-sea) 100%);
  overflow: hidden;
}
.hero.has-bg {
  background:
    linear-gradient(135deg, rgba(10,77,104,.55), rgba(8,131,149,.35)),
    var(--hero-bg, linear-gradient(180deg, var(--c-deep), var(--c-sea))) center/cover no-repeat;
}
.hero-inner { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 110px; }
.hero h1 { color: white; max-width: 18ch; }
.hero .lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  max-width: 56ch;
  color: rgba(255,255,255,.92);
  margin-bottom: 32px;
}
.hero .eyebrow { color: var(--c-sand); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }

/* mini hero (inner pages) */
.subhero {
  background: linear-gradient(135deg, var(--c-deep), var(--c-sea));
  color: white;
  padding: 80px 0 70px;
  text-align: center;
}
.subhero .eyebrow { color: var(--c-sand); }
.subhero h1 { color: white; margin-bottom: 12px; }
.subhero p { color: rgba(255,255,255,.85); max-width: 60ch; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: .01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary {
  background: var(--c-sand-dk);
  color: white;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: #b08e54;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,.6);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.12);
  color: white;
  border-color: white;
}
.btn-outline {
  background: white;
  color: var(--c-deep);
  border-color: var(--c-border);
}
.btn-outline:hover { border-color: var(--c-sea); color: var(--c-sea); }

/* ---------- Card grid ---------- */
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-img {
  display: block; /* importante quando .card-img è un <a> (anchor) */
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--c-light), var(--c-sand));
  position: relative;
  overflow: hidden;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img::after {
  content: attr(data-placeholder);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--c-deep);
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  letter-spacing: .05em;
  opacity: .55;
  pointer-events: none;
}
.card-img:has(img)::after { display: none; }
.card-body { padding: 24px 24px 28px; }
.card-body h3 { margin-bottom: 8px; }
.card-body p { color: var(--c-mute); font-size: .96rem; margin-bottom: 14px; }
.card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0; padding: 0;
}
.card-features li {
  font-size: .82rem;
  background: var(--c-light);
  color: var(--c-deep);
  padding: 4px 12px;
  border-radius: 999px;
}

/* ---------- Feature blocks (alternati testo/immagine) ---------- */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  margin-bottom: 80px;
}
.feature-row:last-child { margin-bottom: 0; }
.feature-row.reverse .feature-media { order: 2; }
.feature-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--c-light), var(--c-sand));
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-media::after {
  content: attr(data-placeholder);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--c-deep);
  font-family: var(--ff-serif);
  opacity: .5;
  pointer-events: none;
}
.feature-media:has(img)::after { display: none; }
@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; gap: 28px; margin-bottom: 56px; }
  .feature-row.reverse .feature-media { order: 0; }
}

/* ---------- Sezioni speciali ---------- */
.bg-light { background: var(--c-light); }
.bg-sand  { background: var(--c-sand); }
.bg-deep  { background: var(--c-deep); color: white; }
.bg-deep h1, .bg-deep h2, .bg-deep h3 { color: white; }
.bg-deep p { color: rgba(255,255,255,.9); }

.intro-text {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.1rem;
  color: var(--c-mute);
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 800px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .gallery { grid-template-columns: 1fr; } }
.gallery-item {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-light), var(--c-sand));
  position: relative;
  transition: transform .25s, box-shadow .25s;
}
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item::after {
  content: attr(data-placeholder);
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--c-deep);
  font-family: var(--ff-serif);
  opacity: .45;
  pointer-events: none;
  font-size: .95rem;
}
.gallery-item:has(img)::after { display: none; }
/* Anteprime galleria sempre quadrate uniformi (tall/wide neutralizzati) */
.gallery-item.tall { aspect-ratio: 1 / 1; }
.gallery-item.wide { aspect-ratio: 1 / 1; }

/* ---------- Lista (isola, info pratiche) ---------- */
.info-list {
  list-style: none;
  padding: 0; margin: 0;
}
.info-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--c-border);
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
}
.info-list li:last-child { border-bottom: 0; }
.info-list strong { color: var(--c-deep); font-weight: 600; }
@media (max-width: 600px) {
  .info-list li { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- CTA / Contatti box ---------- */
.contact-box {
  background: linear-gradient(135deg, var(--c-deep), var(--c-sea));
  color: white;
  padding: 56px 40px;
  border-radius: var(--radius-lg);
  text-align: center;
}
.contact-box h2 { color: white; }
.contact-box p { color: rgba(255,255,255,.92); max-width: 50ch; margin: 0 auto 28px; }
.contact-methods {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-deep);
  color: rgba(255,255,255,.85);
  padding: 56px 0 28px;
  font-size: .94rem;
}
.site-footer h4 {
  color: white;
  font-family: var(--ff-sans);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: var(--c-sand); }
.site-footer .brand { color: white; }
.site-footer .brand-mark { background: rgba(255,255,255,.12); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .85rem;
  color: rgba(255,255,255,.6);
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(37,211,102,.4);
  z-index: 60;
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 30px; height: 30px; fill: white; }

/* ---------- Decor: onda ---------- */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ---- Lightbox galleria ---- */
.gallery-item { cursor: zoom-in; }
.prm-lb {
  position: fixed; inset: 0; z-index: 9999;
  display: none; align-items: center; justify-content: center;
  background: rgba(10, 20, 28, 0.92);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s ease;
}
.prm-lb.is-open { display: flex; opacity: 1; }
.prm-lb__stage {
  margin: 0; max-width: 92vw; max-height: 88vh;
  display: flex; align-items: center; justify-content: center;
}
.prm-lb__img {
  max-width: 92vw; max-height: 88vh;
  width: auto; height: auto; object-fit: contain;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  animation: prmLbIn .22s ease;
}
@keyframes prmLbIn { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.prm-lb__close, .prm-lb__nav {
  position: absolute; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.prm-lb__close:hover, .prm-lb__nav:hover { background: rgba(255,255,255,.28); }
.prm-lb__close {
  top: 18px; right: 20px; width: 46px; height: 46px;
  border-radius: 50%; font-size: 30px; line-height: 1;
}
.prm-lb__nav {
  top: 50%; transform: translateY(-50%);
  width: 54px; height: 54px; border-radius: 50%;
  font-size: 34px; line-height: 1; padding-bottom: 4px;
}
.prm-lb__nav:hover { transform: translateY(-50%) scale(1.06); }
.prm-lb__prev { left: 20px; }
.prm-lb__next { right: 20px; }
.prm-lb__counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.85); font-size: .9rem; letter-spacing: .04em;
  background: rgba(0,0,0,.35); padding: 5px 12px; border-radius: 999px;
}
@media (max-width: 600px) {
  .prm-lb__nav { width: 44px; height: 44px; font-size: 28px; }
  .prm-lb__prev { left: 8px; } .prm-lb__next { right: 8px; }
  .prm-lb__close { top: 10px; right: 10px; }
}
