/* ===== Merced Occupational Services — Custom Styles ===== */

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

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #fdf8f6;
}
::-webkit-scrollbar-thumb {
  background: #c23050;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1223e;
}

/* --- Navbar transitions --- */
.nav-text {
  transition: color 0.3s ease;
}
.nav-subtext {
  transition: color 0.3s ease;
}

/* --- Hero image fade-in --- */
.hero-img {
  animation: heroFadeIn 1.5s ease-out forwards;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}

/* --- Service cards --- */
.service-card {
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-4px);
}

/* --- Testimonial cards --- */
.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-card:hover {
  transform: translateY(-2px);
}

/* --- Scroll reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .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; }
}

/* --- Mobile menu animation --- */
#mobile-menu {
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 400px;
  opacity: 1;
}

/* --- Button ripple effect --- */
button, a {
  -webkit-tap-highlight-color: transparent;
}

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

/* --- Print styles --- */
@media print {
  #navbar, #contact-form, .reveal { display: none; }
  body { color: #000; background: #fff; }
  a { color: #7B2D3B; }
}
