/* ============================================
   POLLINO FLOWER PARK — Landing Page Stylesheet
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
  /* --- Semantic Colors --- */
  --color-success: #27ae60;
  --color-warning: #F59E0B;
  --color-error: #e74c3c;
  --color-info: #3498db;

  /* --- Z-Index Scale --- */
  --z-negative: -1;
  --z-base: 1;
  --z-elevate: 10;
  --z-sticky: 100;
  --z-modal-backdrop: 900;
  --z-modal: 1000;
  --z-toast: 1100;

  --color-primary: #416951;
  --color-primary-dark: #345541;
  --color-secondary: #A6C3AD;
  --color-accent: #A6C3AD;
  --color-bg-light: #A6C3AD; /* Sfondo verde menta invece di grigio per le sezioni */
  --color-white: #FFFFFF;
  --color-text: #000000;
  --color-text-light: #555555;
  --color-gray-dark: #333333;
  --color-gray-light: #E0E0E0;
  --color-overlay: rgba(65, 105, 81, 0.65);

  --font-heading: 'Rubik', sans-serif;
  --font-body: 'Rubik', sans-serif;

  --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 32px rgba(0, 0, 0, 0.18);
  --shadow-card-hover: 0 12px 36px rgba(65, 105, 81, 0.2);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  --max-width: 1200px;
  --nav-height: 150px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.15;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

/* --- Prevenzione totale FOUT/FOIT per icone Google --- */
.material-symbols-rounded {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  display: inline-block;
  vertical-align: middle;
}

body.fonts-loaded .material-symbols-rounded {
  opacity: 1;
}

/* --- Utility --- */
.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-padding {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--color-primary);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  opacity: 0.85;
  margin-bottom: 6px;
}

.section-header .subtitle {
  font-size: 1.15rem;
  color: var(--color-text);
  max-width: 100%;
  margin: 0 auto;
}

.section-divider {
  width: 50px;
  height: 3px;
  background: var(--color-primary);
  border-radius: 2px;
  margin: 16px auto 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
}

/* ---------- CTA Primaria: sfondo chiaro ---------- */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}


.btn-white {
  background-color: var(--color-white);
  color: var(--color-primary);
}

.btn-white:hover {
  background-color: rgba(255,255,255,0.85);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===========================
   NAVBAR
   =========================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-modal);
  padding: 0 5%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-base);
  background-color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.navbar-logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 90px;
  width: auto;
  display: block;
  flex-shrink: 0; /* Impedisce al logo di schiacciarsi in flex */
  transition: height var(--transition-base);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  min-width: 0; /* Permette ai link di stringersi invece del logo */
}

.nav-links a {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  transition: color var(--transition-base);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-secondary);
  transition: width var(--transition-base);
}

.nav-links a:hover::after {
  width: 100%;
}

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

.nav-links .nav-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 30px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.nav-links .nav-cta:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Navbar Scrolled State */
.navbar.scrolled {
  height: 90px;
  box-shadow: var(--shadow-md);
}

.navbar.scrolled .logo-img {
  height: 70px;
}

.navbar.scrolled .nav-links .nav-cta {
  padding: 10px 24px;
  font-size: 0.95rem;
}

.mobile-socials {
  display: none;
}


/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: var(--z-modal);
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  width: 26px;
  height: 2.5px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===========================
   HERO
   =========================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 600px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('assets/panorama-parco-nazionale-del-pollino-viggianello.webp') center/cover no-repeat;
  z-index: var(--z-negative);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 35, 25, 0.75) 0%,
    rgba(30, 65, 45, 0.6) 50%,
    rgba(15, 35, 25, 0.9) 100%
  );
  z-index: var(--z-negative);
}

.hero-content {
  color: var(--color-white);
  max-width: 750px;
  padding: 0 20px;
}

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(3.6rem, 10vw, 4.4rem);
  line-height: 1.05;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 2px 5px rgba(0,0,0,0.4);
}

