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

:root {
  --green-dark: #1a2e1a;
  --green-mid: #2d4a2d;
  --green-light: #4a7c59;
  --gold: #c9a84c;
  --gold-light: #e2c47a;
  --cream: #f5f0e8;
  --stone: #8b7355;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-muted: #6b6b6b;
  --radius: 12px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-dark);
  background: var(--cream);
  overflow-x: hidden;
  padding-top: 76px;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(26, 46, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.2);
  transition: var(--transition);
}

nav .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
}

nav .nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav .nav-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}

nav .nav-links a:hover {
  color: var(--gold);
}

nav .nav-cta {
  background: var(--gold);
  color: var(--green-dark);
  border: none;
  padding: 0.6rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

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

/* ── HERO ── */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 60%, #3d5a3d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 8rem 2rem 4rem;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("../img/hero_bg_v1.jpg") center/cover no-repeat;
}

@media (orientation: portrait) {
  #hero::before {
    background-image: url("../img/hero_bg_narrow_v1.jpg");
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-badge {
  display: inline-block;
  margin-bottom: 1.2rem;
  background: rgba(10, 20, 10, 0.65);
  border: 1px solid rgba(201, 168, 76, 0.6);
  color: var(--gold);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 1.2rem;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.7), 0 0 60px rgba(0, 0, 0, 0.5);
}

.hero-title span {
  color: var(--gold);
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.7;
  margin-bottom: 0 !important;
  font-weight: 500;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 0, 0, 0.7);
}

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

/* ── HERO LOCATION PILLS ── */
.hero-location {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-top: 1.1rem;
  margin-bottom: 2rem;
}

.loc-pill {
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff !important;
  font-weight: 600;
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
}

.btn-primary {
  background: var(--gold);
  color: var(--green-dark);
  border: none;
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.5);
  padding: 0.85rem 2rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

/* ── VERIFICA DISPONIBILITÀ TRIGGER ── */
.availability-trigger {
  margin-top: 3rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0.9rem 1.8rem;
  border-radius: 50px;
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: var(--transition);
  animation: pulse-border 2.5s ease-in-out infinite;
}

.availability-trigger:hover {
  background: rgba(201, 168, 76, 0.2);
  border-color: var(--gold);
  color: var(--gold);
}

.availability-trigger .icon {
  font-size: 1.2rem;
}

@keyframes pulse-border {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(201, 168, 76, 0);
  }
}

/* ── ABOUT ── */
section {
  padding: 5rem 2rem;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green-light);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--green-dark);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.section-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 600px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

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

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--green-dark);
  font-weight: 700;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── SERVICES ── */
#servizi {
  background: var(--green-dark);
}

#servizi .section-label {
  color: var(--gold-light);
}

#chi-siamo {
  padding-bottom: 2rem;
}

/* Galleria: ridotto padding-top per avvicinarla alla mappa sovrastante */
#galleria {
  padding-top: 1rem;
}

#servizi .section-title {
  color: var(--white);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.service-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.8rem 1.2rem;
  text-align: center;
  transition: var(--transition);
}

.service-card:hover {
  background: rgba(201, 168, 76, 0.12);
  border-color: rgba(201, 168, 76, 0.3);
  transform: translateY(-4px);
}

.service-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.service-name {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}

.service-desc {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  margin-top: 0.3rem;
}

/* ── LOCATION MAP ── */
.location-map {
  margin-top: 3rem;
}

.location-map iframe,
.location-map #map-container {
  display: block;
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 1;
}

.map-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.map-footer a {
  color: var(--green-light);
  text-decoration: none;
  font-weight: 500;
}

.map-footer a:hover {
  color: var(--green-dark);
}

/* ── GALLERIA ── */
.gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 280px 280px;
  grid-auto-rows: 280px;
  gap: 1rem;
  margin-top: 3rem;
}

.gallery-item.video-item {
  grid-column: span 2;
  cursor: pointer;
  overflow: hidden;
}

.video-preview-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border: none;
}

.play-button-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  transition: background-color 0.3s ease;
  cursor: pointer;
  z-index: 2;
}

.play-label {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-item.video-item:hover .play-label {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item.video-item:hover .play-button-overlay {
  background: rgba(0, 0, 0, 0.45);
}

.play-button-circle {
  width: 76px;
  height: 76px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.play-button-circle i {
  color: var(--green-dark);
  font-size: 2.8rem;
  margin-left: 6px;
}

.gallery-item.video-item:hover .play-button-circle {
  transform: scale(1.12);
  background: var(--gold-light);
}

/* ── VIDEO MODAL ── */
.video-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 20, 10, 0.9);
  backdrop-filter: blur(8px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 1rem;
  gap: 0;
}

.video-overlay.active {
  display: flex;
}

/* Strip tappabile sopra/sotto il video: cresce per riempire lo spazio vuoto */
.video-close-strip {
  flex: 1;
  width: 100%;
  cursor: pointer;
  min-height: 40px; /* altezza minima garantita anche su schermi alti */
}

.video-panel {
  width: 90%;
  max-width: 380px;
  max-height: 72vh; /* Never fills the screen vertically, guaranteeing clickable gutters */
  aspect-ratio: 9 / 16;
  position: relative;
  animation: slideUp 0.35s ease;
}

.video-wrapper {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.gallery-item:first-child {
  grid-row: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 46, 26, 0.4) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover::after {
  opacity: 1;
}

/* ── BOOKING OVERLAY ── */
#booking-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 20, 10, 0.75);
  backdrop-filter: blur(6px);
  /* align-items removed to allow margin:auto centering */
  justify-content: center;
  padding: 2.5rem 1rem;
  overflow-y: auto;
}

#booking-overlay.active {
  display: flex;
}

.booking-panel {
  background: var(--white);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  margin: auto;
  /* Centering with margin:auto handles overflow better than align-items:center */
  max-height: none;
  /* Let the container handle the scroll if needed, or keep 90vh */
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  animation: slideUp 0.35s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.booking-header {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  padding: 1.8rem 2rem 1.4rem;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.booking-header-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--white);
}

.booking-header-sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  margin-top: 0.2rem;
}

