/* ==================== BASE ==================== */
html {
  scroll-padding-top: 64px;
}

/* ==================== NAVBAR ==================== */
#navbar.scrolled {
  background: rgba(247, 245, 240, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-link {
  position: relative;
}

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

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.mobile-nav-link.active {
  color: #0F4C3A;
}

/* ==================== SERVICE ROWS ==================== */
.service-row {
  transition: border-color 0.3s ease;
}

/* ==================== RESULTS SCROLL ==================== */
#results::-webkit-scrollbar {
  height: 4px;
}

#results::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
}

#results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
}

/* ==================== CASE STUDY GRID ==================== */
/* First and fourth items span taller */
#case-studies .grid > div:nth-child(1),
#case-studies .grid > div:nth-child(4) {
  grid-row: span 1;
}

/* ==================== BACK TO TOP ==================== */
#back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

/* ==================== 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;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==================== MOBILE AOS OVERRIDE ==================== */
@media (max-width: 768px) {
  [data-aos] {
    duration: 500ms !important;
  }
}

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

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

::-webkit-scrollbar-thumb {
  background: #0F4C3A;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2E6B55;
}

/* ==================== SELECTION ==================== */
::selection {
  background: rgba(15, 76, 58, 0.2);
  color: #1C2320;
}

/* ==================== FORM STYLES ==================== */
input:focus,
textarea:focus {
  box-shadow: none;
}