.hero-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--color-white);
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hero-content p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  margin-bottom: 36px;
  opacity: 0.92;
  line-height: 1.7;
}

.hero-btn {
  font-size: 1.15rem;
  padding: 16px 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hero-btn .material-symbols-rounded,
.hero-btn .hero-arrow-icon {
  transition: transform 0.3s ease;
}

.hero-btn:hover .material-symbols-rounded,
.hero-btn:hover .hero-arrow-icon {
  transform: translateY(4px);
}



.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: bounceDown 2s infinite;
}

.scroll-indicator span {
  display: block;
}

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

/* ===========================
   CHI SIAMO
   =========================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--color-primary);
  margin-bottom: 8px;
}

.about-text .section-divider {
  margin: 12px 0 24px;
}

.about-text p {
  font-size: 1.02rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: 32px;
}

.about-features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  padding: 0;
  border: none;
}

.about-feature:not(:last-child)::after {
  content: '|';
  color: var(--color-primary);
  margin-left: 12px;
  font-weight: 700;
}

.breakfast-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.breakfast-card {
  background-color: #EFF0F0;
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  border: 1px solid rgba(0,0,0,0.03);
}

.breakfast-card:hover {
  box-shadow: var(--shadow-md);
}

.breakfast-card .material-symbols-rounded {
  font-size: 28px;
  color: var(--color-primary);
  margin-bottom: 12px;
  display: block;
}

.breakfast-card h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
  line-height: 1.3;
}

.breakfast-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: 0;
}

.about-feature .emoji {
  font-size: 1.3rem;
  color: var(--color-primary);
}

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

.about-image > img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===========================
   ESPERIENZE E OFFERTE (FLYER GRID)
   =========================== */
#esperienze {
  background-color: var(--color-bg-light);
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden; /* Blocca il double-scroll: solo il grid interno scorre */
  padding: 0 60px; /* Spazio laterale per le frecce su desktop */
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-white);
  color: var(--color-primary);
  border: none;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: var(--z-elevate);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.carousel-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-50%) scale(1.05);
}

.carousel-container.at-start .carousel-prev {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.carousel-container.at-end .carousel-next {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.carousel-prev {
  left: 0;
}

.carousel-next {
  right: 0;
}

/* Style buttons and padding on mobile */
@media (max-width: 768px) {
  .carousel-btn {
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.92);
    font-size: 1.5rem;
  }
  .carousel-prev {
    left: 8px;
  }
  .carousel-next {
    right: 8px;
  }
  .carousel-container {
    padding: 0;
  }
  .experiences-flyer-grid {
    mask-image: none;
    -webkit-mask-image: none;
  }
  .flyer-card {
    flex: 0 0 75vw;
  }
}

.experiences-flyer-grid {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 30px;
  padding: 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  -webkit-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  touch-action: manipulation;
  
  /* Maschera di default (sfuma sia a sinistra che a destra) */
  mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black 97%, transparent);
  
  /* Nascondi scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* Gestione sfumature dinamiche in base alla posizione */
.carousel-container.at-start .experiences-flyer-grid {
  mask-image: linear-gradient(to right, black, black 97%, transparent);
  -webkit-mask-image: linear-gradient(to right, black, black 97%, transparent);
}

.carousel-container.at-end .experiences-flyer-grid {
  mask-image: linear-gradient(to right, transparent, black 3%, black);
  -webkit-mask-image: linear-gradient(to right, transparent, black 3%, black);
}

.carousel-container.at-start.at-end .experiences-flyer-grid {
  mask-image: none;
  -webkit-mask-image: none;
}

.experiences-flyer-grid::-webkit-scrollbar {
  display: none;
}

/* Disabilita l'effetto calamita per chi usa il mouse su computer */
@media (hover: hover) and (pointer: fine) {
  .experiences-flyer-grid {
    scroll-snap-type: none;
  }
  .flyer-card {
    scroll-snap-align: none;
  }
}

.flyer-card {
  flex: 0 0 340px; /* Larghezza fissa per non farle rimpicciolire */
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3/4;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.flyer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
  z-index: var(--z-base);
  transition: opacity var(--transition-base);
}

.flyer-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.flyer-card:hover::before {
  opacity: 0.8;
}

.flyer-card-content {
  position: relative;
  z-index: var(--z-elevate);
  padding: 30px 20px;
  width: 100%;
  color: var(--color-white);
  text-align: center;
}

.flyer-card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--color-white);
  line-height: 1.3;
  word-wrap: break-word;
  hyphens: auto;
}

