:root{
  --accent: #ffeac7;
  --text: #001c54;
  --muted: #444;
  --radius: 14px;
}
footer{
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
/* Header e layout principale */
header{ top: 0; border-radius: 0; }
.booking-page {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Tab header */
.tab-header {
  position: fixed;
  margin-top: 100px;
  display: flex;
  width: 100%;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 20;
}
.tab-header button {
  flex: 1;
  padding: 18px;
  font-size: 1.1rem;
  font-weight: 600;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
}
.tab-header button:hover { background: var(--text); color: #fff; }
.tab-header button.active { background: var(--text); color: #fff; }

/* Sezioni */
.half-section {
  flex: 1;
  width: 100%;
  margin-top: 50px;
  margin-bottom: 40px;
  min-height: 100vh;
  background-size: cover;
  background-position: center;
  display: none;
  align-items: center;
  justify-content: center;
  padding-top: 100px; /* spazio per la tab-header */
}
.half-section.active { display: flex; }

/* Background images */
main {
  background: url(../Images/slider6.jpeg) no-repeat center center;
  background-size: cover;
}
.spiaggia {margin-top: 100px; }

/* Card interna - struttura flex colonna */
.overlay-card {
  margin-top: 0;
  background: rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  padding: 20px;
  width: 60%;
  max-width: 1100px;
  min-width: 320px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  text-align: center;
  animation: fadeInUp 1.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.overlay-card h2 {
  color: var(--text);
  font-size: 1.8rem;
  margin: 6px 0 12px;
  flex: 0 0 auto;
}

/* VIEWPORT della gallery: occupa tutto lo spazio disponibile tranne header e bottoni */
.gallery-viewport {
  flex: 1 1 auto;
  display: flex;
  align-items: center; /* centra verticalmente l'immagine attiva */
  justify-content: center;
  width: 100%;
  position: relative;
  overflow: hidden;
  min-height: 0;
}

/* Contenitore slidabile */
.gallery {
  display: flex;
  gap: 0;
  transition: transform 0.45s cubic-bezier(.2,.8,.2,1);
  will-change: transform;
  height: 100%;
  align-items: center;
}

/* ogni immagine occupa il 100% del viewport orizzontale */
.gallery img {
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  transition: transform 0.25s ease;
  object-fit: contain; /* evita che l'immagine venga tagliata */
}

/* Overlay frecce (visibili quando slider aperto) */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0,28,84,0.85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 15;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.slider-arrow.show { opacity: 1; pointer-events: auto; }
.slider-arrow.left { left: 12px; }
.slider-arrow.right { right: 12px; }

/* Indicatori pallini (mostrano che c'è più di un'immagine) */
.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 15;
  pointer-events: none;
}
.slider-dots .dot {
  width: 10px;
  height: 10px;
  background: rgba(0,28,84,0.25);
  border-radius: 50%;
  transition: background 0.18s ease, transform 0.18s ease;
}
.slider-dots .dot.active {
  background: var(--text);
  transform: scale(1.15);
}

/* Miniature cliccabili (opzionali) */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
  flex: 0 0 auto;
}
.gallery-thumbs img {
  width: 84px;
  min-width: 10px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  opacity: 0.65;
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.gallery-thumbs img.active { opacity: 1; transform: scale(1.02); border: 2px solid rgba(0,28,84,0.08); }

/* Bottoni: allineati in basso della card */
.overlay-card .buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
  margin-top: 12px;
}

/* Pulsanti */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s ease;
}
.btn.primary { background: #0077cc; color: #fff; }
.btn.primary:hover { background: #005fa3; transform: scale(1.03); }
.btn.secondary { background: #ffeac7; color: var(--text); border: 1.5px solid var(--text); }
.btn.secondary:hover { background: #ffdb9d; transform: scale(1.03); }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */

@media (max-width: 768px) {
  .overlay-card { width: 90%;}
  .buttons { flex-direction: column; }
  .btn { width: 90%; justify-content: center; margin: auto;}
}
