/* LabResult.MD — Custom Styles
   Supplements Tailwind CDN with animations, micro-interactions, and polish */

/* ── Typography ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Skip-to-content (a11y) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: #0D9488;
  color: #fff;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* ── Gradient hero backgrounds ── */
.hero-gradient {
  background: linear-gradient(135deg, #0F766E 0%, #0D9488 40%, #14B8A6 100%);
}
.hero-gradient-subtle {
  background: linear-gradient(135deg, #F0FDFA 0%, #F8FAFC 50%, #EFF6FF 100%);
}

/* ── Card hover effects ── */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.08), 0 4px 10px -6px rgba(0, 0, 0, 0.04);
}

/* ── Fade-in on scroll ── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Header shadow on scroll ── */
.header-scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ── Tables ── */
.data-table {
  border-collapse: separate;
  border-spacing: 0;
}
.data-table thead th {
  background: #F8FAFC;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #E2E8F0;
}
.data-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #F1F5F9;
}
.data-table tbody tr:hover {
  background: #F8FAFC;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ── Status pills ── */
.pill-normal { background: #F0FDF4; color: #16A34A; border: 1px solid #BBF7D0; }
.pill-high   { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.pill-low    { background: #EFF6FF; color: #2563EB; border: 1px solid #BFDBFE; }
.pill-watch  { background: #FFFBEB; color: #D97706; border: 1px solid #FDE68A; }

/* ── Callout boxes ── */
.callout {
  border-left: 4px solid;
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
}
.callout-info    { border-color: #0D9488; background: #F0FDFA; }
.callout-warning { border-color: #D97706; background: #FFFBEB; }
.callout-danger  { border-color: #DC2626; background: #FEF2F2; }

/* ── FAQ accordions ── */
details summary {
  cursor: pointer;
  list-style: none;
}
details summary::-webkit-details-marker { display: none; }
details[open] .faq-chevron {
  transform: rotate(180deg);
}
.faq-chevron {
  transition: transform 0.2s ease;
}

/* ── Breadcrumb separator ── */
.breadcrumb-sep::before {
  content: "/";
  margin: 0 0.5rem;
  color: #CBD5E1;
}

/* ── Footer gradient ── */
.footer-gradient {
  background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
}

/* ── Focus rings (a11y) ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
details summary:focus-visible {
  outline: 2px solid #0D9488;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .fade-in { opacity: 1; transform: none; transition: none; }
  .card-hover { transition: none; }
  .card-hover:hover { transform: none; }
  .faq-chevron { transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Ad containers: collapse when empty ── */
.ad-container {
  min-height: 0;
  overflow: hidden;
}
.ad-container ins.adsbygoogle[data-ad-status="unfilled"] {
  display: none !important;
}
.ad-container:empty {
  display: none;
}

/* ── Print styles ── */
@media print {
  nav, .ad-container, .mobile-menu, footer { display: none !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
  .hero-gradient { background: #fff !important; color: #000 !important; }
}
