/* ===================================================
   PALAZZO DEL PORTO — Design System
   =================================================== */

:root {
  /* Palette — pietra calda di Trani + pastelli del porto */
  --cream: #F7F3EC;
  --sand: #EAE0D2;
  --taupe: #D6C7B4;
  --sage: #9CAFA0;
  --sage-soft: #C7D4C9;
  --sky: #A8C5D6;
  --sky-soft: #D6E3EA;
  --terracotta: #C99A82;
  --gold: #D4AF6A;
  --ink: #3A332C;
  --ink-soft: #6B6258;
  --white: #FFFEFC;
  --line: rgba(58, 51, 44, 0.12);
  --shadow: rgba(58, 51, 44, 0.10);

  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Montserrat', -apple-system, sans-serif;

  --maxw: 1180px;
  --radius: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: var(--ink);
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }

p { color: var(--ink-soft); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 600;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Texture pietra (signature ricorrente) ---------- */
.stone-texture {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(90deg, transparent 0 78px, rgba(58,51,44,0.6) 78px 79px),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(58,51,44,0.6) 46px 47px);
  background-position: 0 0, 39px 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 0;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.site-header.scrolled {
  background: rgba(247, 243, 236, 0.92);
  backdrop-filter: blur(10px);
  padding: 14px 0;
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark img { height: 32px; width: auto; display: block; transition: height 0.4s ease; }

.site-header.scrolled .logo-mark img { height: 26px; }

/* Header su hero scuro (pagine camera/dintorni con foto): logo bianco fino allo scroll */
.site-header.on-dark .logo-default { display: none; }
.site-header.on-dark .logo-white { display: block; }
.site-header.on-dark.scrolled .logo-default { display: block; }
.site-header.on-dark.scrolled .logo-white { display: none; }
.logo-white { display: none; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 4px 0;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after { width: 100%; }

/* ---------- Dropdown "Camere" ---------- */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: default;
  position: relative;
  padding: 4px 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
}

.nav-dropdown-trigger::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--terracotta);
  transition: width 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger::after,
.nav-dropdown-trigger.active::after { width: 100%; }

.nav-dropdown-trigger .chevron {
  width: 9px; height: 9px;
  transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger .chevron,
.nav-dropdown.dropdown-open .nav-dropdown-trigger .chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 18px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px -16px var(--shadow);
  padding: 10px;
  min-width: 190px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s;
  z-index: 50;
}

/* ponte invisibile per non perdere l'hover passando dal trigger al menu */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  width: 100%; height: 18px;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.dropdown-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 500;
  color: var(--ink);
  border-radius: var(--radius);
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-menu a::after { display: none; }

.nav-dropdown-menu a:hover {
  background: var(--cream);
  color: var(--terracotta);
  padding-left: 18px;
}

.nav-dropdown-menu a .room-swatch {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* su sfondo scuro (hero camere) il trigger eredita lo stesso colore della nav */
.site-header.on-dark .nav-dropdown-trigger .chevron { color: var(--white); }
.site-header.on-dark.scrolled .nav-dropdown-trigger .chevron { color: var(--ink); }


/* Header su hero scuro: testo nav bianco fino allo scroll (esclude i link dentro il dropdown, che restano sempre su sfondo bianco) */
.site-header.on-dark .main-nav > a,
.site-header.on-dark .nav-dropdown-trigger { color: var(--white); }
.site-header.on-dark .nav-toggle span { background: var(--white); }
.site-header.on-dark .nav-cta { background: var(--white); color: var(--ink) !important; }
.site-header.on-dark .nav-cta:hover { background: var(--terracotta); color: var(--white) !important; }
.site-header.on-dark.scrolled .main-nav > a,
.site-header.on-dark.scrolled .nav-dropdown-trigger { color: var(--ink); }
.site-header.on-dark.scrolled .nav-toggle span { background: var(--ink); }
.site-header.on-dark.scrolled .nav-cta { background: var(--ink); color: var(--cream) !important; }
.site-header.on-dark.scrolled .nav-cta:hover { background: var(--terracotta); }

.nav-cta {
  background: var(--ink);
  color: var(--cream) !important;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  transition: background 0.3s ease, transform 0.3s ease;
}

.nav-cta:hover { background: var(--terracotta); transform: translateY(-1px); }

.nav-cta-blue,
.site-header.on-dark .nav-cta-blue,
.site-header.on-dark.scrolled .nav-cta-blue {
  background: #2A5C8A;
  color: var(--white) !important;
}
.nav-cta-blue:hover,
.site-header.on-dark .nav-cta-blue:hover,
.site-header.on-dark.scrolled .nav-cta-blue:hover {
  background: #1E4566;
  color: var(--white) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 1.5px;
  background: var(--ink);
  transition: all 0.3s ease;
}

/* ---------- Hero (sfondo crema, sezione 1) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sand) 0%, var(--cream) 100%);
}

/* ---------- Fixed background a piena pagina (riusabile: home, bagni camere...) ---------- */
.fixed-photo-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  z-index: -1;
  overflow: hidden;
}

.fixed-photo-bg picture {
  display: block;
  position: absolute;
  inset: 0;
}

.fixed-photo-bg img {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

.fixed-bg-video {
  display: none;
}

@media (max-width: 760px) {
  .fixed-photo-bg .fixed-bg-photo { display: none; }
  .fixed-photo-bg .fixed-bg-video {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
  }
}

.fixed-photo-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(36,32,28,0.18) 0%, rgba(36,32,28,0.1) 45%, rgba(36,32,28,0.38) 100%);
}

