/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; }

/* ===== NAVBAR ===== */
#navbar {
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}
#navbar.scrolled {
  background: rgba(26, 26, 26, 0.97);
  backdrop-filter: blur(8px);
}
#navbar.hidden-nav {
  transform: translateY(-100%);
}

/* ===== UTILS ===== */
.section-title {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.04em;
}
.btn-primary {
  display: inline-block;
  background: #5CB85C;
  color: white;
  font-weight: 700;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  background: #e55a25;
  transform: translateY(-2px);
}
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: white;
  font-weight: 700;
  padding: 1rem 2.5rem;
  border-radius: 9999px;
  border: 2px solid white;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-secondary:hover {
  background: white;
  color: #1A1A1A;
}

/* ===== GSAP: elementi inizialmente invisibili per animazione ===== */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
}

/* ===== HERO VIDEO ===== */
.hero-bg {
  object-fit: cover;
}

/* Scroll indicator dot animation */
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(12px); opacity: 0.3; }
}
.scroll-dot {
  animation: scrollBounce 1.8s ease-in-out infinite;
}

/* ===== GALERÍA ===== */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  aspect-ratio: 4/3;
  min-height: 180px;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 107, 53, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}
.gallery-overlay span {
  font-size: 2rem;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  transform: scale(0.5);
}
.gallery-item:hover img {
  transform: scale(1.06);
}
.gallery-item:hover .gallery-overlay {
  background: rgba(26, 26, 26, 0.5);
}
.gallery-item:hover .gallery-overlay span {
  opacity: 1;
  transform: scale(1);
}

/* ===== LIGHTBOX ===== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.active {
  display: flex;
}
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  animation: lightboxIn 0.3s ease;
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: white;
  color: #1A1A1A;
  border: none;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover {
  background: #5CB85C;
  color: white;
}
@keyframes lightboxIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== FORM ===== */
.form-input:focus {
  border-color: #5CB85C;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}
.form-input::placeholder { color: #9ca3af; }

/* ===== CTA FINALE ===== */
@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.4); }
  50% { box-shadow: 0 0 0 20px rgba(255,255,255,0); }
}
.cta-pulse {
  animation: pulse-cta 2.5s ease-in-out infinite;
}

/* ===== RESPONSIVE POLISH ===== */
@media (max-width: 768px) {
  .section-title { letter-spacing: 0.02em; }
  #hero h1 { font-size: 3.5rem; }
}

/* ===== SCROLLBAR CUSTOM ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #1A1A1A; }
::-webkit-scrollbar-thumb { background: #5CB85C; border-radius: 3px; }

/* ===== SELECTION ===== */
::selection { background: #5CB85C; color: white; }

/* ===== IMG LOADING ===== */
/* Lazy loading moved to HTML attributes per image */

/* ===== FOCUS RING ===== */
a:focus-visible, button:focus-visible {
  outline: 2px solid #5CB85C;
  outline-offset: 3px;
  border-radius: 4px;
}
