/* ==========================================================================
   Clínica Veterinária Petrópolis — Estilos customizados
   Tailwind cuida do layout; aqui ficam efeitos, animações e detalhes.
   ========================================================================== */

::selection {
  background-color: rgba(5, 150, 105, 0.18);
  color: #0f172a;
}

html {
  scroll-padding-top: 96px;
  overflow-x: clip;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Fallback para navegadores sem suporte a `clip` */
@supports not (overflow: clip) {
  html, body {
    overflow-x: hidden;
  }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #f8fafc;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 8px;
  border: 2px solid #f8fafc;
}
::-webkit-scrollbar-thumb:hover {
  background: #059669;
}

/* ---------- Texto em gradiente ---------- */
.text-gradient {
  background: linear-gradient(120deg, #059669 0%, #10b981 55%, #0d9488 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Destaque sublinhado âmbar (quebra linha no mobile) ---------- */
.marker-highlight {
  background-image: linear-gradient(120deg, rgba(245, 158, 11, 0.4), rgba(245, 158, 11, 0.4));
  background-repeat: no-repeat;
  background-size: 100% 0.38em;
  background-position: 0 88%;
  border-radius: 0.12em;
  padding: 0 0.05em;
}

/* ---------- Blobs decorativos de fundo ---------- */
.blob {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
}

/* ---------- Padrão de pontos (dot grid) ---------- */
.dot-grid {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.35) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
.dot-grid--dark {
  background-image: radial-gradient(circle, rgba(5, 150, 105, 0.16) 1.5px, transparent 1.5px);
}

/* ---------- Header: estado ao rolar ---------- */
#site-header {
  background: rgba(248, 250, 252, 0);
}
#site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 30px -12px rgba(15, 23, 42, 0.14);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

/* Link ativo da navegação */
.nav-link {
  position: relative;
}
.nav-link.active {
  color: #059669;
}
.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #059669, #34d399);
}

/* ---------- Brilho deslizante nos botões (shine sweep) ---------- */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 45%;
  height: 100%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  z-index: 1;
  animation: shine 3.4s ease-in-out infinite;
}
@keyframes shine {
  0%, 55% { left: -80%; }
  100% { left: 140%; }
}

/* ---------- Anel de pulso (WhatsApp flutuante / botões de urgência) ---------- */
.pulse-ring {
  animation: pulse-ring 1.9s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  70% {
    transform: scale(1.55);
    opacity: 0;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* ---------- Respiro sutil nos botões primários ---------- */
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.02); }
}
.breathe {
  animation: breathe 2.6s ease-in-out infinite;
}

/* ---------- Cards de contato ---------- */
.contact-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* ---------- Responsividade dos cards flutuantes do hero ---------- */
@media (max-width: 640px) {
  .float-card {
    max-width: 74%;
  }
}

/* ---------- Acessibilidade: reduz movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .btn-shine::after,
  .pulse-ring,
  .breathe {
    animation: none !important;
  }
  .blob {
    filter: none;
    opacity: 0.25;
  }
}