/* Modificatore: centra l'immagine senza offset verticale (per foto dove il soggetto è già centrato) */
.fixed-photo-bg.bg-center img { object-position: center center; }

.photo-window {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background: transparent;
  padding: 0;
  margin: 0;
}

/* Eyebrow opzionale sulla finestra-foto (es. "Il bagno") */
.photo-window-label {
  position: absolute;
  bottom: 56px; left: 0;
  width: 100%;
  text-align: center;
  z-index: 2;
}
.photo-window-label .eyebrow { color: rgba(255,255,255,0.85); }
.photo-window-label h3 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-top: 10px;
}


.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-grid-single {
  grid-template-columns: 1fr;
  max-width: 760px;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-eyebrow::before {
  content: '';
  width: 28px; height: 1px;
  background: var(--terracotta);
}

.hero h1 {
  opacity: 0;
  animation: fadeUp 0.9s ease 0.4s forwards;
  margin-bottom: 22px;
}

.typewriter {
  display: inline-block;
  border-right: 2px solid var(--terracotta);
  white-space: nowrap;
  overflow: hidden;
  animation: blink-caret 0.85s step-end infinite;
}

.hero-sub {
  font-size: 1.08rem;
  max-width: 480px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.6s forwards;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  gap: 18px;
  opacity: 0;
  animation: fadeUp 0.9s ease 0.8s forwards;
}

.hero-visual-tag {
  position: absolute;
  bottom: -18px; left: -18px;
  background: var(--white);
  padding: 16px 22px;
  border-radius: var(--radius);
  box-shadow: 0 12px 30px -10px var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-visual-tag.hero-visual-tag-inline {
  position: static;
  display: inline-flex;
  margin-top: 38px;
  bottom: auto;
  left: auto;
}

.hero-visual-tag .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--sage);
  animation: pulse 2s ease infinite;
}

.hero-visual-tag span {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.scroll-cue {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 0;
  animation: fadeIn 1s ease 1.4s forwards;
}

.scroll-cue .line {
  width: 1px; height: 28px;
  background: var(--ink-soft);
  position: relative;
  overflow: hidden;
}

.scroll-cue .line::after {
  content: '';
  position: absolute;
  top: -28px; left: 0;
  width: 100%; height: 100%;
  background: var(--terracotta);
  animation: scrollLine 1.8s ease-in-out infinite;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 600;
  transition: all 0.35s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: var(--terracotta); transform: translateY(-2px); }

.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--cream); transform: translateY(-2px); }

/* ---------- Section scaffolding ---------- */
section { position: relative; padding: 110px 0; }
.section-light { background: var(--cream); }
.section-alt { background: var(--white); }
.section-sand { background: var(--sand); }