.booking-close {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
  margin-left: 1rem;
}

.booking-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Steps indicator */
.steps-bar {
  display: flex;
  gap: 0;
  padding: 0 2rem;
  background: var(--cream);
  border-bottom: 1px solid #e5e0d5;
}

.step-tab {
  flex: 1;
  padding: 0.9rem 0.5rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  text-transform: uppercase;
}

.step-tab.active {
  color: var(--green-dark);
  border-bottom-color: var(--green-light);
}

.step-tab.done {
  color: var(--green-light);
}

.booking-body {
  padding: 2rem;
}

/* Step panels */
.step-panel {
  display: none;
}

.step-panel.active {
  display: block;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #d5cfc5;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  background: var(--white);
  transition: border-color var(--transition);
  color: var(--text-dark);
}

.form-control:focus {
  outline: none;
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.booking-actions {
  display: flex;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.btn-book {
  flex: 1;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  padding: 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-book:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
}

.btn-book:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-back {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid #d5cfc5;
  padding: 0.85rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-back:hover {
  border-color: var(--green-light);
  color: var(--green-dark);
}

/* Availability result */
.avail-result {
  padding: 1.2rem;
  border-radius: 10px;
  margin: 1.2rem 0;
  font-weight: 500;
  font-size: 0.95rem;
  display: none;
}

.avail-result.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.avail-result.danger {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.avail-result.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* Summary box */
.summary-box {
  background: var(--cream);
  border-radius: 10px;
  padding: 1.3rem;
  border: 1px solid #e5e0d5;
  margin-bottom: 1.2rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 0.35rem 0;
}

.summary-row.total {
  font-weight: 700;
  font-size: 1.1rem;
  border-top: 1px solid #d5cfc5;
  margin-top: 0.5rem;
  padding-top: 0.7rem;
  color: var(--green-dark);
}

.summary-row.discount {
  color: #2d6a2d;
}

/* Payment cards */
.payment-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.payment-card {
  border: 2px solid #d5cfc5;
  border-radius: 10px;
  padding: 1.2rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.payment-card:hover,
.payment-card.selected {
  border-color: var(--green-light);
  background: rgba(74, 124, 89, 0.05);
}

.payment-card .pay-icon {
  font-size: 1.8rem;
  margin-bottom: 0.4rem;
}

.payment-card .pay-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-dark);
}

.payment-card .pay-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Bank details */
.bank-details {
  background: #f0f7f0;
  border: 1px solid #c3dbc3;
  border-radius: 10px;
  padding: 1.3rem;
  margin-top: 1rem;
  display: none;
}

.bank-details.active {
  display: block;
}

.bank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  font-size: 0.88rem;
}

.bank-label {
  color: var(--text-muted);
}

.bank-value {
  font-weight: 600;
  color: var(--green-dark);
  font-family: monospace;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--green-light);
  font-size: 0.9rem;
  padding: 0.2rem;
}

.copy-btn:hover {
  color: var(--green-dark);
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    padding: 0.8rem 1.2rem;
  }

  nav .nav-links {
    display: none;
  }

  /* Hero più compatta su mobile: non occupa tutto lo schermo */
  #hero {
    min-height: 85vh;
    padding: 6rem 1.5rem 3rem;
  }

  .hero-location {
    gap: 0.4rem;
    margin-top: 0.7rem;
    margin-bottom: 1.5rem;
  }

  .loc-pill {
    font-size: 0.78rem;
    padding: 0.3rem 0.85rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-img img {
    height: 300px;
  }

  .location-map iframe,
  .location-map #map-container {
    height: 220px;
  }

  /* Ticket 83: services su 2 colonne per ridurre altezza verticale */
  .services-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    margin-top: 2rem;
  }

  .service-card {
    padding: 1.2rem 0.7rem;
  }

  .service-icon {
    font-size: 1.8rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 200px);
    grid-auto-rows: 200px;
  }

  .gallery-item:first-child {
    grid-row: span 1;
  }

  .gallery-item.video-item {
    grid-column: span 1;
    overflow: hidden;
  }

  .payment-options {
    grid-template-columns: 1fr;
  }

  .booking-body {
    padding: 1.5rem;
  }
}