.flyer-card-content p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  line-height: 1.4;
}

.flyer-card-content .btn {
  width: 100%;
  font-size: 0.85rem;
  padding: 10px 16px;
}


/* ===========================
   LE STANZE (OVERVIEW)
   =========================== */
#stanze {
  background-color: var(--color-bg-light);
}

.room-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
}

.room-overview-image {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

/* --- GALLERIA STANZE SLIDER --- */
.room-gallery-slider {
  position: relative;
  width: 100%;
  height: auto;
  overflow: hidden;
}

.room-gallery-track {
  display: flex;
  width: 100%;
  height: auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.room-gallery-track::-webkit-scrollbar {
  display: none;
}

.room-gallery-slide {
  width: 100%;
  flex-shrink: 0;
  scroll-snap-align: center;
}

.room-gallery-slide img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
}

.room-gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-elevate);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
  transition: all 0.25s ease;
}

.room-gallery-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-50%) scale(1.08);
}

.room-gallery-prev {
  left: 14px;
}

.room-gallery-next {
  right: 14px;
}

.room-gallery-slider.at-start .room-gallery-prev,
.room-gallery-slider.at-end .room-gallery-next {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 600px) {
  .room-gallery-prev {
    left: 8px;
  }
  .room-gallery-next {
    right: 8px;
  }
}

.room-gallery-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: var(--z-elevate);
  background-color: rgba(0,0,0,0.35);
  padding: 6px 12px;
  border-radius: 20px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.room-gallery-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.room-gallery-dots .dot.active {
  background-color: var(--color-white);
  transform: scale(1.3);
}

.room-overview-content {
  background: transparent;
  padding: 40px 0;
  border-radius: 0;
  color: var(--color-text);
  box-shadow: none;
}



.room-overview-content p {
  font-size: 1.05rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 16px;
}

.amenities-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 32px 0;
  background: var(--color-white);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.amenity-icon {
  font-size: 1.3rem;
  color: var(--color-primary);
}

.amenity-text {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

.room-overview-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ===========================
   RECENSIONI
   =========================== */
.reviews-marquee {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
  /* Maschera sfumata ai lati per un effetto elegante */
  mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.reviews-track {
  display: flex;
  width: max-content;
  animation: scrollReviews 40s linear infinite;
  will-change: transform;
}

.reviews-set {
  display: flex;
  gap: 30px;
  padding-right: 30px; /* Aggiunge il gap finale per mantenere la spaziatura perfetta tra i due set */
}

.reviews-track:hover {
  animation-play-state: paused;
}

@keyframes scrollReviews {
  0% { transform: translateX(0); }
  /* Spostiamo a sinistra esattamente del 50% (la larghezza di un intero .reviews-set inclusivo di gap) */
  100% { transform: translateX(-50%); }
}

.review-card {
  width: 380px;
  flex-shrink: 0;
  background: #688775;
  padding: 36px 30px;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.stars {
  color: var(--color-warning);
  font-size: 1.3rem;
  letter-spacing: 2px;
}

.half-star {
  position: relative;
  display: inline-block;
}

.half-star::after {
  content: "★";
  position: absolute;
  left: 0;
  top: 0;
  width: 50%;
  overflow: hidden;
  color: var(--color-warning);
}

.review-text {
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--color-white);
  flex-grow: 1;
}

.review-author {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-white);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 16px;
}

/* ===========================
   MODALS
   =========================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  background: linear-gradient(160deg, #4a7a5c 0%, #345541 40%, #2d4a3a 100%);
  width: 90%;
  max-width: 580px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  padding: 0;
  z-index: var(--z-modal);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  box-shadow: 0 25px 60px rgba(0,0,0,0.4);
  transform: translate(-50%, -45%);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: rgba(0,0,0,0.4);
  border: none;
  font-size: 1.6rem;
  color: var(--color-white);
  cursor: pointer;
  line-height: 1;
  transition: all var(--transition-fast);
  z-index: var(--z-elevate);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(0,0,0,0.6);
  transform: scale(1.1);
}

/* Hero image at top of modal */
.modal-hero {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  flex-shrink: 0;
}

.modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.modal-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, #345541 0%, transparent 100%);
}

