:root {
  --blue-zodiac: #0e223a;
  --pearl-bush: #e9e2d4;
  --ebony: #0b131d;
  --mako: #454b4f;
  --oslo-gray: #919495;
  --cello: #1f3f5c;
  --scrollbar-thumb-color: var(--blue-zodiac);
  --scrollbar-thumb-hover-color: var(--ebony);
  --scrollbar-track-color: transparent; /* sfondo della traccia */
  --scrollbar-width: 8px;
}

/* Per i browser WebKit (Chrome, Safari, Edge nuovi) */
::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
  background-color: transparent;
}

::-webkit-scrollbar-track {
  background-color: var(--scrollbar-track-color);
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb-color);
  border-radius: 999px; /* arrotondato */
  border: 2px solid transparent; /* per “buffer” trasparente intorno al bordo */
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover-color);
}

/* Per Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: 'Montserrat', sans-serif;
  scroll-behavior: smooth;
  background-color: var(--ebony);
  color: var(--pearl-bush);
}

.section {
  min-height: 100dvh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--pearl-bush);
}

/* Hero con overlay + testo */
.fancy-hero {
  justify-content: left !important;
  position: relative;
  overflow: hidden;
  height: 100dvh;
  padding: 4rem 2rem 4rem 0;
}

.hero-swiper {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-swiper .swiper-slide {
  background-size: cover;
  background-position: center;
  width: 100%;
  height: 100%;
}

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 38, 66, 0.7);
  z-index: 1;
  transition: background 0.3s ease;
  backdrop-filter: blur(0px);
}

.hero-content {
  position: relative;
  height: 100dvh;
  z-index: 2;
  max-width: 300px;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  /* Rimuovi altezza fissa */
  /* height: 100vh; */
  text-align: left;
  gap: 2rem;
  padding-top: 6rem; /* eventualmente aggiungi spazio sopra */
  padding-bottom: 6rem; /* spazio sotto */
  margin: 0 !important;
}

/* Testo invisibile inizialmente */
.hero-title {
  display: flex;
  flex-direction: column;
  line-height: 0.6;
  align-items: flex-start;
  text-align: left;
  font-size: clamp(2.2rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--pearl-bush);
  letter-spacing: 2px;
  transform: translateY(40px) scale(0.8);
  transition: transform 0.8s ease-out, opacity 0.8s ease-out;
  margin-top: 2dvw;
}

.hero-subtitle {
  display: flex;
  flex-direction: column;
  line-height: 0.9;
  align-items: flex-start;
  text-align: left;
  font-size: clamp(1.5rem, 1dvw, 2.5rem);
  font-weight: 500;
  color: var(--pearl-bush);
  opacity: 0;
  transform: translateY(30px);
  transition: transform 1s ease-out 0.3s, opacity 1s ease-out 0.3s;
  max-width: 90%;
  margin-top: 2dvw;
}

.cta-button {
  text-align: left;
  padding: 0.6rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blue-zodiac);
  background-color: var(--pearl-bush);
  border: none;
  border-radius: 50px;
  opacity: 0;
  transform: scale(0.6);
  transition: transform 0.6s ease-out 0.6s, opacity 0.6s ease-out 0.6s;
  margin-top: 2dvw;
}

.cta-button:hover {
  transform: scale(1.05);
  background-color: var(--oslo-gray);
  color: var(--ebony);
}

/* Quando la classe “visible” è attiva, mostra il testo */
.hero-content.visible .hero-title,
.hero-content.visible .hero-subtitle,
.hero-content.visible .cta-button {
  opacity: 1;
  transform: none;
}

/* Colori delle altre sezioni */
.gallery { background-color: var(--cello); }
.instagram { background-color: var(--blue-zodiac); }
.map { background-color: var(--mako); }
.contacts { background-color: var(--ebony); }
.footer { background-color: var(--blue-zodiac); color: var(--oslo-gray); }

.content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Carousel in galleria */
.carousel-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.carousel-container img {
  width: 100%;
  max-width: 200px;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

.carousel-container img:hover {
  transform: scale(1.05);
}

/* Instagram link */
.instagram a {
  color: var(--pearl-bush);
  font-size: 1.2rem;
  text-decoration: none;
  margin-top: 1rem;
  display: inline-block;
}

/* Contatti */
.contacts ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

.contacts li {
  margin: 0.5rem 0;
}

.contacts a {
  color: var(--pearl-bush);
  text-decoration: none;
  font-size: 1.1rem;
}

.contacts a i {
  margin-right: 0.5rem;
}

/* Footer */
footer p {
  font-size: 0.9rem;
  opacity: 0.7;
}

.maps iframe {
  width: 100%;
  max-width: 300px;
  height: 200px;
}

/* Sezione heder */
/* Header fisso moderno */
.header {
  position: fixed;
  width: 100dvw;
  backdrop-filter: saturate(180%) blur(12px);
  box-shadow: 0 2px 8px rgb(0 0 0 / 0.1);
  display: flex;
  align-items: center;
  z-index: 9999;
  font-family: 'Montserrat', sans-serif;
  background: rgba(17, 38, 66, 0.5);
}

.container {
  background: var(--blue-zodiac);
  width: 100dvw;
  height: 7dvh;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Logo */
.logo {
  display: flex;
  align-items: start-flex;
  font-weight: 700;
  font-size: 1.25rem;
  color: #111;
  text-decoration: none;
  user-select: none;
  cursor: pointer;
  transition: color 0.3s ease;
}
.logo img {
  padding-left: 3dvh;
  height: 7dvh;
  width: auto;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.1));
}

/* Menu Button */
.menu-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  padding-right: 3dvw;
  width: 40px;
  height: 40px;
  display: flex;
  flex-direction: column; /* IMPORTANTE per disporre le barre in verticale */
  justify-content: center;
  align-items: center;
  gap: 6px; /* Spazio tra le barre */
  z-index: 10001;
}


.menu-button .bar {
  width: 24px;
  height: 3px;
  background-color: var(--pearl-bush);
  border-radius: 2px;
  transform-origin: center;
  transition: all 0.3s ease;
}

.menu-button i {
  pointer-events: none; /* fa sì che il click venga sul button, non sull'icona */
}
.menu-button:hover {
  color: var(--oslo-gray);
}

/* Dropdown menu */
.menu-dropdown {
  position: absolute;
  top: 60px;
  right: 20px;
  background: var(--pearl-bush);
  border-radius: 8px;
  box-shadow: 0 8px 16px rgb(0 0 0 / 0.12);
  padding: 8px 0;
  list-style: none;
  min-width: 160px;
  font-weight: 600;
  font-size: 1rem;
  user-select: none;
  z-index: 10000;
  opacity: 0;
  transform: translateY(-10px);
}

.menu-dropdown[hidden] {
  display: block !important;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}

.menu-dropdown:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-dropdown li {
  padding: 8px 20px;
}
.menu-dropdown li a {
  color: var(--ebony);
  text-decoration: none;
  display: block;
  transition: background-color 0.25s ease;
}
.menu-dropdown li a:hover,
.menu-dropdown li a:focus {
  background-color: var(--blue-zodiac);
  color: var(--pearl-bush);
  outline: none;
}

/* Icona freccia */
.fas.fa-chevron-down {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

/* Ruota freccia quando menu aperto */
.menu-button[aria-expanded="true"] .fas.fa-chevron-down {
  transform: rotate(180deg);
}
