/* ===============================
   VARIABILI GLOBALI
================================= */
:root {
  --bg: #0b0b0d;
  --card: #151517;
  --stroke: #26262b;
  --text: #f6f6f8;
  --muted: #cfcfd6;
  --gold: #c5a46d;
  --danger: #ff9b9b;
}

/* ===============================
   RESET
================================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, Arial, sans-serif;
}

html {
  scroll-behavior: smooth;
}

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

/* CONTAINER */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===============================
   HEADER / TOPBAR
================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(11, 11, 13, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stroke);
}

.topbar .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  gap: 16px;
}

/* LOGO */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo img {
  height: 68px;
  width: auto;
}

.logo span {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* MENU */
.menu {
  display: flex;
  gap: 18px;
  align-items: center;
}

.menu a {
  color: var(--muted);
  padding: 8px 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
}

.menu a:hover {
  color: var(--text);
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.25s;
}

.menu a:hover::after {
  width: 100%;
}

/* ACTIONS (AUDIO + LINGUA) */
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.actions button {
  background: transparent;
  border: 1px solid var(--stroke);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.audio-btn {
  min-width: 38px;
}

.lang button {
  margin-left: 4px;
}

/* BOTTONE PRENOTA TOP */
.btn-prenota-top,
.btn-nav {
  background: var(--gold);
  color: #111;
  padding: 0.6em 1.4em;
  border-radius: 10px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(197, 160, 89, 0.35);
  transition: 0.25s;
  border: none;
}

.btn-prenota-top:hover,
.btn-nav:hover {
  background: #b28d45;
  transform: translateY(-2px);
}

/* ===============================
   HERO
================================= */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--stroke);
}

.slide {
  height: 62vh;
  min-height: 420px;
  display: none;
  background-size: cover;
  background-position: center;
}

.slide.active {
  display: block;
  animation: fade 1.2s ease;
}

@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* TESTO HERO CENTRALE */
.hero .headline {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.35);
  padding: 16px 22px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  max-width: 90%;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  margin: 0;
}

.hero p {
  margin-top: 6px;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* ===============================
   SEZIONI GENERICHE
================================= */
.section {
  padding: 40px 16px;
  border-bottom: 1px solid var(--stroke);
}

/* ===============================
   CARDS (CAMERE, SERVIZI)
================================= */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: #111117;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
}

/* ===============================
   FORM BASE
================================= */
.grid.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

input,
select,
textarea {
  background: #1a1a1f;
  border: 1px solid var(--stroke);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}

/* BOTTONI GENERICI */
.btn {
  background: var(--gold);
  color: #111;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
  border: none;
}

.btn:hover {
  background: #b28d45;
  transform: translateY(-2px);
}

/* ===============================
   FORM PRENOTAZIONE – BELLOSGUARDO
================================= */

#prenota {
  scroll-margin-top: 90px;
}

#prenota h2 {
  margin-bottom: 20px;
  font-size: 1.9rem;
}

/* Griglia principale: 2 colonne desktop */
#bookingForm {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  column-gap: 32px;
  row-gap: 16px;
  width: 100%;
}

/* Elementi che devono occupare entrambe le colonne */
#bookingForm .row-full {
  grid-column: 1 / -1;
}

/* Riga tipologia soggiorno */
.soggiorno-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

/* Radio inline (self check-in) */
.inline-options {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.inline-options label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Etichette nel form prenotazione */
#bookingForm label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Input & select del form prenotazione */
#bookingForm input,
#bookingForm select,
#bookingForm textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: #111117;
  color: var(--text);
  font-size: 0.98rem;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#bookingForm input:focus,
#bookingForm select:focus,
#bookingForm textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(197, 164, 109, 0.45);
  background: #15151c;
}

#bookingForm select {
  appearance: none;
}

/* File upload self check-in */
#docUploads input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px dashed var(--stroke);
  background: #0f0f12;
  cursor: pointer;
  font-size: 0.92rem;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

/* Riga finale (bottone + stato) */
.actions-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.actions-row .btn {
  min-width: 230px;
}

#status {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Sezioni dinamiche con transizione */
#docUploads,
#pernottamentoFields,
#pernottamentoFields2,
#dayuseFields,
#dayuseSlot {
  transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
}

/* Classe per nascondere sezioni via JS */
.is-hidden {
  max-height: 0 !important;
  opacity: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  transform: translateY(-4px);
}

/* ===============================
   ICONCINE FLOTANTI
================================= */
.floating-icon {
  position: fixed;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #050507;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  border: 2px solid var(--gold);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}

.floating-icon img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

/* WhatsApp sopra */
.floating-icon.wa {
  bottom: 70px;
  border-color: #25D366 !important;
  box-shadow: 0 0 10px rgba(37, 211, 102, 0.55);
}

/* Instagram sotto */
.floating-icon.ig {
  bottom: 20px;
  border-color: #E1306C !important;
  box-shadow: 0 0 10px rgba(225, 48, 108, 0.55);
}

.floating-icon:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
}

/* ===============================
   FOOTER
================================= */
.footer {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ===============================
   MOBILE (FINO A 768px)
================================= */
@media (max-width: 768px) {

  .logo img {
    height: 46px;
  }

  .logo span {
    font-size: 1rem;
    max-width: 70%;
    overflow: hidden;
  }

  .menu {
    flex-wrap: wrap;
    gap: 10px;
  }

  .menu a {
    font-size: 0.75rem;
  }

  .slide {
    height: 58vh;
    min-height: 340px;
  }

  .hero .headline {
    bottom: 20px;
    padding: 12px 16px;
    max-width: 94%;
  }

  .hero h1 {
    font-size: 1.25rem;
  }

  .hero p {
    font-size: 0.75rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .grid.two {
    display: block;
  }

  .grid.two > div {
    margin-bottom: 12px;
  }

  /* Iconcine mobile */
  .floating-icon {
    width: 32px;
    height: 32px;
    right: 14px;
  }

  .floating-icon.wa {
    bottom: 58px;
  }

  .floating-icon.ig {
    bottom: 14px;
  }

  .floating-icon img {
    width: 66%;
    height: 66%;
  }

    /* Form prenotazione mobile */
  #bookingForm {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 14px;
  }

  .actions-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .actions-row .btn {
    width: 100%;
  }

  #status {
    text-align: left;
  }
} /* <-- CHIUDE L'@MEDIA MOBILE */

/* ===============================
   ICONA CALENDARIO – VERSIONE VISIBILE
   (VALIDA PER DESKTOP E MOBILE)
================================= */

#bookingForm input[type="date"] {
  background: #111117;
  color: var(--text);
  border: 1px solid var(--stroke);
  padding: 11px 40px 11px 14px; /* spazio a destra per l’icona */
  border-radius: 10px;
  position: relative;
  font-size: 0.98rem;
}

/* Rende l’icona del calendario chiara e ben visibile */
#bookingForm input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(2.2) contrast(1.7);
  opacity: 1;
  cursor: pointer;
}

/* Firefox */
#bookingForm input[type="date"]::-moz-focus-inner {
  border: 0;
}

/* Focus */
#bookingForm input[type="date"]:focus {
  border-color: var(--gold);
  background: #15151c;
}

.cookie-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 16px 22px;
  border-radius: 10px;
  display: flex;
  gap: 15px;
  align-items: center;
  font-size: 14px;
  z-index: 9999;
  opacity: 0.97;
}

.cookie-banner.hidden {
  display: none;
}

.cookie-banner button {
  background: #bfa44f;
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}