html {
  scroll-behavior: smooth;
}
body {
      scroll-behavior: smooth;
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    }
    .navbar {
      background: rgba(0,0,0,0.8);
      backdrop-filter: blur(6px);
    }
    .navbar a {
      color: #fff !important;
      transition: color 0.3s ease;
    }
    .navbar a:hover {
      color: #ffc107 !important;
    }
    section {
      padding: 100px 0;
      min-height: 100vh;
      display: flex;
      align-items: center;
    }
    #home {
      background: url("../me/me_banner.jpeg") center/cover no-repeat;
      color: white;
      text-shadow: 0 2px 6px rgba(0,0,0,0.7);
       position: relative;
        overflow: hidden;
    }
    #home::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45); /* Cambia l'opacità a piacere */
    z-index: 1;
    }
    #home .container {
    position: relative;
    z-index: 2;
    }
    #immagini img {
      transition: transform 0.4s ease, box-shadow 0.4s ease;
    }
    #immagini img:hover {
      transform: scale(1.05);
      box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    }
    #social a {
      transition: transform 0.3s ease;
    }
    #social a:hover {
      transform: scale(1.2);
      color: #ffc107 !important;
    }

/*Bottone*/
/* From Uiverse.io by vinodjangid07 */ 
.button {
  width: 240px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  cursor: pointer;
  border: 3px solid rgb(255, 239, 94);
  background-color: rgb(255, 239, 94);
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.137);
}

.text {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgb(27, 27, 27);
  color: white;
}

.arrow path {
  fill: rgb(19, 19, 19);
}

.button:hover .arrow {
  animation: slide-in-left 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

@keyframes slide-in-left {
  0% {
    transform: translateX(-8px);
    opacity: 0;
  }

  100% {
    transform: translateX(0px);
    opacity: 1;
  }
}

.button:active {
  transform: scale(0.97);
}



/*Gallery*/

.gallery-img {
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-img:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Nasconde gli elementi di default */
.gallery-item {
  display: none;
}
.gallery-item.show {
  display: block;
}

.filter-btn.active {
  background-color: #000;
  color: #fff;
}


.gallery-filters {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 1px;
}

.filter-link {
  margin: 0 15px;
  cursor: pointer;
  color: #555;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s ease;
}

.filter-link:hover {
  color: #000;
}

.filter-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.3s ease;
}

.filter-link:hover::after,
.filter-link.active::after {
  width: 100%;
}

.filter-link.active {
  font-weight: 600;
  color: #000;
}

/* gallery items */
.gallery-item {
  display: none;
}
.gallery-item.show {
  display: block;
}


/* Gallery item *//* LIGHTBOX - centrato perfettamente */
/* LIGHTBOX */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 20px 0;
}

/* Contenitore immagine + caption */
.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 90%;
}

/* Immagine centrata */
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
  object-fit: contain;
  margin-bottom: 10px;
}

/* Caption */
.lightbox-caption {
  color: #ddd;
  font-size: 1rem;
  letter-spacing: 0.5px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  max-width: 80%;
  word-wrap: break-word;
  margin-top: 5px;
}

/* Pulsante chiusura */
.lightbox .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

/* Frecce perfettamente centrate rispetto all'immagine */
.lightbox-controls {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-size: 40px;
  padding: 0 40px;
  pointer-events: none; /* evita click casuali */
  transform: translateY(-60px); /* alza tutto di un po' per compensare la caption */
}

.lightbox-controls span {
  pointer-events: auto; /* riattiva click solo sulle frecce */
  cursor: pointer;
  user-select: none;
  transition: color 0.3s;
}

.lightbox-controls span:hover {
  color: #ffc107;
}

.gallery-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.gallery-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.gallery-wrapper:hover img {
  transform: scale(1.05);
}

/* Overlay */
.gallery-wrapper .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;

  opacity: 0;
  transition: opacity 0.4s ease;
  font-size: 1rem;
  text-align: center;
}

.gallery-wrapper:hover .overlay {
  opacity: 1;
}
/* --- Freccia scroll --- */
.scroll-arrow {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2rem;
  color: white;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 10;
}

/* Effetto movimento "soft" verso il basso */
.scroll-arrow i {
  animation: bounce 1.8s infinite;
}

/* Animazione che fa apparire dopo qualche secondo */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 0.8; }
}

/* Animazione freccia che si muove */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(8px);
  }
  60% {
    transform: translateY(4px);
  }
}

/* Scompare quando l'utente scorre */
.scroll-arrow.hidden {
  opacity: 0;
  pointer-events: none;
}


.lightbox-content {
  text-align: center;
  max-width: 90%;
}

.lightbox-caption {
  color: #ddd;
  margin-top: 12px;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  font-family: 'Segoe UI', sans-serif;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
