/* HMED Medical Theme Stylesheet */
:root {
  --color-medical-primary: #0284c7;
  --color-medical-dark: #0369a1;
  --color-medical-light: #e0f2fe;
  --color-medical-accent: #0d9488;
  --color-medical-emerald: #10b981;
  --color-medical-rose: #ef4444;
  --color-medical-amber: #f59e0b;
  --font-sans: 'Be Vietnam Pro', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  font-family: var(--font-sans);
  color: #1e293b;
  background-color: #f8fafc;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  -webkit-text-size-adjust: 100%;
}

/* Zero-specificity base heading hierarchy (overridden by Tailwind utilities at runtime) */
:where(h1) { font-size: 2rem; line-height: 1.2; font-weight: 800; }
:where(h2) { font-size: 1.5rem; line-height: 1.3; font-weight: 700; }
:where(h3) { font-size: 1.1875rem; line-height: 1.35; font-weight: 700; }
:where(h4) { font-size: 1rem; line-height: 1.4; font-weight: 600; }

/* Ensure WCAG AA white text on dark gradient hero banners */
.banner-slide {
  color: #ffffff;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Prevent image and media overflow on mobile */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
}

/* Touch-friendly momentum scrolling */
.overflow-x-auto, .overflow-y-auto {
  -webkit-overflow-scrolling: touch;
}

/* Mobile responsive container utility */
.mobile-safe-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Glassmorphism Header */
.glass-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -2px rgba(2, 132, 199, 0.08);
}

/* Hero Background Subtle Pattern */
.medical-hero-bg {
  background: radial-gradient(circle at 10% 20%, rgba(224, 242, 254, 0.7) 0%, rgba(240, 253, 250, 0.5) 50%, rgba(255, 255, 255, 1) 100%);
}

/* Live Search Dropdown */
.search-results-box {
  max-height: 480px;
  overflow-y: auto;
  box-shadow: 0 20px 40px -15px rgba(2, 132, 199, 0.25);
  border: 1px solid #bae6fd;
}

.search-results-box::-webkit-scrollbar {
  width: 6px;
}
.search-results-box::-webkit-scrollbar-thumb {
  background-color: #93c5fd;
  border-radius: 9999px;
}

/* Multi-tier Package Matrix Table */
.package-matrix-table th,
.package-matrix-table td {
  transition: background-color 0.15s ease;
}

.package-matrix-table tr:hover td {
  background-color: #f0f9ff;
}

/* Clickable Test Indicator in Package Table */
.test-indicator-link {
  cursor: pointer;
  color: #0369a1;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #7dd3fc;
  text-underline-offset: 3px;
  transition: all 0.2s ease;
}

.test-indicator-link:hover {
  color: #0284c7;
  text-decoration-color: #0284c7;
  padding-left: 2px;
}

/* Tier Checkmark Pill */
.tier-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  background-color: #d1fae5;
  color: #059669;
  font-weight: bold;
}

.tier-uncheck {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 9999px;
  color: #cbd5e1;
}

/* Pulse animation for CTA */
@keyframes pulse-subtle {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 0 10px rgba(13, 148, 136, 0);
  }
}

.cta-pulse {
  animation: pulse-subtle 3s infinite ease-in-out;
}

/* Modal Backdrop Smooth Fade */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
}

/* Floating Contact Widget & Speed Dial */
.floating-contact-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Ringing Phone Animation */
@keyframes phone-ring {
  0% { transform: rotate(0) scale(1) skew(1deg); }
  10% { transform: rotate(-25deg) scale(1) skew(1deg); }
  20% { transform: rotate(25deg) scale(1) skew(1deg); }
  30% { transform: rotate(-25deg) scale(1) skew(1deg); }
  40% { transform: rotate(25deg) scale(1) skew(1deg); }
  50% { transform: rotate(0) scale(1) skew(1deg); }
  100% { transform: rotate(0) scale(1) skew(1deg); }
}

.animate-ring {
  animation: phone-ring 1.8s infinite ease-in-out;
}