.section-head {
  max-width: 640px;
  margin-bottom: 64px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-head .eyebrow { display: block; margin-bottom: 14px; }

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > * { opacity: 1; transform: translateY(0); }

/* ---------- Intro / palazzo block ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: center;
}

.intro-images {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.intro-images .img-a { grid-column: 1; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 50px -18px var(--shadow); }
.intro-images .img-b { grid-column: 2; aspect-ratio: 3/4; margin-top: 50px; border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 50px -18px var(--shadow); }
.intro-images img { width: 100%; height: 100%; object-fit: cover; }

.intro-text p { margin-bottom: 18px; font-size: 1.02rem; }

.feature-line {
  display: flex;
  gap: 14px;
  margin-top: 34px;
}
.feature-line .fl-item {
  flex: 1;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.feature-line .fl-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--terracotta);
  display: block;
  margin-bottom: 6px;
}
.feature-line .fl-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- Room cards grid ---------- */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.room-card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 40px -22px var(--shadow);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.room-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 55px -20px var(--shadow);
}

.room-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.room-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.room-card:hover .room-card-img img { transform: scale(1.07); }

.room-card-swatch {
  position: absolute;
  top: 16px; left: 16px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.85);
}

.room-card-body { padding: 26px 24px 28px; }
.room-card-body .room-eyebrow { font-size: 0.68rem; color: var(--ink-soft); letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 8px; display: block;}
.room-card-body h3 { margin-bottom: 10px; }
.room-card-body p { font-size: 0.92rem; margin-bottom: 18px; }

.room-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--ink);
}
.room-card-link svg { width: 14px; height: 14px; transition: transform 0.3s ease; }
.room-card:hover .room-card-link svg { transform: translateX(5px); }

/* ---------- Services / animated icons ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.service-item {
  background: var(--cream);
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  transition: background 0.35s ease;
}
.service-item:hover { background: var(--white); }

.service-icon {
  width: 44px; height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--terracotta);
}
.service-icon svg { width: 100%; height: 100%; }

.service-item h4 { font-size: 0.95rem; font-family: var(--font-body); font-weight: 600; }
.service-item p { font-size: 0.82rem; margin: 0; }

/* Icon micro-animations */
.icon-anim-float { animation: iconFloat 3s ease-in-out infinite; }
.icon-anim-spin-slow { animation: iconSpin 7s linear infinite; transform-origin: center; }
.icon-anim-pulse { animation: iconPulseScale 2.4s ease-in-out infinite; transform-origin: center; }
.icon-anim-wave path,
.icon-anim-wave g { animation: iconWave 2.2s ease-in-out infinite; transform-origin: center; }
.icon-anim-swing { animation: iconSwing 3s ease-in-out infinite; transform-origin: top center; }
.icon-anim-drip { animation: iconDrip 1.8s ease-in infinite; }
.icon-anim-blink { animation: iconBlink 3s ease-in-out infinite; }
.icon-anim-bounce { animation: iconBounceSmall 2s ease-in-out infinite; }

/* ---------- Location / Dintorni ---------- */
.dintorni-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.dintorni-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 36px -20px var(--shadow);
}
.dintorni-card-img { aspect-ratio: 16/10; overflow: hidden; }
.dintorni-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.dintorni-card:hover .dintorni-card-img img { transform: scale(1.06); }
.dintorni-card-body { padding: 24px 26px 28px; }
.dintorni-card-body .eyebrow { display: block; margin-bottom: 8px; }
.dintorni-card-body p { font-size: 0.92rem; }

.distance-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 50px;
}
.distance-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 40px;
  padding: 10px 20px 10px 14px;
  font-size: 0.82rem;
}
.distance-pill .dp-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--sage-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.distance-pill .dp-icon svg { width: 14px; height: 14px; color: var(--ink); }
.distance-pill strong { font-weight: 700; }

/* ---------- Room detail page ---------- */
.room-hero {
  position: relative;
  min-height: 78vh;
  min-height: 78dvh;
  display: flex;
  align-items: flex-end;
  padding: 160px 0 70px;
  overflow: hidden;
}
.room-hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.room-hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.05);
  animation: slowZoom 16s ease-in-out infinite alternate;
}
.room-hero-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(58,51,44,0.05) 0%, rgba(58,51,44,0.55) 100%);
}
.room-hero-content { position: relative; z-index: 2; color: var(--cream); }
.room-hero-content .eyebrow { color: var(--sky-soft); }
.room-hero-content h1 { color: var(--white); }
.room-hero-content p { color: rgba(255,255,255,0.82); max-width: 520px; margin-top: 14px; }

