/* ========== BASE STYLES ========== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fefcf3;
}
::-webkit-scrollbar-thumb {
  background: #064e3b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #047857;
}

/* ========== NAVBAR ========== */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(254, 252, 243, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08), 0 4px 20px rgba(6, 78, 59, 0.06);
}

#navbar.scrolled .font-serif {
  color: #064e3b !important;
}

#navbar.scrolled .text-emerald-600 {
  color: #047857 !important;
}

#navbar.scrolled .menu-line {
  background: #064e3b !important;
}

#navbar.scrolled nav a:not(.px-6) {
  color: #064e3b !important;
}

/* ========== MOBILE MENU ========== */
.mobile-link {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
  opacity: 1;
  transform: translateY(0);
}

#mobile-menu.open {
  opacity: 1;
  pointer-events: all;
}

#mobile-menu {
  transition: opacity 0.4s ease, pointer-events 0.4s ease;
}

/* ========== MENU ANIMATION ========== */
.menu-line {
  transition: transform 0.3s ease, width 0.3s ease, opacity 0.3s ease;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(2) {
  opacity: 0;
  width: 0;
}

#menu-btn[aria-expanded="true"] .menu-line:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
  width: 1.25rem;
}

/* ========== SERVICE CARDS ========== */
.service-card {
  will-change: transform;
}

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

/* ========== FORM SELECT ========== */
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%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

/* ========== REDUCED MOTION ========== */
@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, .reveal-left, .reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ========== IMAGE HOVER ========== */
.rounded-xl.overflow-hidden img {
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.rounded-xl.overflow-hidden:hover img {
  transform: scale(1.05);
}
