@import url('https://fonts.googleapis.com/css2?family=Didot&display=swap');

body {
  margin: 0;
  font-family: 'Didot', serif;
  color: #000;
  background-color: #fff;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid #000;
  z-index: 1000;
}
.logo {
  text-decoration: none;
  font-size: 1.2rem;
  color: #000;
}
.menu-toggle {
  width: 30px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}
.menu-toggle div {
  width: 100%;
  height: 3px;
  background: #000;
}

/* NAV */
#nav {
  position: fixed;
  top: 0; right: 0;
  width: 75%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  transform: translateX(100%);
  transition: transform 0.4s ease;
  z-index: 999;
}
#nav.active { transform: translateX(0); }
#menu-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}
#menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}
.menu {
  list-style: none;
  padding: 60px 20px;
}
.menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 1.3rem;
  margin: 20px 0;
  text-transform: uppercase;
}
.menu a.active { color: #ccc; }

/* === HERO VIDEO COMPLETAMENTE VISIBILE === */
:root { --vh: 1vh; }

.hero {
  position: relative;
  width: 100vw;
  height: calc(var(--vh) * 100); /* usa altezza effettiva viewport */
  background: #000; /* bande nere per rapporti diversi */
  overflow: hidden;
}

.hero video {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  object-fit: contain; /* mostra tutto il video */
  object-position: center;
  background-color: #000;
}



#mute-btn {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: none;
  border: none;
  cursor: pointer;
}
#mute-btn .icon {
  width: 30px;
  height: 30px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: brightness(0) invert(1);
}
.icon.mute { background-image: url('../icons/mute.png'); }
.icon.unmute { background-image: url('../icons/volume.png'); }

/* === GALLERY GRID 2 COLONNE SIMMETRICHE === */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 4px;
}

.grid img {
  width: 100%;
  aspect-ratio: 2 / 3; /* preview verticale proporzionata */
  object-fit: cover;
  display: block;
}


/* ABOUT & CONTACTS */
.about, .contacts {
  padding: 30px 20px;
  text-align: center;
}
.about img {
  width: 100%;
  max-width: 300px;
  border-radius: 0;
  margin-bottom: 20px;
}
.contacts img {
 width: 100%;
  max-width: 300px;
  border-radius: 0;
  margin-bottom: 20px;
}

.about p, .contacts p {
  line-height: 1.6;
}
/* === LINK PULITI NELLA PAGINA CONTATTI === */
.contacts a {
  text-decoration: none;    /* rimuove la sottolineatura */
  color: inherit;           /* usa lo stesso colore del testo */
}

.contacts a:visited {
  color: inherit;
}

.contacts a:hover,
.contacts a:active,
.contacts a:focus {
  text-decoration: none;
  color: inherit;
  outline: none;
}


/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid #000;
  font-size: 0.9rem;
}
/* === LIGHTBOX POPUP === */
#lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  z-index: 2000;
  flex-direction: column;
}

#lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

#lightbox img {
  max-width: 100%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 4px;
}

#lightbox .close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 10px 15px;
  user-select: none;
}

.nav-btn.prev { left: 15px; }
.nav-btn.next { right: 15px; }


/* === PRELOADER (solo se presente in index) === */
#preloader {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Didot', serif;
  font-size: 1.2rem;
  letter-spacing: 1px;
  z-index: 3000;
  opacity: 1;
  transition: opacity 0.6s ease;
}

#preloader.fade-out {
  opacity: 0;
  pointer-events: none;
  visibility: hidden; 
}

.loader-logo {
  animation: fadeLogo 1.5s ease-in-out infinite alternate;
}

@keyframes fadeLogo {
  from { opacity: 0.3; }
  to { opacity: 1; }
}
