/* Custom Styles for A. Caserta */

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #fefbf7;
}

::-webkit-scrollbar-thumb {
  background: #166534;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #15803d;
}

/* Scroll Indicator Animation */
@keyframes scrollIndicator {
  0% {
    transform: translateY(-100%);
  }
  100% {
    transform: translateY(100%);
  }
}

.animate-scroll-indicator {
  animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Reveal Animations */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.hidden {
  opacity: 0;
  transform: translateY(30px);
}

/* Mobile Menu Transition */
#mobileMenu {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Link Hover Effect */
.mobile-link {
  position: relative;
}

.mobile-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #166534;
  transition: width 0.3s ease;
}

.mobile-link:hover::after {
  width: 100%;
}

/* Navbar Scroll Effect */
.nav-scrolled {
  background: rgba(254, 251, 247, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Form Focus Styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.1);
}

/* Button Hover Effects */
button:hover,
a:hover {
  transition: all 0.3s ease;
}

/* Image Loading */
img {
  opacity: 1;
  transition: opacity 0.3s ease;
}

img[loading="lazy"] {
  opacity: 0;
}

img.loaded {
  opacity: 1;
}

/* Reduced Motion */
@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;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Print Styles */
@media print {
  nav,
  #contactForm,
  .reveal {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  a {
    color: black !important;
    text-decoration: underline;
  }
}
