/* ============================================================
   animations.css — Scroll-to-Top, Transitions, Keyframes
   Singheswar Hospital Website
   ============================================================ */

/* ── Scroll-to-Top Button Animation ── */
.scroll-top-btn {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ── Navbar Mobile Menu Transition ── */
@media (max-width: 767px) {
  .nav-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 300ms ease;
  }

  .nav-links.open {
    max-height: 500px;
  }
}

/* ── Card Hover Transitions ── */
.service-card,
.doctor-card,
.gallery-item {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.service-card:hover,
.doctor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ── WhatsApp Button Pulse Animation ── */
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
}

.whatsapp-btn {
  animation: pulse 2s infinite;
}

/* ── Page Fade-In ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: fadeIn 400ms ease forwards;
}
