/* ===== CUSTOM STYLES ===== */

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

/* Selection color */
::selection {
  background-color: #bbf7d0;
  color: #052e16;
}

/* ===== NAVBAR ===== */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #166534;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 60%;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Default state for reveal elements — visible without JS */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  
  .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== MOBILE MENU ===== */
#mobile-menu {
  animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-link {
  transition: all 0.2s ease;
}

.mobile-link:hover {
  padding-left: 0.75rem;
}

/* ===== CARD HOVER EFFECTS ===== */
.reveal:hover .aspect-\[4\/3\] img {
  transform: scale(1.05);
}

/* ===== GALLERY ===== */
.gallery-item {
  overflow: hidden;
}

.gallery-item img {
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ===== BUTTON RIPPLE ===== */
button, a {
  -webkit-tap-highlight-color: transparent;
}

/* ===== FORM STYLES ===== */
input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: #86efac;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4ade80;
}

/* ===== BACK TO TOP ===== */
#back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#back-to-top:not(.visible) {
  opacity: 0;
  pointer-events: none;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
  border-radius: 4px;
}
