/* Custom styles beyond Tailwind */

/* Ensure smooth rendering on all devices */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar for webkit */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1509;
}
::-webkit-scrollbar-thumb {
  background: #2d5e2d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3d7a3d;
}

/* Selection color */
::selection {
  background: #3d7a3d;
  color: #faf9f6;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #5e9f5e;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Prevent layout shift on images */
img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

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

/* Mobile menu animation */
#mobileMenu {
  animation: slideDown 0.2s ease-out;
}

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

/* Subtle hover lift on cards */
.group:hover {
  transform: translateY(-2px);
}

/* Ensure hero text is readable */
#hero h1,
#hero p {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Smooth image loading */
img {
  transition: opacity 0.3s ease;
}
img[loading="lazy"] {
  opacity: 0;
}
img[loading="lazy"].loaded {
  opacity: 1;
}