/* Radar Pulse Effect for Hotline Button */
.btn-radar-pulse {
  position: relative;
}

.btn-radar-pulse::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background-color: rgba(16, 185, 129, 0.4);
  animation: radar-wave 2s infinite ease-out;
  z-index: -1;
}

@keyframes radar-wave {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* AI Chat Window Animation */
.chat-window-enter {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

/* Calm Typing Indicator */
.typing-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #0284c7;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* HMED Interactive Leaflet Map Pulse Pin */
.hmed-marker-wrapper {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hmed-marker-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(14, 165, 233, 0.45);
  animation: hmedMapPulse 2s infinite ease-out;
}
.hmed-marker-pin {
  position: relative;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #0284c7;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  padding: 3px;
}
.hmed-marker-pin:hover {
  transform: scale(1.18);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.65);
}
.hmed-marker-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  display: block;
}
@keyframes hmedMapPulse {
  0% { transform: scale(0.7); opacity: 1; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* HMED Luxury Package System & Clinical Comparison UI */
::selection {
  background-color: #bae6fd;
  color: #0c4a6e;
}

:focus-visible {
  outline: 2px solid #0284c7;
  outline-offset: 2px;
}

.text-balance {
  text-wrap: balance;
}

.text-pretty {
  text-wrap: pretty;
}

.pkg-photo-frame {
  position: relative;
  overflow: hidden;
  background-color: #e2e8f0;
}

.pkg-photo-frame::after {
  content: '';
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 102px;
  height: 27px;
  z-index: 6;
  pointer-events: none;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.88);
  background-image: url('/assets/logo-hmed-horizontal.png?v=20261123_brand1');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 84% auto;
  backdrop-filter: blur(8px) saturate(135%);
  -webkit-backdrop-filter: blur(8px) saturate(135%);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.78);
  transition: transform 240ms cubic-bezier(0.16, 1, 0.3, 1), background-color 200ms ease;
}

#bannerSlideTrack .pkg-photo-frame::after,
main .aspect-\[16\/9\].pkg-photo-frame::after {
  right: 12px;
  bottom: 12px;
  width: 116px;
  height: 31px;
}

.pkg-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  outline: 1px solid rgba(15, 23, 42, 0.08);
  outline-offset: -1px;
  transition-property: transform, opacity;
  transition-duration: 450ms;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

.group:hover .pkg-photo-frame img {
  transform: scale(1.035);
}

/* Bespoke HMED Signature Two-Zone Architectural Option Cards */
.hmed-option-card {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 14px -4px rgba(15, 23, 42, 0.06);
  transition-property: transform, box-shadow, border-color;
  transition-duration: 220ms;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

.hmed-option-card:hover {
  transform: translateY(-3px);
  border-color: #0284c7;
  box-shadow: 0 16px 30px -12px rgba(12, 74, 110, 0.16);
}

.hmed-option-head {
  padding: 13px 15px 12px;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.hmed-option-head::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
}

.hmed-option-tier-1 .hmed-option-head {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}
.hmed-option-tier-1 .hmed-option-head::before {
  background-color: #94a3b8;
}

.hmed-option-tier-2 .hmed-option-head {
  background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
}
.hmed-option-tier-2 .hmed-option-head::before {
  background-color: #38bdf8;
}

.hmed-option-tier-3 .hmed-option-head {
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
}
.hmed-option-tier-3 .hmed-option-head::before {
  background-color: #2dd4bf;
}

.hmed-option-tier-4 .hmed-option-head {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
}
.hmed-option-tier-4 .hmed-option-head::before {
  background-color: #818cf8;
}

.hmed-option-card-active {
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.14), 0 14px 28px -10px rgba(2, 132, 199, 0.18);
}

.hmed-option-card-active .hmed-option-head {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 55%, #ecfeff 100%);
  border-bottom-color: #bae6fd;
}

.hmed-option-card-active .hmed-option-head::before {
  height: 4px;
  background: linear-gradient(90deg, #0284c7 0%, #0d9488 100%);
}

.hmed-option-body {
  padding: 13px 15px 15px;
  background-color: #ffffff;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hmed-option-card-active .hmed-option-body {
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.45) 0%, #ffffff 42%);
}