.modal-hero-title {
  position: absolute;
  bottom: 16px;
  left: 28px;
  z-index: var(--z-elevate);
}

.modal-hero-title h2 {
  font-family: var(--font-heading);
  color: var(--color-white);
  font-size: 1.8rem;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* Tags / Badges */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 28px 12px;
}

.modal-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  background-color: rgba(255,255,255,0.15);
  color: var(--color-white);
}

.modal-tag .material-symbols-rounded {
  font-size: 1em;
  vertical-align: middle;
}

/* Scrollable content area */
.modal-content {
  background-color: transparent;
  color: var(--color-white);
  border-radius: 0;
  overflow-y: auto;
  flex: 1;
  margin: 0;
  padding: 0 28px 28px 28px;
  box-shadow: none;
}

.modal-content .package-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: inline-block;
}

.modal-content h2 {
  font-family: var(--font-heading);
  color: var(--color-white);
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 24px;
  text-align: center;
}

.modal-content p.modal-intro {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 24px;
  line-height: 1.7;
  text-align: left;
}

.modal-content p.modal-price {
  display: block;
  background-color: rgba(255,255,255,0.12);
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.15rem;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.2);
}

.modal-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 16px;
  text-align: left;
  line-height: 1.7;
}

.modal-content ul {
  text-align: left;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.08);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border-left: 3px solid rgba(255,255,255,0.4);
}

.modal-content li {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.85);
}

.modal-content li:last-child {
  margin-bottom: 0;
}

/* Section blocks with icon */
.modal-section {
  margin-bottom: 20px;
}

.modal-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-section-header .section-icon {
  font-size: 1.2rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.12);
  border-radius: 8px;
  flex-shrink: 0;
  color: var(--color-white);
}

.modal-section-header h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-white);
  margin: 0;
}

.modal-section p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  margin-bottom: 0;
  padding-left: 0;
}

/* Difficulty levels mini-cards */
.modal-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 0;
}

.modal-level-card {
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  border-left: 3px solid rgba(255,255,255,0.3);
}

.modal-level-card.level-easy {
  border-left-color: var(--color-success);
}

.modal-level-card.level-medium {
  border-left-color: var(--color-warning);
}

.modal-level-card.level-hard {
  border-left-color: var(--color-error);
}

.modal-level-card strong {
  display: block;
  font-size: 0.9rem;
  color: var(--color-white);
  margin-bottom: 4px;
}

.modal-level-card span {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

.modal-divider {
  height: 1px;
  background-color: rgba(255,255,255,0.15);
  margin: 20px 0;
  width: 100%;
}

/* ---------- CTA dentro modali ---------- */
.btn-modal-book {
  display: block;
  width: 100%;
  padding: 16px;
  background-color: var(--color-white);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: all var(--transition-base);
  text-align: center;
  margin-top: 24px;
}

.btn-modal-book:hover {
  background-color: rgba(255,255,255,0.9);
  color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* ===========================
   FORM PRENOTAZIONE
   =========================== */
#prenota {
  background-color: var(--color-bg-light);
}

.booking-wrapper {
  max-width: 720px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  grid-column: 1 / -1;
}

.guest-counter {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-gray-dark);
  border-radius: 6px;
  overflow: hidden;
  height: 48px;
  background-color: var(--color-white);
}

