/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Georgia', serif;
  color: #2c2c2c;
  background: #faf8f4;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2.5rem;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #e4ddd0;
}
nav .logo {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: #5a3e28;
  font-style: italic;
  text-decoration: none;
  transition: color 0.2s;
}
nav .logo:hover,
nav .logo:focus {
  color: #b07d4f;
  text-decoration: none;
}
nav .nav-toggle {
  display: none;
  background: none;
  border: 0px solid #d4b896;
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  font-size: 2.4rem;
  color: #5a3e28;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* aggiunta per evitare che il menu cambi colore quando cliccato da Android */
nav .nav-toggle:hover,
nav .nav-toggle:focus,
nav .nav-toggle:active {
  color: #5a3e28;
  background: transparent;
  outline: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
nav ul a {
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a3e28;
  transition: color 0.2s;
}
nav ul a:hover { color: #b07d4f; }
.lang-dropdown {
  position: relative;
  display: inline-block;
}
.lang-toggle {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: none;
  border: 1px solid #d4b896;
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  color: #5a3e28;
  font-family: inherit;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.lang-toggle::after {
  content: '▾';
  font-size: 0.7rem;
  line-height: 1;
}
.lang-toggle:hover, .lang-dropdown.open .lang-toggle {
  background: #5a3e28;
  color: #fff;
  border-color: #5a3e28;
}
.lang-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid #e4ddd0;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  min-width: 80px;
  overflow: hidden;
  z-index: 200;
}
.lang-dropdown.open .lang-menu { display: block; }
.lang-menu button {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a3e28;
  cursor: pointer;
  transition: background 0.15s;
}
.lang-menu button:hover { background: #faf8f4; }
.lang-menu button.active { font-weight: bold; color: #b07d4f; }

/* ── HERO ── */
#hero {
  height: 100vh;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 60%, rgba(0,0,0,0.45) 100%),
    url('Images/DSCF0605_vistaStanzaTramonto.jpg') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  padding: 2rem;
}
#hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
#hero p {
  margin-top: 0.75rem;
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.9;
}
#hero .cta {
  margin-top: 2.5rem;
  padding: 0.85rem 2.5rem;
  border: 2px solid #fff;
  border-radius: 2px;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s, color 0.25s;
}
#hero .cta:hover { background: #fff; color: #5a3e28; }

/* ── SECTIONS ── */
section { padding: 5rem 2rem; }
.section-label {
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #b07d4f;
  margin-bottom: 0.5rem;
}
h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  color: #3b2a19;
  margin-bottom: 1rem;
}
.divider {
  width: 48px;
  height: 2px;
  background: #b07d4f;
  margin: 0 auto 2.5rem;
}

/* ── ABOUT ── */
#about { background: #fff; }
.about-grid {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-grid img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.about-text p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 1rem;
  text-align: justify;
  hyphens: auto;
}
.features {
  max-width: 980px;
  margin: 1.5rem auto 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  
}
.features span {
  padding: 0.35rem 0.9rem;
  border: 1px solid #d4b896;
  border-radius: 20px;
  font-size: 0.82rem;
  color: #7a5230;
  letter-spacing: 0.04em;
}

/* ── GALLERY ── */
#gallery { background: #faf8f4; }
.gallery-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 12px;
}
.gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 2px;
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.gallery-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.gallery-grid img.wide {
  grid-column: span 2;
  height: 300px;
}
.gallery-grid img.tall {
  height: 300px;
}

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 999;
  justify-content: center;
  align-items: center;
}
#lightbox.open { display: flex; }
#lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 2px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}
#lightbox .close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}
#lightbox .close:hover { opacity: 1; }
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.lightbox-arrow:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.6);
}
.lightbox-arrow.prev { left: 2rem; }
.lightbox-arrow.next { right: 2rem; }

/* ── REVIEWS ── */
#reviews { background: #faf8f4; }
.reviews-carousel-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
}
.reviews-grid {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding: 0;
}
.reviews-arrow {
  background: rgba(90, 62, 40, 0.1);
  border: 1px solid rgba(90, 62, 40, 0.2);
  color: #5a3e28;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.8rem 1rem;
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.reviews-arrow:hover {
  background: rgba(90, 62, 40, 0.2);
  border-color: rgba(90, 62, 40, 0.4);
}
.reviews-arrow.prev { order: -1; }
.reviews-arrow.next { order: 1; }
.review-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 4px;
  border: 1px solid #e4ddd0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  flex: 0 0 320px;
  min-height: 280px;
}
.review-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}
.review-info {
  flex: 1;
}
.guest-name {
  font-weight: 600;
  color: #3b2a19;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.review-source {
  font-size: 0.75rem;
  color: #b07d4f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.review-rating {
  font-size: 1rem;
  color: #ffc107;
  white-space: nowrap;
}
.review-text {
  color: #555;
  line-height: 1.6;
  font-size: 0.9rem;
}