/* Luxury Medical Navigation Links & Interactive Card Elevation */
.hmed-nav-link {
  position: relative;
  padding: 7px 10px;
  border-radius: 10px;
  color: #334155;
  transition: color 180ms ease, background-color 180ms ease;
}

.hmed-nav-link::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 9999px;
  background-color: #0369a1;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hmed-nav-link:hover {
  color: #0c4a6e;
  background-color: rgba(240, 249, 255, 0.9);
}

.hmed-nav-link:hover::after {
  transform: scaleX(1);
}

.hmed-nav-link-active {
  color: #0c4a6e;
  font-weight: 700;
  background-color: #f1f5f9;
}

.hmed-nav-link-active::after {
  transform: scaleX(0.65);
}

article.group,
.utility-card,
.hmed-interactive-card {
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 240ms ease, border-color 200ms ease;
}

article.group:hover,
.utility-card:hover,
.hmed-interactive-card:hover {
  transform: translateY(-3px);
  border-color: rgba(3, 105, 161, 0.45);
  box-shadow: 0 14px 30px -12px rgba(12, 74, 110, 0.14);
}

/* Floating Contact Dock Live Motion */
.hmed-float-btn {
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 200ms ease, filter 180ms ease;
}

.hmed-float-btn:hover {
  transform: translateX(-4px) scale(1.02);
  box-shadow: 0 10px 22px -6px rgba(15, 23, 42, 0.28);
}

@keyframes float-zalo-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-3px) rotate(-6deg) scale(1.06); }
  50% { transform: translateY(0) rotate(6deg) scale(1.06); }
  75% { transform: translateY(-2px) rotate(-3deg) scale(1.03); }
}

.animate-zalo-bob {
  animation: float-zalo-bob 2.2s infinite ease-in-out;
}

@keyframes call-orb-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    transform: scale(1.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    transform: scale(1);
  }
}

@keyframes zalo-orb-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.55);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 104, 255, 0);
    transform: scale(1.06);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 104, 255, 0);
    transform: scale(1);
  }
}

.mobile-call-orb {
  animation: call-orb-pulse 1.8s infinite ease-in-out;
}

.mobile-zalo-orb {
  animation: zalo-orb-pulse 1.8s infinite ease-in-out 0.9s;
}

.btn-zalo-radar {
  position: relative;
}

.btn-zalo-radar::before {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 9999px;
  background-color: rgba(0, 104, 255, 0.35);
  animation: radar-wave 2s infinite ease-out 0.9s;
  z-index: -1;
}

@keyframes live-dot-ping {
  0% { transform: scale(0.9); opacity: 0.9; }
  70%, 100% { transform: scale(2.1); opacity: 0; }
}

.float-live-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background-color: #34d399;
}

.float-live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: #34d399;
  animation: live-dot-ping 2s infinite ease-out;
}

/* Smooth Collapsible Clinical Group Accordion */
.pkg-group-bar {
  background-color: #f1f5f9;
  transition-property: background-color, color;
  transition-duration: 150ms;
  transition-timing-function: ease-out;
}

.pkg-group-bar:hover {
  background-color: #e2e8f0;
}

.pkg-group-bar[aria-expanded="true"] {
  background-color: #e0f2fe;
}

.pkg-btn-clean {
  transition-property: background-color, color, border-color, transform, box-shadow;
  transition-duration: 160ms;
  transition-timing-function: ease-out;
}

.pkg-btn-clean:active {
  transform: scale(0.98);
}

#hmedLeafletMap {
  width: 100%;
  height: 100%;
  min-height: 480px;
  z-index: 1;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

button, a, input, select {
  touch-action: manipulation;
}

@media (max-width: 767px) {
  #floatingCartBar,
  #aiGreetingBubble {
    display: none !important;
  }
  #hmedLeafletMap {
    min-height: 300px !important;
  }
}



