/* ==========================================================
   MedCloud Pacs — Estilos custom
   Complementan a Tailwind con utilidades específicas:
   animaciones de entrada, comportamiento de scroll, etc.
   ========================================================== */

/* Scroll suave en toda la página */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* compensa el navbar sticky */
}

/* Tipografía base */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ==========================================================
   Animación "reveal" al hacer scroll
   ========================================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reduce motion: respetar preferencias del sistema */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================
   Sombra del navbar al hacer scroll
   ========================================================== */
#navbar.is-scrolled {
  box-shadow: 0 4px 20px -4px rgba(15, 23, 42, 0.08);
}

/* ==========================================================
   Scrollbar elegante (solo en navegadores compatibles)
   ========================================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ==========================================================
   FAQ — animación del marker de details
   ========================================================== */
details summary::-webkit-details-marker {
  display: none;
}
details summary {
  list-style: none;
}
details[open] summary {
  border-bottom: 1px solid #f1f5f9;
}

/* ==========================================================
   Selección de texto
   ========================================================== */
::selection {
  background-color: #66BB6A;
  color: #ffffff;
}

/* ==========================================================
   Focus visible accesible
   ========================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #2E7D32;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ==========================================================
   Utilidad: animación de pulso lento (badges)
   ========================================================== */
@keyframes pulse-slow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.pulse-slow {
  animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================================
   Forma decorativa: blob
   ========================================================== */
@keyframes blob {
  0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
  50%      { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}
.blob {
  animation: blob 10s ease-in-out infinite;
}

/* ==========================================================
   Slider OHIF — dots indicador
   ========================================================== */
.ohif-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #CBD5E1;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}
.ohif-dots .dot:hover {
  background: #94A3B8;
}
.ohif-dots .dot.active {
  background: #2E7D32;
  width: 28px;
}