/* ── CONTACT ── */
#contact { background: #fff; }
.contact-card {
  max-width: 520px;
  margin: 0 auto;
  background: #faf8f4;
  border: 1px solid #e4ddd0;
  border-radius: 4px;
  padding: 2.5rem;
  text-align: center;
}
.contact-card p {
  color: #666;
  line-height: 1.8;
  margin-bottom: 2rem;
}
.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #3b2a19;
}
.contact-separator {
  text-align: center;
  font-size: 0.95rem;
  color: #5a3e28;
  margin: 0 0 1rem;
}
.contact-item img.airbnb-logo {
  width: 24px;
  height: 24px;
  display: block;
}
.contact-item a {
  color: #b07d4f;
  text-decoration: none;
  transition: color 0.2s;
}
.contact-item a:hover { color: #7a5230; text-decoration: underline; }
.contact-icon { font-size: 1.3rem; }

/* ── LOCATION ── */
#location { background: #faf8f4; }
.map-container {
  max-width: 1100px;
  margin: 0 auto;
  border: 1px solid #e4ddd0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.map-container iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
}

/* ── FOOTER ── */
footer {
  background: #3b2a19;
  color: #c9b89a;
  padding: 1.5rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}
footer .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: left;
}

footer .footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
footer .footer-contact a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}
footer .footer-contact a:hover {
  color: #f5e7d6;
  text-decoration: underline;
}
footer .footer-contact p {
  margin: 0;
  color: #c9b89a;
}

.footer-sitemap {
  display: flex;
  flex-direction: row;
  gap: 3rem;
}

