/* ===== Custom Styles for Um Saja Center ===== */

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

/* Navbar transition */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
  background-color: rgba(254, 253, 248, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

#navbar.scrolled .nav-logo-text {
  color: #064e3b;
}

#navbar.scrolled .nav-logo-sub {
  color: #047857;
}

#navbar.scrolled .nav-link {
  color: rgba(6, 78, 59, 0.8);
}

#navbar.scrolled .nav-link:hover {
  color: #064e3b;
}

/* Mobile menu */
#mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu.active .mobile-link {
  animation: fadeInUp 0.4s ease forwards;
  opacity: 0;
}

#mobile-menu.active .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu.active .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu.active .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu.active .mobile-link:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Menu toggle animation */
.menu-toggle.active .menu-line:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active .menu-line:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .menu-line:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
  width: 1.25rem;
}

/* Service card hover */
.service-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

/* Gallery items */
.gallery-item {
  aspect-ratio: 4 / 5;
  transition: transform 0.4s ease;
}

.gallery-item:nth-child(2) {
  aspect-ratio: auto;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
  }

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

  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
  .reveal-delay-4 { transition-delay: 0.4s; }
  .reveal-delay-5 { transition-delay: 0.5s; }
  .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Selection color */
::selection {
  background-color: rgba(6, 78, 59, 0.15);
  color: #064e3b;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
  background: #6ee7b7;
}

/* Form select arrow */
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: 4px;
}