.room-meta-strip {
  display: flex;
  gap: 40px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.room-meta-strip div { display: flex; flex-direction: column; gap: 4px; }
.room-meta-strip .rm-label { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.65); }
.room-meta-strip .rm-value { font-family: var(--font-display); font-size: 1.3rem; color: var(--white); }

/* ---------- Editorial gallery: grid 3x2, ratio 4:5 ---------- */
.editorial-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.eg-cell {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
}

.eg-cell.eg-single,
.eg-cell.eg-carousel {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.eg-cell img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.eg-cell:hover img { transform: scale(1.04); }

/* Cella testuale */
.eg-cell.eg-text {
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  cursor: default;
}
.eg-cell.eg-text p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 2.3vw, 1.35rem);
  line-height: 1.5;
  color: var(--cream);
  text-align: center;
  margin: 0;
}
.eg-cell.eg-text:hover img { transform: none; }

/* Variante cella testuale: fondo sand, testo marrone scuro (usata in Sand Room) */
.eg-cell.eg-text.eg-text-sand {
  background: var(--sand);
}
.eg-cell.eg-text.eg-text-sand p {
  color: var(--ink);
}

/* Variante cella testuale: fondo gold, testo bianco (usata in Gold Room) */
.eg-cell.eg-text.eg-text-gold {
  background: var(--gold);
}
.eg-cell.eg-text.eg-text-gold p {
  color: var(--white);
}

/* Variante cella testuale: fondo bianco, testo marrone scuro (usata in White Room) */
.eg-cell.eg-text.eg-text-white {
  background: var(--white);
}
.eg-cell.eg-text.eg-text-white p {
  color: var(--ink);
}

/* Variante cella testuale: fondo blu, testo sand (usata in Blue Room) */
.eg-cell.eg-text.eg-text-blue {
  background: var(--sky);
}
.eg-cell.eg-text.eg-text-blue p {
  color: var(--sand);
}

/* Variante cella testuale: fondo verde, testo sand (usata in Green Room) */
.eg-cell.eg-text.eg-text-green {
  background: var(--sage);
}
.eg-cell.eg-text.eg-text-green p {
  color: var(--sand);
}

/* Badge carosello, stile Instagram */
.eg-carousel-badge {
  position: absolute;
  top: 12px; right: 12px;
  width: 26px; height: 26px;
  z-index: 2;
  color: var(--white);
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.eg-carousel-badge svg { width: 100%; height: 100%; }

/* ---------- Lightbox carosello ---------- */
.eg-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 16, 0.94);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.eg-lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.eg-lightbox-track {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  touch-action: pan-y;
}
.eg-lightbox-track img {
  grid-area: 1 / 1;
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.eg-lightbox-track img.is-active {
  opacity: 1;
  visibility: visible;
  position: relative;
  pointer-events: auto;
}

.eg-lightbox-close {
  position: absolute;
  top: 28px; right: 28px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease;
}
.eg-lightbox-close:hover { background: rgba(255,255,255,0.24); }
.eg-lightbox-close svg { width: 18px; height: 18px; }

.eg-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease;
  z-index: 5;
}
.eg-lightbox-nav:hover { background: rgba(255,255,255,0.24); }
.eg-lightbox-nav svg { width: 20px; height: 20px; }
.eg-lightbox-prev { left: 24px; }
.eg-lightbox-next { right: 24px; }

.eg-lightbox-dots {
  position: absolute;
  bottom: 24px; left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 3;
}
.eg-lightbox-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: background 0.25s ease;
}
.eg-lightbox-dots span.is-active { background: var(--white); }

@media (max-width: 1024px) {
  .eg-lightbox { padding: 16px; }
}

@media (max-width: 760px) {
  .editorial-gallery { grid-template-columns: repeat(2, 1fr); }
  .eg-cell.eg-text p { font-size: 1rem; }

  /* Su mobile la griglia è troppo alta per il trigger dello scroll-reveal:
     le celle restano a opacity:0 (vuote, solo bordo arrotondato visibile)
     finché l'IntersectionObserver non scatta. Disattiviamo l'animazione
     qui e mostriamo le celle sempre piene. */
  .editorial-gallery.reveal-stagger > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}


.room-detail-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 70px;
}

.amenity-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  margin-top: 28px;
}
.amenity-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--ink);
}
.amenity-list .am-ico {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--terracotta);
}
.amenity-list .am-ico svg { width: 15px; height: 15px; }