.footer-sitemap ul {
  display: flex;
  flex-direction: column;
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-sitemap li {
  margin-bottom: 0.4rem;
}
.footer-sitemap a {
  color: #fff;
  text-decoration: none;
}
.footer-sitemap a:hover {
  text-decoration: underline;
}

footer .footer-copywright {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

footer .footer-copy {
  text-align: center;
  color: #c9b89a;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav ul { gap: 1.2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid img.wide { grid-column: span 2; }
}
@media (max-width: 820px) {
  nav {
    padding: 1rem 1rem;
    justify-content: space-between;
  }
  nav .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 0;
  }
  nav .logo {
    order: 1;
  }
  nav .lang-dropdown {
    order: 2;
    margin-right: 0.75rem;
  }
  nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    transform: none;
    /* limite grandezza menu con meno spazio bianco a sinistra*/
    width: min(84vw, 180px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding-top 0.35s ease, border 0.35s ease, box-shadow 0.35s ease;
    padding-top: 0;
    background: rgba(255,255,255,0.98);
    border-radius: 0 0 12px 12px;
    border: none;
    box-shadow: none;
    z-index: 150;
  }
  nav.open ul {
    max-height: 450px;
    padding-top: 0.5rem;
    border: 1px solid #e4ddd0;
    box-shadow: 0 16px 36px rgba(0,0,0,0.16);
  }
  nav ul li {
    border-top: 1px solid #e4ddd0;
  }
  nav ul li:first-child {
    border-top: none;
  }
  nav ul a {
    display: block;
    padding: 1rem 1.25rem;
    text-align: left;
  }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid img.wide { grid-column: span 1; height: 220px; }
  .reviews-carousel-container {
    flex-direction: column;
    align-items: stretch;
  }
  .reviews-grid {
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0.5rem 1rem;
    display: flex;
    -webkit-overflow-scrolling: touch;
  }
  .reviews-grid::-webkit-scrollbar {
    display: none;
  }
  .review-card {
    flex: 0 0 85%;
    min-width: 85%;
    max-width: 85%;
    box-sizing: border-box;
    scroll-snap-align: start;
  }
  .reviews-arrow {
    display: none;
  }

  .contact-item {
  flex-direction: column;
  }

  .lang-toggle { font-size: 0.75rem; padding: 0.25rem 0.65rem; }
  .lang-menu button { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
  footer .footer-content {
    justify-content: center;
    align-items: center;
  }
  footer .footer-contact {
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 540px;
  }
  .footer-sitemap {
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 1rem;
  }
  .footer-sitemap ul {
    align-items: center;
    text-align: center;
  }
}

/* ── FOOTER LINK BUTTON (Cookie Settings) ── */
.footer-link-btn {
  background: none;
  border: none;
  padding: 0;
  color: #fff;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  text-decoration: none;
}
.footer-link-btn:hover { text-decoration: underline; }

/* ── MAP PLACEHOLDER (pre-consent) ── */
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  min-height: 420px;
  padding: 2rem;
  text-align: center;
  background: #fff;
}
.map-placeholder p {
  max-width: 480px;
  color: #666;
  line-height: 1.7;
}

/* ── COOKIE CONSENT BANNER ── */
.cookie-banner {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1200;
  background: #3b2a19;
  color: #f5e7d6;
  padding: 1.25rem 2rem;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.25);
}
.cookie-banner.open { display: flex; }
.cookie-banner-text {
  flex: 1 1 480px;
  max-width: 720px;
  font-size: 0.85rem;
  line-height: 1.6;
}
.cookie-banner-text a { color: #fff; text-decoration: underline; }
.cookie-banner-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

/* ── COOKIE BUTTONS ── */
.cookie-btn {
  padding: 0.6rem 1.3rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  border-radius: 2px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cookie-btn-primary {
  background: #b07d4f;
  border: 1px solid #b07d4f;
  color: #fff;
}
.cookie-btn-primary:hover { background: #8f6339; border-color: #8f6339; }
.cookie-btn-outline {
  background: transparent;
  border: 1px solid #c9b89a;
  color: #f5e7d6;
}
.cookie-btn-outline:hover { background: rgba(255,255,255,0.1); }
.cookie-btn-text {
  background: none;
  border: none;
  color: #f5e7d6;
  text-decoration: underline;
  padding: 0.6rem 0.4rem;
}

/* ── COOKIE PREFERENCES MODAL ── */
.cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1300;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.cookie-modal.open { display: flex; }
.cookie-modal-content {
  position: relative;
  background: #faf8f4;
  border-radius: 4px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.cookie-modal-content h3 {
  color: #3b2a19;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  font-weight: 400;
}
.cookie-modal-content > p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}
.cookie-modal-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #5a3e28;
  cursor: pointer;
}
.cookie-category {
  border-top: 1px solid #e4ddd0;
  padding: 1rem 0;
}
.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 600;
  color: #3b2a19;
  font-size: 0.95rem;
}
.cookie-category-desc {
  color: #666;
  font-size: 0.82rem;
  line-height: 1.6;
  margin-top: 0.4rem;
}
.cookie-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
/* light background here, so the outline button needs darker text/border than on the dark banner */
.cookie-modal-actions .cookie-btn-outline {
  border-color: #b07d4f;
  color: #5a3e28;
}
.cookie-modal-actions .cookie-btn-outline:hover {
  background: #5a3e28;
  border-color: #5a3e28;
  color: #fff;
}

/* ── COOKIE TOGGLE SWITCH ── */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.cookie-switch input { opacity: 0; width: 0; height: 0; }
.cookie-slider {
  position: absolute;
  inset: 0;
  background: #d4b896;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.cookie-slider::before {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.cookie-switch input:checked + .cookie-slider { background: #b07d4f; }
.cookie-switch input:checked + .cookie-slider::before { transform: translateX(18px); }
.cookie-switch.disabled .cookie-slider { cursor: not-allowed; opacity: 0.7; }

/* ── LEGAL PAGE (Privacy & Cookie Policy) ── */
.legal-page { background: #fff; padding-top: 8rem; }
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  color: #555;
  line-height: 1.8;
}
.legal-content h3 {
  color: #3b2a19;
  font-weight: 600;
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
}
.legal-content h4 {
  color: #5a3e28;
  font-weight: 600;
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { margin: 0 0 1rem 1.5rem; }
.legal-content li { margin-bottom: 0.5rem; }
.legal-content a { color: #b07d4f; }
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.88rem;
}
.legal-table th, .legal-table td {
  border: 1px solid #e4ddd0;
  padding: 0.6rem 0.8rem;
  text-align: left;
  vertical-align: top;
}
.legal-table th { background: #faf8f4; color: #3b2a19; }

@media (max-width: 768px) {
  .cookie-banner { padding: 1rem 1.25rem; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .cookie-btn { flex: 1 1 auto; }
  .legal-page { padding-top: 6.5rem; }
}