.guest-counter .btn-counter {
  background: var(--color-gray-light);
  border: none;
  width: 48px;
  height: 100%;
  font-size: 1.2rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guest-counter .btn-counter:hover {
  background: #e2e8f0;
}

.guest-counter input {
  flex: 1;
  border: none;
  text-align: center;
  font-size: 1rem;
  font-family: var(--font-body);
  font-weight: 500;
  -moz-appearance: textfield;
}

.guest-counter input::-webkit-outer-spin-button,
.guest-counter input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--color-text);
}

.required-label::after {
  content: " *";
  color: var(--color-error);
}

.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 13px 16px;
  border: 1.5px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  color: var(--color-text);
  transition: all var(--transition-fast);
  outline: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(65, 105, 81, 0.12);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa;
}

/* Placeholder visibile per input date su mobile (Safari/iOS non lo mostra) */
.form-group input[type="date"] {
  position: relative;
}

.form-group input[type="date"]:not(:focus):not(.has-value)::before {
  content: "gg/mm/aaaa";
  color: #aaa;
  pointer-events: none;
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.form-submit-area {
  text-align: center;
  margin-top: 30px;
}

.form-submit-area .btn {
  padding: 16px 40px;
  font-size: 1rem;
  width: 100%;
  max-width: 400px;
}


.form-alt-contact {
  text-align: center;
  margin-top: 20px;
  font-size: 0.93rem;
  color: var(--color-text-light);
}

.form-alt-contact a {
  color: var(--color-primary);
  font-weight: 600;
}

.form-alt-contact a:hover {
  text-decoration: underline;
}

/* ===========================
   CONTATTI & MAPPA
   =========================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.contact-info {
  padding-top: 10px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 24px;
  font-size: 1rem;
}

.contact-item .emoji {
  font-size: 1.3rem;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--color-primary);
}

.contact-item a {
  color: var(--color-primary);
  font-weight: 500;
}

.contact-item a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background-color: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: 1.6rem;
  color: var(--color-white);
  text-decoration: none;
  transition: all var(--transition-base);
}

.social-link:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.map-wrapper {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  height: 360px;
}

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

/* ===========================
   FOOTER
   =========================== */
.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 30px;
  padding-bottom: 20px;
}

.footer-brand h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem; /* Ingrandito per farlo sembrare un vero logo */
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.footer-brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.7;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
  white-space: nowrap;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-secondary);
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.footer-col ul li a:hover {
  opacity: 1;
}

