/* PetServ custom styles */

/* ─── Hero section: rotating fade-in/fade-out brand-colored illustrations ─── */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #07304d 0%, #0a3d61 55%, #0e4f5c 100%);
  color: #fff;
}

.hero-bg-rotator {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  animation: heroFade 24s infinite;
}
.hero-bg-item svg { width: 100%; height: 100%; }
.hero-bg-item:nth-child(1) { animation-delay: 0s; }
.hero-bg-item:nth-child(2) { animation-delay: 6s; }
.hero-bg-item:nth-child(3) { animation-delay: 12s; }
.hero-bg-item:nth-child(4) { animation-delay: 18s; }

@keyframes heroFade {
  0%, 100% { opacity: 0; }
  4%       { opacity: 0.4; }
  21%      { opacity: 0.4; }
  25%      { opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
}

/* The rotating illustrations sit behind the headline/subhead text at
   reduced opacity (above), but text-shadow gives a second layer of
   guaranteed contrast regardless of which illustration/colors are
   behind it at any given moment. */
.hero-content h1,
.hero-content p.lead {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

/* Respect reduced-motion preferences — hold the first image visible at a
   steady low opacity instead of animating, rather than hiding it (a blank
   flash) or ignoring the preference entirely. */
@media (prefers-reduced-motion: reduce) {
  .hero-bg-item {
    animation: none !important;
    opacity: 0 !important;
  }
  .hero-bg-item:first-child {
    opacity: 0.4 !important;
  }
}

/* Toast container used by the "use my location" error messages —
   padded for iOS's bottom safe area (home indicator) on notched phones,
   where a plain bottom-0 sits uncomfortably close to/under it. */
#petserv-toast-container {
  padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
}

/* Popular categories grid on the homepage — small lift on hover so the
   cards read as clickable, matching the rest of the card-based UI. */
.category-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.5rem 1rem rgba(7, 48, 77, 0.15) !important;
}