.booking-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 30px;
  box-shadow: 0 20px 50px -20px var(--shadow);
  position: sticky;
  top: 110px;
  align-self: start;
}
.booking-card h3 { margin-bottom: 6px; }
.booking-card .price-note { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 24px; }
.booking-card .btn { width: 100%; justify-content: center; margin-bottom: 12px; }
.booking-card .btn-outline { border-color: var(--line); }

.other-rooms-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.other-room-mini {
  text-align: center;
}
.other-room-mini .orm-img {
  aspect-ratio: 1/1;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow: 0 14px 30px -16px var(--shadow);
}
.other-room-mini .orm-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.other-room-mini:hover .orm-img img { transform: scale(1.08); }
.other-room-mini h4 { font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; }

/* ---------- Testimonial / quote band ---------- */
.quote-band {
  text-align: center;
  padding: 90px 0;
}
.quote-band blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 500;
  max-width: 760px;
  margin: 0 auto 20px;
  color: var(--ink);
  line-height: 1.4;
}
.quote-band cite {
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
}
.contact-info-item {
  display: flex;
  gap: 18px;
  margin-bottom: 30px;
}
.contact-info-item .ci-ico {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--terracotta);
}
.contact-info-item .ci-ico svg { width: 20px; height: 20px; }
.contact-info-item h4 { font-family: var(--font-body); font-size: 0.95rem; margin-bottom: 4px; }
.contact-info-item p { font-size: 0.9rem; margin: 0; }

.contact-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px -20px var(--shadow);
}
.form-row { margin-bottom: 20px; }
.form-row label {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink-soft);
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  transition: border-color 0.3s ease;
}
.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--terracotta);
}
.form-row-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.form-consent-row { margin-bottom: 22px; }
.form-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-transform: none;
  font-weight: 400;
}
.form-consent-label input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--ink);
}
.form-consent-label a { color: var(--ink); text-decoration: underline; }

.form-status-msg {
  margin-top: 18px;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.form-status-msg.is-visible { display: flex; }
.form-status-msg.is-success {
  background: rgba(156, 175, 160, 0.18);
  border: 1px solid var(--sage);
  color: #4a6650;
  font-weight: 700;
}
.form-status-msg.is-error {
  background: rgba(201, 154, 130, 0.16);
  border: 1px solid var(--terracotta);
  color: #8a4530;
  font-weight: 700;
}
.form-status-msg.is-loading {
  background: var(--sand);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-weight: 600;
}

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 50px;
  box-shadow: 0 20px 50px -20px var(--shadow);
}
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--sand);
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
}
.footer-grid h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 18px;
}
.footer-grid p, .footer-grid a {
  color: rgba(247,243,236,0.72);
  font-size: 0.88rem;
  display: block;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}
