/* ═══════════════════════════════════════════════════
   style.css — Maré, Scala dei Turchi
   Approccio: mobile-first, CSS custom properties,
   nessuna dipendenza esterna (zero framework CSS).
═══════════════════════════════════════════════════ */

/* ── 1. CUSTOM PROPERTIES (Design Tokens) ─────────
   Centralizzare i valori qui significa che possiamo
   cambiare l'intera palette in un'unica riga.
────────────────────────────────────────────────── */
:root {
  /* Palette mediterranea */
  --color-white:      #ffffff;
  --color-sand:       #f5e8d4;
  --color-sand-dark:  #e8d4b8;
  --color-blue:       #1a6fa8;
  --color-blue-dark:  #124f7a;
  --color-blue-light: #4a9fd4;
  --color-azure:      #e8f4fd;
  --color-text:       #2c2c2c;
  --color-text-muted: #6b6b6b;
  --color-whatsapp:   #25d366;

  /* Tipografia */
  --font-serif:  'Playfair Display', Georgia, serif;
  --font-sans:   'Inter', system-ui, sans-serif;

  /* Spaziatura */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  6rem;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Ombra */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);

  /* Transizioni */
  --transition: 0.25s ease;

  /* Max width contenuto */
  --max-width: 1200px;
}


/* ── 2. RESET & BASE ──────────────────────────────
   Minimal reset: box-model coerente, niente margin
   di default sul body, font base definito.
────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;   /* smooth scroll per gli anchor link */
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* Utility container */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}


/* ── 3. BUTTONS ───────────────────────────────────
   Due varianti: primary (pieno) e ghost (bordo).
────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.btn--primary {
  background: var(--color-blue);
  color: var(--color-white);
  border: 2px solid var(--color-blue);
}
.btn--primary:hover {
  background: var(--color-blue-dark);
  border-color: var(--color-blue-dark);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255,255,255,0.7);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}


/* ── 4. SECTION HELPERS ───────────────────────────
   Stili comuni per header delle sezioni.
────────────────────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);  /* clamp: si adatta allo schermo */
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto;
}


/* ── 5. NAVBAR ────────────────────────────────────
   Fixed in alto, diventa opaca allo scroll (JS
   aggiunge la classe .navbar--scrolled).
────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.2rem 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

/* Trasparente sulla hero, opaca dopo */
.navbar--scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow-sm);
  padding: 0.8rem 0;
}

.navbar--scrolled .navbar__logo,
.navbar--scrolled .navbar__links a {
  color: var(--color-text);
}

.navbar--scrolled .navbar__links a:not(.navbar__cta):hover {
  color: var(--color-blue);
}

.navbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  font-style: italic;
  color: var(--color-white);
  letter-spacing: 0.02em;
  transition: color var(--transition);
}

.navbar__links {
  display: none;  /* nascosto su mobile, mostrato su desktop */
  gap: 2rem;
  align-items: center;
}

.navbar__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  transition: color var(--transition);
}

.navbar__cta {
  background: var(--color-blue);
  color: var(--color-white) !important;
  padding: 0.55rem 1.4rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition) !important;
}
.navbar__cta:hover {
  background: var(--color-blue-dark) !important;
}

/* Hamburger — visibile solo su mobile */
.navbar__hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: background var(--transition), transform var(--transition);
}
.navbar--scrolled .navbar__hamburger span {
  background: var(--color-text);
}

/* Mobile menu aperto */
.navbar__links--open {
  display: flex ;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-white);
  padding: 1.5rem var(--space-md);
  box-shadow: var(--shadow-md);
  gap: 1rem;
  z-index: 99;
}
.navbar__links--open a {
  color: var(--color-text) !important;
}

@media (min-width: 768px) {
  .navbar__links {
    display: flex;
  }
  .navbar__hamburger {
    display: none;
  }
}


/* ── 6. HERO ──────────────────────────────────────
   Fullscreen con immagine di sfondo.
   La hero__overlay è il gradiente scuro sopra la
   foto per rendere leggibile il testo bianco.
────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;   /* svh: usa l'altezza visibile reale su mobile */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  /* Immagine di sfondo: images/hero.jpg
     object-fit: cover gestito via background-size */
  background-image: url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;  /* parallax leggero */
}