.footer-col .contact-info-footer {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 2;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ===========================
   SCROLL REVEAL ANIMATION
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* ===========================
   RESPONSIVE — Tablet (≤1024px)
   =========================== */
@media (max-width: 1024px) {
  .about-grid {
    gap: 40px;
  }

  .room-overview-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .room-overview-image {
    height: auto;
  }

  .reviews-marquee {
    mask-image: none;
    -webkit-mask-image: none;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    padding-bottom: 20px; /* Spazio per l'ombra */
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: manipulation;
  }
  
  .reviews-marquee::-webkit-scrollbar {
    display: none;
  }

  .reviews-track {
    animation: none !important;
    width: auto;
  }
  
  .reviews-set {
    padding-right: 0;
    gap: 20px;
  }
  
  /* Nascondi il set duplicato per evitare scorrimento infinito */
  .reviews-set[aria-hidden="true"] {
    display: none;
  }
  
  .review-card {
    width: 300px;
    padding: 24px 20px;
    scroll-snap-align: start;
    transform: none !important; /* Disabilita hover transform */
  }

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

/* ===========================
   RESPONSIVE — Mobile (≤768px)
   =========================== */
@media (max-width: 768px) {
  :root {
    --nav-height: 120px;
  }

  .logo-img {
    height: 100px;
  }

  .section-padding {
    padding: 70px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  /* General Text Reduction */
  p {
    font-size: 0.95rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  h3 {
    font-size: 1.25rem;
  }

  /* Navbar Mobile */
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 320px;
    height: 100vh;
    height: 100dvh;
    background: var(--color-white);
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    padding: 40px 30px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right var(--transition-base);
    z-index: var(--z-modal-backdrop);
    overflow-y: auto; /* Garantisce lo scorrimento sicuro su telefoni ruotati in orizzontale */
    max-height: 100vh;
    max-height: 100dvh;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a:not(.mobile-socials a):not(.nav-cta) {
    color: var(--color-text);
    font-size: 1.3rem;
  }

  .mobile-socials {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
  }

  .mobile-socials a {
    color: var(--color-primary);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(65, 105, 81, 0.1);
    border-radius: 50%;
  }

  .nav-links .nav-cta {
    background-color: var(--color-primary);
    color: var(--color-white);
    width: 100%;
    text-align: center;
    font-size: 1.05rem;
    padding: 14px 30px;
    border-radius: var(--radius-sm);
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: var(--z-modal-backdrop);
  }

  .mobile-overlay.active {
    display: block;
  }

  /* Hero */
  .hero-eyebrow {
    font-size: 0.85rem;
    letter-spacing: 3px;
    margin-bottom: 12px;
  }

  .hero-content h1 {
    font-size: clamp(2.3rem, 10vw, 3.2rem);
    line-height: 1.05;
    word-break: break-word;
    hyphens: auto;
  }

  .hero-content p {
    font-size: 0.95rem;
    padding: 0 10px;
    margin-bottom: 24px;
  }

  .hero-btn {
    font-size: 1rem;
    padding: 12px 28px;
  }

  /* About & Breakfast */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .breakfast-grid {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }

  .about-image img {
    height: auto;
  }

  .about-features {
    justify-content: center;
    gap: 6px;
  }
  
  .about-feature {
    font-size: 0.85rem;
    gap: 4px;
  }
  
  .about-feature:not(:last-child)::after {
    margin-left: 6px;
  }

  /* Stanze */
  .amenities-container {
    grid-template-columns: 1fr;
  }
  .room-overview-cta {
    flex-direction: column;
  }
  .room-overview-cta .btn {
    width: 100%;
  }

  /* Form */
  .booking-wrapper {
    padding: 32px 20px;
  }

  .form-grid,
  .form-group-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-group input,
  .form-group select {
    font-size: 16px; /* Previene lo zoom automatico su iPhone / Safari */
    padding: 12px 14px;
    height: 48px;
  }

  .form-group textarea {
    font-size: 16px;
    padding: 12px 14px;
    height: auto;
  }

  .guest-counter {
    height: 48px;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .map-wrapper {
    height: 280px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  /* Modal Tags */
  .modal-tags {
    gap: 6px;
    padding: 10px 16px 8px;
  }
  .modal-tag {
    font-size: 0.65rem;
    padding: 3px 8px;
    gap: 3px;
  }
}



/* ===========================
   PULSANTE TORNA SU (BACK TO TOP)
   =========================== */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@media (max-width: 600px) {
  .back-to-top {
    bottom: 85px; /* Evita qualsiasi sovrapposizione con il banner Cookie su schermi piccoli */
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* --- Classi di utilita (sostituzione inline styles) --- */
.review-rating {
  font-size: 0.9rem;
  color: var(--color-white);
  margin-left: 8px;
}



.footer-logo {
  max-height: 120px;
  margin-bottom: 24px;
}

.footer-description {
  font-size: 0.85rem;
  line-height: 1.6;
  opacity: 0.9;
}

.footer-bottom-bar {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.2);
  margin-top: 40px;
  padding-top: 20px;
}

.footer-legal-text {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 6px;
}

.footer-socials {
  margin-top: 16px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-socials a {
  color: inherit;
  text-decoration: none;
  font-size: 1.4rem;
  transition: opacity 0.3s;
}

.footer-socials a:hover {
  opacity: 0.7;
}

.footer-inline-link {
  color: inherit;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reviews-track { animation: none; }
}
