/* ============================================
   Clinica Salud Familiar — Custom Styles
   ============================================ */

/* Base */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus visible for keyboard nav */
*:focus-visible {
  outline: 2px solid #059669;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #FDFBF7;
}
::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* Header */
header {
  backface-visibility: hidden;
}

/* Mobile link active state */
.mobile-link.active {
  background: rgba(5, 150, 105, 0.08);
  color: #059669;
}

/* Scroll reveal — progressive enhancement via JS */
.scroll-reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .js-enabled .scroll-reveal {
    opacity: 1;
    transform: none;
  }
}

/* When JS is enabled and motion is preferred, add hidden state for below-fold */
.js-enabled @media (prefers-reduced-motion: no-preference) {
  /* Reveal handled by JS */
}

/* Selection color */
::selection {
  background: #D1FAE5;
  color: #065F46;
}

/* Image aspect ratios */
img {
  max-width: 100%;
  height: auto;
}

/* Print styles */
@media print {
  header, footer, .scroll-reveal {
    opacity: 1 !important;
  }
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.75rem;
    color: #666;
  }
}