/* Fallback colore se l'immagine non c'è ancora */
.hero:not([style*="background-image"]),
.hero {
  background-color: var(--color-blue-dark);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  /* Gradiente: più scuro in basso per far risaltare il testo */
  background: linear-gradient(
    to bottom,
    rgba(10, 30, 50, 0.45) 0%,
    rgba(10, 30, 50, 0.6) 60%,
    rgba(10, 30, 50, 0.75) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  padding: var(--space-md);
  max-width: 700px;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
}

.hero__title em {
  font-style: italic;
  color: #a8d8f0;  /* azzurro chiaro per il nome */
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-md);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Freccia scroll */
.hero__scroll-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.7);
  animation: bounce 2s infinite;
}
.hero__scroll-arrow svg {
  width: 32px;
  height: 32px;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}


/* ── 7. STRIP (numeri chiave) ─────────────────────
   Fascia bianca/sabbia con i 4 valori numerici.
────────────────────────────────────────────────── */
.strip {
  background: var(--color-sand);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-sand-dark);
  border-bottom: 1px solid var(--color-sand-dark);
}

.strip__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.strip__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 2rem;
}

.strip__number {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--color-blue);
  line-height: 1;
}

.strip__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

.strip__divider {
  width: 1px;
  height: 40px;
  background: var(--color-sand-dark);
}

.strip__note {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
  display: block;
}

@media (max-width: 600px) {
  .strip__divider { display: none; }
  .strip__item { padding: 0.5rem 1.5rem; }
}


/* ── 8. FEATURES ──────────────────────────────────
   Griglia 2 col mobile → 4 col desktop.
   Ogni card ha icona SVG + titolo + descrizione.
────────────────────────────────────────────────── */
.features {
  padding: var(--space-xl) 0;
  background: var(--color-white);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);  /* 2 colonne su mobile */
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .features__grid {
    grid-template-columns: repeat(4, 1fr);  /* 4 colonne su desktop */
  }
}

.feature-card {
  padding: 1.8rem 1.4rem;
  background: var(--color-azure);
  border-radius: var(--radius-md);
  border: 1px solid rgba(26, 111, 168, 0.1);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  width: 44px;
  height: 44px;
  color: var(--color-blue);
  margin-bottom: 1rem;
}
.feature-card__icon svg {
  width: 100%;
  height: 100%;
}

.feature-card__title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.feature-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}


/* ── 9. GALLERY ───────────────────────────────────
   Griglia masonry-like: colonne fisse con object-
   fit:cover per uniformità indipendente dall'aspect
   ratio delle foto originali.
────────────────────────────────────────────────── */
.gallery {
  padding: var(--space-xl) 0;
  background: var(--color-sand);
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  aspect-ratio: 4/3;  /* tutte le foto hanno lo stesso ratio */
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* taglia/adatta la foto al contenitore */
  transition: transform 0.4s ease;
}

.gallery__item:hover img {
  transform: scale(1.05);  /* zoom leggero al hover */
}

.gallery__item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 111, 168, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery__item:hover .gallery__item-overlay {
  opacity: 1;
}

.gallery__item-overlay span {
  font-size: 2.5rem;
  color: white;
  font-weight: 300;
  line-height: 1;
}


/* ── 10. LIGHTBOX ─────────────────────────────────
   Overlay fullscreen che mostra la foto cliccata.
   Nascosto di default (opacity:0, pointer-events:none).
   JS aggiunge .lightbox--open per renderlo visibile.
────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox--open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background var(--transition);
}
.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255,255,255,0.25);
}

.lightbox__close { top: 1.5rem; right: 1.5rem; font-size: 1.8rem; }
.lightbox__prev  { left: 1rem; font-size: 2rem; }
.lightbox__next  { right: 1rem; font-size: 2rem; }


/* ── 11. LOCATION ─────────────────────────────────
   Due colonne: testo + mappa Google.
────────────────────────────────────────────────── */
.location {
  padding: var(--space-xl) 0;
  background: var(--color-white);
}