.footer-grid a:hover { color: var(--cream); }
.footer-logo { display: block; margin-bottom: 18px; }
.footer-logo img { height: 140px; width: auto; }
.footer-bottom {
  border-top: 1px solid rgba(247,243,236,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(247,243,236,0.5);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-legal-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-legal-links a,
.footer-legal-links .footer-cookie-link {
  color: rgba(247,243,236,0.5);
  font-size: 0.78rem;
  transition: color 0.3s ease;
}

.footer-legal-links a:hover,
.footer-legal-links .footer-cookie-link:hover {
  color: var(--cream);
}

.footer-credit {
  text-align: center;
  padding-top: 18px;
  font-size: 0.76rem;
  color: rgba(247,243,236,0.4);
}

.footer-credit a {
  color: var(--terracotta);
  transition: color 0.3s ease;
}

.footer-credit a:hover {
  color: var(--cream);
}

/* ---------- Floating WhatsApp button ---------- */
.wa-float {
  position: fixed;
  bottom: 26px;
  left: 26px;
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #3FAE5C;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px -6px rgba(63,174,92,0.55);
  animation: waPulse 2.6s ease-in-out infinite;
  transition: transform 0.3s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

.booking-float {
  position: fixed;
  bottom: 96px;
  left: 26px;
  z-index: 200;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #2A5C8A;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px -6px rgba(42,92,138,0.55);
  transition: transform 0.3s ease, background 0.3s ease;
}
.booking-float:hover { transform: scale(1.08); background: #1E4566; }
.booking-float svg { width: 26px; height: 26px; stroke: #fff; }

@media (max-width: 760px) {
  .wa-float { bottom: 20px; left: 20px; width: 52px; height: 52px; }
  .wa-float svg { width: 25px; height: 25px; }
  .booking-float { bottom: 82px; left: 20px; width: 52px; height: 52px; }
  .booking-float svg { width: 23px; height: 23px; }
}

/* ---------- Keyframes ---------- */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes blink-caret { 50% { border-color: transparent; } }
@keyframes slowZoom { from { transform: scale(1.0); } to { transform: scale(1.12); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes scrollLine { 0% { transform: translateY(0); } 100% { transform: translateY(56px); } }
@keyframes waPulse {
  0%, 100% { box-shadow: 0 10px 26px -6px rgba(63,174,92,0.55); }
  50% { box-shadow: 0 10px 30px -4px rgba(63,174,92,0.85); }
}
@keyframes iconFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes iconSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes iconPulseScale { 0%,100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes iconWave { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes iconSwing { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes iconDrip { 0% { opacity:0; transform: translateY(-2px); } 50% { opacity:1; transform: translateY(4px); } 100% { opacity:0; transform: translateY(8px); } }
@keyframes iconBlink { 0%,90%,100% { opacity:1; } 95% { opacity:0.3; } }
@keyframes iconBounceSmall { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* ---------- Reviews ---------- */
.reviews-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}
.reviews-score {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.reviews-score .score-num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--ink);
}
.reviews-stars { display: flex; gap: 3px; color: var(--terracotta); }
.reviews-stars svg { width: 17px; height: 17px; }
.reviews-count { font-size: 0.85rem; color: var(--ink-soft); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.review-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 16px 36px -20px var(--shadow);
}
.review-card .review-stars {
  display: flex;
  gap: 3px;
  color: var(--terracotta);
  margin-bottom: 14px;
}
.review-card .review-stars svg { width: 14px; height: 14px; }
.review-card p {
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.6;
}
.review-card .review-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.review-card .review-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--sand);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--terracotta);
  flex-shrink: 0;
}
.review-card .review-author span {
  font-size: 0.82rem;
  font-weight: 600;
  display: block;
}
.review-card .review-author small {
  font-size: 0.74rem;
  color: var(--ink-soft);
  font-weight: 400;
}

@media (max-width: 1024px) {
  .hero-grid, .intro-grid, .room-detail-grid, .contact-grid { grid-template-columns: 1fr; }
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .dintorni-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .other-rooms-strip { grid-template-columns: repeat(2, 1fr); }
  .booking-card { position: static; }
  .reviews-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .rooms-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .amenity-list { grid-template-columns: 1fr; }
  .form-row-grid { grid-template-columns: 1fr; }
  .room-meta-strip { gap: 22px; }
  section { padding: 70px 0; }
  .hero { padding: 120px 0 60px; }

  /* Menu mobile a comparsa */
  .main-nav.nav-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: fixed;
    top: var(--header-h, 64px);
    left: 0; right: 0;
    bottom: 0;
    background: var(--cream);
    padding: 12px 24px 40px;
    overflow-y: auto;
    z-index: 99;
  }
  .main-nav.nav-open > a {
    padding: 16px 4px;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }
  .main-nav.nav-open > a.active {
    background: var(--ink);
    color: var(--cream);
    padding-left: 14px;
    border-bottom-color: var(--ink);
  }
  .main-nav.nav-open > a.nav-cta {
    margin-top: 16px;
    text-align: center;
    border-bottom: none;
  }
  .main-nav.nav-open > a.nav-cta.active {
    background: var(--terracotta);
    color: var(--white);
  }
  .main-nav.nav-open .nav-dropdown {
    width: 100%;
    border-bottom: 1px solid var(--line);
  }
  .main-nav.nav-open .nav-dropdown-trigger {
    padding: 16px 4px;
    justify-content: space-between;
    width: 100%;
  }
  .main-nav.nav-open .nav-dropdown-trigger .chevron {
    width: 16px; height: 16px;
    stroke-width: 3;
    flex-shrink: 0;
  }
  .main-nav.nav-open .nav-dropdown-trigger.active {
    background: var(--ink);
    color: var(--cream);
    padding-left: 14px;
  }
  .main-nav.nav-open .nav-dropdown-trigger.active .chevron {
    color: var(--cream);
  }
  .main-nav.nav-open .nav-dropdown::after { display: none; }
  .main-nav.nav-open .nav-dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: transparent;
    width: 100%;
    min-width: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.nav-open .nav-dropdown.dropdown-open .nav-dropdown-menu {
    max-height: 400px;
    padding: 0 0 10px 0;
  }
  .main-nav.nav-open .nav-dropdown-menu a {
    padding: 11px 4px 11px 14px;
  }
  .site-header.on-dark .main-nav.nav-open { background: var(--cream); }
  .site-header.on-dark .main-nav.nav-open a { color: var(--ink); }
  .site-header.on-dark .main-nav.nav-open a.active,
  .site-header.on-dark .main-nav.nav-open .nav-dropdown-trigger.active {
    background: var(--ink);
    color: var(--cream);
  }
  .site-header.on-dark .main-nav.nav-open a.nav-cta.active {
    background: var(--terracotta);
    color: var(--white);
  }
}

/* ===================================================
   COOKIE BANNER + MODALE PREFERENZE
   =================================================== */

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 40px -10px var(--shadow);
  padding: 22px 0;
  transform: translateY(100%);
  transition: transform 0.5s ease;
}

.cookie-banner.is-visible { transform: translateY(0); }

.cookie-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1 1 420px;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
}

.cookie-banner-text strong { color: var(--ink); }

.cookie-banner-text a { color: var(--ink); text-decoration: underline; }

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  font-family: var(--font-body);
}

.cookie-btn-accept { background: var(--ink); color: var(--cream); }
.cookie-btn-accept:hover { background: var(--terracotta); }

.cookie-btn-reject {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.cookie-btn-reject:hover { background: var(--sand); }

.cookie-btn-settings {
  background: transparent;
  color: var(--ink-soft);
  text-decoration: underline;
  padding: 12px 6px;
}
.cookie-btn-settings:hover { color: var(--ink); }

/* ---- Modale preferenze ---- */
.cookie-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(58, 51, 44, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-modal-overlay.is-open { opacity: 1; visibility: visible; }

.cookie-modal {
  background: var(--white);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 38px 36px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.cookie-modal-overlay.is-open .cookie-modal { transform: translateY(0); }

.cookie-modal h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.cookie-modal-intro {
  font-size: 0.85rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 26px;
}

.cookie-category {
  border-top: 1px solid var(--line);
  padding: 18px 0;
}

.cookie-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.cookie-category-head h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.cookie-category-desc {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin-top: 8px;
}

.cookie-toggle {
  position: relative;
  width: 44px; height: 25px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0; height: 0;
  position: absolute;
}

.cookie-toggle-track {
  position: absolute;
  inset: 0;
  background: var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.25s ease;
}

.cookie-toggle-track::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 19px; height: 19px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.cookie-toggle input:checked + .cookie-toggle-track { background: var(--sage); }
.cookie-toggle input:checked + .cookie-toggle-track::before { transform: translateX(19px); }

.cookie-toggle input:disabled + .cookie-toggle-track {
  background: var(--taupe);
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-category-locked {
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.cookie-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.cookie-modal-actions .cookie-btn { flex: 1; justify-content: center; }

.cookie-modal-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  padding: 6px;
}
.cookie-modal-close:hover { color: var(--ink); }

/* ---- Link "Gestisci cookie" nel footer ---- */
.footer-cookie-link {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 0;
}

@media (max-width: 760px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 16px; }
  .cookie-banner-text { flex-basis: auto; max-width: 100%; width: 100%; }
  .cookie-banner-actions { justify-content: flex-end; flex-wrap: wrap; }
  .cookie-modal { padding: 28px 22px; }
}

/* ---- Placeholder mappa quando i contenuti di terze parti non sono attivi ---- */
.map-consent-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 380px;
  width: 100%;
  background: var(--sand);
  color: var(--ink-soft);
  text-align: center;
  padding: 32px;
  cursor: pointer;
  font-size: 0.86rem;
  line-height: 1.5;
}

.map-consent-placeholder strong { color: var(--ink); display: block; margin-bottom: 4px; }

[data-cookie-embed="maps"] { position: relative; }
[data-cookie-embed="maps"] iframe { display: none; }