.location__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (min-width: 768px) {
  .location__inner {
    grid-template-columns: 1fr 1fr;
  }
}

.location__text .section-title {
  text-align: left;
  margin-bottom: 1rem;
}

.location__text p {
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.location__list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.location__list li {
  font-size: 0.95rem;
  color: var(--color-text);
}

.location__map iframe {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}


/* ── 12. CONTACTS ─────────────────────────────────
   Sfondo azzurro chiaro (azure), due card contatti.
────────────────────────────────────────────────── */
.contacts {
  padding: var(--space-xl) 0;
  background: var(--color-azure);
}

.contacts__cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 860px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .contacts__cards {
    flex-direction: row;
    align-items: stretch;
  }
}

.contact-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-card__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-card--whatsapp .contact-card__icon {
  background: #e8fdf0;
  color: var(--color-whatsapp);
}

.contact-card--email .contact-card__icon {
  background: var(--color-azure);
  color: var(--color-blue);
}

.contact-card__icon svg {
  width: 26px;
  height: 26px;
}

.contact-card__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-bottom: 0.2rem;
}

.contact-card__value {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

.contacts__note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}


/* ── 13. FOOTER ───────────────────────────────────
────────────────────────────────────────────────── */
.footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.7);
  padding: var(--space-md) 0;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  text-align: center;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer__brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
}

.footer__copy {
  font-size: 0.8rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer__links a:hover {
  color: rgba(255,255,255,0.95);
}

/* ── PRICING CALCULATOR ───────────────────────── */
.pricing {
  padding: var(--space-xl) 0;
  background: var(--color-sand);
}

.pricing__card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.pricing__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 2rem;
  border-bottom: 1px solid var(--color-sand-dark);
}

.pricing__field--full {
  grid-column: 1 / -1;
}

.pricing__field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.pricing__field select,
.pricing__field input[type="range"] {
  width: 100%;
}

.pricing__field select {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-sand-dark);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-white);
  cursor: pointer;
}

.pricing__result {
  padding: 2rem;
}

.pricing__season-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}

.pricing__badge--low  { background: #e8fdf0; color: #1a7a45; }
.pricing__badge--mid  { background: #fff8e1; color: #a06000; }
.pricing__badge--high { background: #fdecea; color: #c0392b; }

.pricing__metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pricing__metric {
  text-align: center;
}

.pricing__metric-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.pricing__metric-value {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-text);
}

.pricing__metric--total .pricing__metric-value {
  font-size: 2rem;
  color: var(--color-blue);
}

.pricing__breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--color-sand-dark);
  border-bottom: 1px solid var(--color-sand-dark);
  margin-bottom: 1.5rem;
}

.pricing__breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.pricing__breakdown-row span:last-child {
  font-weight: 500;
  color: var(--color-text);
}

.pricing__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem;
  background: #25d366;
  color: white;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 500;
  transition: background var(--transition);
}

.pricing__cta:hover {
  background: #1da851;
}

@media (max-width: 480px) {
  .pricing__controls { grid-template-columns: 1fr; }
  .pricing__metrics  { grid-template-columns: 1fr 1fr; }
  .pricing__metric--total { grid-column: 1 / -1; }
}

.contact-card--facebook .contact-card__icon {
  background: #e7f0fd;
  color: #1877f2;
}
.pricing__tooltip-wrap {
  position: relative;
  display: inline-block;
  margin-left: 0.4rem;
}

.pricing__tooltip-icon {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  cursor: help;
}

.pricing__tooltip-box {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-text);
  color: white;
  font-size: 0.75rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: opacity 0.2s ease;
  z-index: 10;
  pointer-events: none;
}

.pricing__tooltip-wrap:hover .pricing__tooltip-box {
  visibility: visible;
  opacity: 1;
}

.reviews__cta {
  text-align: center;
  margin-top: 2rem;
}

.reviews__link {
  display: inline-block;
  font-size: 0.95rem;
  color: var(--color-blue);
  border: 1px solid var(--color-blue);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.reviews__link:hover {
  background: var(--color-blue);
  color: var(--color-white);
}
