/* Global variables and base styles */
:root {
  --brand-primary: #0058A6;
  --brand-secondary: #FBA238;
  --brand-bg: #fef7f0;
  --brand-text: #2c3e50;
  --brand-text-muted: #5a6c7d;
  --brand-surface: #ffffff;
  --brand-surface-light: #f9f5f0;
  --brand-accent: #34495e;
  --transition-duration: 600ms;
  --transition-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gradient-primary: linear-gradient(135deg, #0058A6 0%, #003d73 100%);
  --gradient-secondary: linear-gradient(135deg, #FBA238 0%, #e8941f 100%);
  --shadow-soft: 0 8px 32px rgba(0, 58, 166, 0.08);
  --shadow-intense: 0 16px 64px rgba(0, 58, 166, 0.12);
}

/* Additional readability tuning variables */
:root {
  --scrim-foreground: 255, 255, 255; /* rgb triple for rgba() */
  --scrim-strong: 0.60; /* center strength */
  --scrim-weak: 0.15;   /* outer strength */
}

html, body { 
  height: 100%; 
  scroll-behavior: smooth;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Enhanced typography */
.text-display {
  font-size: clamp(3rem, 8vw, 8rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-hero {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.text-section {
  font-size: clamp(1.5rem, 3vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

/* Glassmorphism effects */
.glass {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.glass-dark {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

/* Gradient overlays */
.gradient-overlay {
  position: relative;
}
.gradient-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 88, 166, 0.8) 0%, rgba(251, 162, 56, 0.6) 100%);
  pointer-events: none;
}

/* Floating animations */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.float {
  animation: float 6s ease-in-out infinite;
}

/* Particle effects */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
}

/* Enhanced grid patterns */
.grid-pattern {
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* Magnetic hover effects */
.magnetic {
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic:hover {
  transform: scale(1.05);
}

/* Spotlight effect */
.spotlight {
  position: relative;
  overflow: hidden;
}

.spotlight::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: all 0.6s ease;
  pointer-events: none;
}

.spotlight:hover::before {
  opacity: 1;
  transform: scale(1);
}

/* Enhanced page transitions */
#page {
  transform: translateX(0);
  opacity: 1;
  transition: transform var(--transition-duration) var(--transition-ease),
              opacity var(--transition-duration) var(--transition-ease);
  will-change: transform, opacity;
}

.page-enter-from-right #page { 
  transform: translateX(100px) scale(0.98); 
  opacity: 0; 
}
.page-enter-from-left #page { 
  transform: translateX(-100px) scale(0.98); 
  opacity: 0; 
}
.page-enter-active #page { 
  transform: translateX(0) scale(1); 
  opacity: 1; 
}

.page-exit-to-left #page { 
  transform: translateX(-100px) scale(0.98); 
  opacity: 0; 
}
.page-exit-to-right #page { 
  transform: translateX(100px) scale(0.98); 
  opacity: 0; 
}

/* Page transition overlay */
.transition-overlay {
  position: fixed;
  inset: 0;
  /* Soft light backdrop instead of solid blue */
  background: rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 300ms ease;
  /* Needed for 3D rotation effect */
  perspective: 800px;
}

.transition-overlay.active {
  opacity: 1;
}

/* Rotating 3D capsule loader (pure CSS) */
.transition-overlay::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 56px;
  transform: translate(-50%, -50%);
  border-radius: 28px;
  /* Left half brand primary, right half white for medical look */
  background:
    /* subtle center seam */
    linear-gradient(90deg, rgba(0,0,0,0.06) 49%, rgba(255,255,255,0.6) 50%, rgba(0,0,0,0.06) 51%) center/100% 100% no-repeat,
    linear-gradient(90deg, var(--brand-primary) 0 50%, #ffffff 50% 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 14px 28px rgba(0, 88, 166, 0.18),
    inset 0 6px 12px rgba(255, 255, 255, 0.6),
    inset 0 -6px 12px rgba(0, 0, 0, 0.06);
  transform-style: preserve-3d;
  animation: capsule-spin 1.1s linear infinite;
}

.transition-overlay::before {
  /* soft circular backdrop to make capsule pop */
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 88, 166, 0.08) 0%, rgba(0, 88, 166, 0.0) 60%);
}

@keyframes capsule-spin {
  0% { transform: translate(-50%, -50%) rotateY(0deg); }
  50% { transform: translate(-50%, -50%) rotateY(180deg); }
  100% { transform: translate(-50%, -50%) rotateY(360deg); }
}

/* Reduce motion preferences */
@media (prefers-reduced-motion: reduce) {
  :root { --transition-duration: 150ms; }
  .float { animation: none; }
  * { 
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  /* Hide spinning and keep minimal overlay for accessibility */
  .transition-overlay::after { animation: none; }
}

/* Enhanced hover effects */
.link-underline { 
  position: relative; 
  overflow: hidden;
}
.link-underline::after {
  content: "";
  position: absolute; 
  left: 0; 
  right: 0; 
  bottom: -2px; 
  height: 2px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.link-underline:hover::after { 
  transform: scaleX(1); 
}

/* Advanced reveal animations */
.reveal { 
  opacity: 0; 
  transform: translateY(60px) scale(0.95); 
  transition: all 800ms cubic-bezier(0.23, 1, 0.32, 1); 
}
.reveal.revealed { 
  opacity: 1; 
  transform: translateY(0) scale(1); 
}

.reveal-stagger {
  opacity: 0;
  transform: translateY(40px);
  transition: all 600ms cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-stagger.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced button styles */
.btn-primary { 
  background: var(--gradient-primary);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gradient-secondary);
  opacity: 0;
  transition: opacity 300ms ease;
}

.btn-primary:hover {
  box-shadow: var(--shadow-intense);
  transform: translateY(-2px);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary * {
  position: relative;
  z-index: 1;
}

/* Enhanced card effects */
.card-hover { 
  background: var(--brand-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 400ms cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.card-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 88, 166, 0.1) 0%, rgba(251, 162, 56, 0.05) 100%);
  opacity: 0;
  transition: opacity 300ms ease;
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-intense);
  border-color: var(--brand-primary);
}

.card-hover:hover::before {
  opacity: 1;
}

.card-hover > * {
  position: relative;
  z-index: 1;
}

/* Contact form success animation */
.button-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  transform: scale(1.05);
}

/* Three.js canvas positioning */
#hero-canvas { 
  position: fixed; 
  inset: 0; 
  width: 100%; 
  height: 100%; 
  display: block; 
  z-index: 0;
}

/* Enhanced hero overlay */
.hero-overlay { 
  position: relative; 
  min-height: 100vh;
}
.hero-overlay::before {
  content: "";
  position: absolute; 
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.15) 55%, rgba(0, 0, 0, 0.35) 100%);
  pointer-events: none;
  z-index: -1;
}

/* Subtle radial scrim over the 3D canvas (centered on hero copy) */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 5; /* above canvas, below content */
  pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% 45%,
      rgba(var(--scrim-foreground), var(--scrim-strong)) 0%,
      rgba(var(--scrim-foreground), 0.35) 35%,
      rgba(var(--scrim-foreground), var(--scrim-weak)) 60%,
      rgba(var(--scrim-foreground), 0) 80%);
  transition: opacity .3s ease;
}

/* Translucent, blurred reading plate behind hero text */
.reading-plate {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 1rem;
  padding: 2rem;
}

/* Soft text shadow to separate from busy pixels */
.hero-title, .hero-subtitle {
  text-shadow:
    0 1px 1px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Mobile: boost opacity slightly for smaller screens */
@media (max-width: 640px) {
  .hero-scrim { opacity: .85; }
  .reading-plate { background: rgba(255, 255, 255, 0.70); }
}

/* Stats dash: white scrim overlay inside panel */
.panel-scrim {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(800px 400px at 50% 50%,
      rgba(255,255,255,0.85) 0%,
      rgba(255,255,255,0.55) 40%,
      rgba(255,255,255,0.15) 70%,
      rgba(255,255,255,0.0) 100%);
}

/* Animated gradient text (light blue ↔ orange) */
.text-gradient-shift {
  /* Brighter light blue ↔ orange gradient */
  background: linear-gradient(90deg, #60a5fa 0%, #fb923c 50%, #60a5fa 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Slightly faster transition */
  animation: gradient-shift 4s ease-in-out infinite alternate;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Navbar enhancements */
.navbar-glass {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scroll indicators */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-indicator::before {
  content: "";
  width: 4px;
  height: 8px;
  background: var(--brand-primary);
  border-radius: 2px;
  animation: scroll-down 2s infinite;
}

/* ==================================
   Lifeline (ECG) overlay for blue panels
   ================================== */
.lifeline-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
}

.lifeline-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.lifeline-track {
  animation: lifeline-scroll 8s linear infinite;
}

.lifeline-path {
  fill: none;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.25));
}

@keyframes lifeline-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-200px); }
}

@media (prefers-reduced-motion: reduce) {
  .lifeline-track { animation: none; }
}

@keyframes scroll-down {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(16px); opacity: 0; }
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .text-display { font-size: clamp(2rem, 10vw, 4rem); }
  .text-hero { font-size: clamp(1.8rem, 8vw, 3rem); }
  .card-hover:hover { transform: translateY(-4px) scale(1.01); }
  .btn-primary:hover { transform: translateY(-1px); }
}

/* Mobile hamburger toggle refinements */
#navToggle { transition: background 0.3s ease, color 0.3s ease; }
#navToggle svg { transition: transform 0.35s cubic-bezier(0.23,1,0.32,1), color 0.3s ease; }
#navToggle[aria-expanded="true"] svg { color: var(--brand-primary); }

/* Light theme component styles */
.nav-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 58, 166, 0.1);
  box-shadow: 0 4px 20px rgba(0, 58, 166, 0.05);
}

.glass-card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 58, 166, 0.1);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 58, 166, 0.08);
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.glass-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 58, 166, 0.12);
  border-color: rgba(0, 58, 166, 0.2);
}

.footer-glass {
  background: rgba(248, 250, 252, 0.95);
  backdrop-filter: blur(20px);
}

.hero-section {
  background: transparent;
  position: relative;
}

.hero-grid {
  background-image: 
    linear-gradient(rgba(0, 58, 166, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 58, 166, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.hero-title {
  color: var(--brand-text);
}

.hero-subtitle {
  color: var(--brand-text-muted);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title {
  color: var(--brand-text);
}

.nav-link {
  color: var(--brand-text-muted);
  transition: all 300ms ease;
  padding: 8px 16px;
  border-radius: 8px;
  position: relative;
}

.nav-link:hover {
  color: var(--brand-primary);
  background: rgba(0, 58, 166, 0.05);
}

.nav-link-active {
  color: var(--brand-primary);
  background: rgba(0, 58, 166, 0.1);
  font-weight: 600;
}

/* =============================
   Mobile Global Scale Down Layer
   ============================= */
@media (max-width: 640px) {
  /* Typography scaling */
  h1.hero-title { font-size: clamp(2rem, 8vw, 2.5rem) !important; letter-spacing: -0.02em; }
  .hero-subtitle { font-size: 0.95rem !important; }
  .section-title { font-size: clamp(1.5rem, 6.5vw, 1.9rem) !important; }
  h2, h3, h4 { line-height: 1.2; }
  p, li { font-size: 0.9rem; }
  small, .text-xs { font-size: 0.70rem; }

  /* Card & panel density */
  .glass-card, .card, .content-block, .panel, .stat-card { padding: 0.9rem 0.9rem !important; }
  .glass-card h3 { font-size: 1.05rem; }
  .stat-value { font-size: 1.25rem !important; }
  .stat-label { font-size: 0.65rem !important; letter-spacing: 0.5px; }

  /* Grid tightening */
  .grid { gap: 1rem !important; }
  .grid.gap-16 { gap: 1.25rem !important; }
  .grid.gap-12 { gap: 1rem !important; }

  /* Section spacing */
  section { padding-top: 2.2rem !important; padding-bottom: 2.4rem !important; }
  section.hero-section { padding-top: 5rem !important; }
  .horizontal-section { padding: 2.5rem 1rem !important; }

  /* Navigation spacing */
  header.nav-glass, header.site-header { height: 70px; }
  header .h-20, .site-header .h-20 { height: 70px !important; }
  #mobileNav a { padding: 0.6rem 0.75rem !important; font-size: 0.9rem; }

  /* Buttons */
  .button-primary, .button-secondary, a.button-primary, a.button-secondary { padding: 0.65rem 1.1rem !important; font-size: 0.85rem !important; }
  .button-primary svg, .button-secondary svg { width: 18px; height: 18px; }

  /* Lists */
  ul { margin-left: 1.1rem; }
  ul li { margin-bottom: 0.45rem; }

  /* Forms */
  input, textarea, select { font-size: 0.85rem !important; padding: 0.55rem 0.7rem !important; }
  label { font-size: 0.7rem; letter-spacing: 0.5px; }

  /* Tables (fallback if present) */
  table { font-size: 0.75rem; }
  table th, table td { padding: 0.45rem 0.5rem; }

  /* Utility compressions */
  .mt-12 { margin-top: 2rem !important; }
  .mb-12 { margin-bottom: 2rem !important; }
  .py-32 { padding-top: 4.5rem !important; padding-bottom: 4.5rem !important; }
  .px-8 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
  .gap-8 { gap: 1.5rem !important; }
  .gap-6 { gap: 1.15rem !important; }
  .gap-4 { gap: 0.85rem !important; }

  /* Hero floating elements smaller */
  .hero-section [class*="w-20"], .hero-section [class*="w-24"], .hero-section [class*="w-16"] { transform: scale(.65); opacity: .75; }

  /* Horizontal scroll fallback spacing refinement */
  .horizontal-scroll-content { gap: 0 !important; }
  .horizontal-section .max-w-7xl { padding-left: 0 !important; padding-right: 0 !important; }

  /* Footer adjustments */
  footer { padding-top: 2.5rem !important; }
  footer p, footer a { font-size: 0.78rem; }
}

.button-primary {
  background: var(--gradient-primary);
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 4px 20px rgba(0, 58, 166, 0.2);
}

.button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 58, 166, 0.3);
}

.button-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-primary);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
  border: 2px solid rgba(0, 58, 166, 0.2);
}

.button-secondary:hover {
  background: white;
  border-color: var(--brand-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 58, 166, 0.15);
}

.hover-lift {
  transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.hover-lift:hover {
  transform: translateY(-8px);
}

.stat-number {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  color: var(--brand-text-muted);
}

.icon-container {
  background: var(--gradient-primary);
  box-shadow: 0 4px 20px rgba(0, 58, 166, 0.2);
}

.tag {
  background: rgba(0, 58, 166, 0.1);
  color: var(--brand-primary);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.footer-link {
  color: var(--brand-text-muted);
  transition: color 300ms ease;
}

.footer-link:hover {
  color: var(--brand-primary);
}

.footer-link-icon {
  color: var(--brand-text-muted);
  transition: all 300ms ease;
  padding: 8px;
  border-radius: 8px;
}

.footer-link-icon:hover {
  color: var(--brand-primary);
  background: rgba(0, 58, 166, 0.1);
}

.filter-btn {
  background: rgba(255, 255, 255, 0.8);
  color: var(--brand-text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid rgba(0, 58, 166, 0.1);
  transition: all 300ms ease;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--brand-primary);
  color: white;
  border-color: var(--brand-primary);
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
  animation: float 6s ease-in-out infinite;
  animation-delay: -2s;
}

.animate-float-slow {
  animation: float 8s ease-in-out infinite;
  animation-delay: -4s;
}

/* Horizontal Scrolling Styles */
.horizontal-scroll-container {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.horizontal-scroll-content {
  display: flex;
  width: fit-content;
  height: 100vh;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.horizontal-section {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 100vw;
  height: 100vh;
  padding: 0 2rem;
  position: relative;
}

.horizontal-section:nth-child(odd) {
  background: linear-gradient(135deg, var(--brand-bg) 0%, #fff9f0 100%);
}

.horizontal-section:nth-child(even) {
  background: linear-gradient(135deg, #fff9f0 0%, var(--brand-bg) 100%);
}

/* Horizontal scroll navigation */
.horizontal-nav {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.horizontal-nav-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 88, 166, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.horizontal-nav-dot.active {
  background: var(--brand-primary);
  transform: scale(1.2);
}

.horizontal-nav-dot:hover {
  background: var(--brand-secondary);
  transform: scale(1.1);
}

/* Scroll indicator for horizontal */
.horizontal-scroll-indicator {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  border: 1px solid rgba(0, 88, 166, 0.1);
  z-index: 50;
}

.scroll-progress {
  width: 100px;
  height: 4px;
  background: rgba(0, 88, 166, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.scroll-progress-bar {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 2px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Enhanced sections for horizontal scroll */
.horizontal-hero {
  background: linear-gradient(135deg, var(--brand-bg) 0%, #fff4e6 50%, #f0f8ff 100%);
  position: relative;
  overflow: hidden;
}

.horizontal-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 88, 166, 0.05) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Footer styles */
.footer-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 88, 166, 0.1);
}

.footer-link {
  color: var(--brand-text-muted);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--brand-primary);
}

.footer-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(0, 88, 166, 0.1);
  color: var(--brand-primary);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.footer-link-icon:hover {
  background: var(--brand-primary);
  color: white;
  transform: translateY(-2px);
}

/* ===============================
   Responsive Scroll Header (PharmaAccess-style)
   =============================== */
header.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* above hero content */
  height: 80px; /* match other pages default h-20 */
  /* Initial visual style comes from .nav-glass utility on header element */
  transition: height 0.3s ease-in-out,
              background-color 0.3s ease-in-out,
              box-shadow 0.3s ease-in-out,
              width 0.3s ease-in-out,
              transform 0.3s ease-in-out,
              border-radius 0.3s ease-in-out,
              backdrop-filter 0.3s ease-in-out;
}

/* Ensure content aligns with the animated height */
header.site-header .header-inner {
  height: 100%;
  display: flex;
  align-items: center;
}

/* Logo scaling */
header.site-header .logo-img {
  height: 56px; /* close to h-14 used elsewhere */
  width: auto;
  transition: height 0.3s ease-in-out, filter 0.3s ease-in-out;
}

/* Initial state inherits nav-glass + .nav-link/.button-primary styles */

/* Scrolled state */
header.site-header.scrolled {
  height: 70px; /* reduced height */
  /* Glassmorphic ellipse centered at top */
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(92%, 1100px);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-radius: 999px; /* ellipse */
}
header.site-header.scrolled .logo-img {
  height: 45px; /* reduced */
}
header.site-header.scrolled .nav-link { color: #333333 !important; }
header.site-header.scrolled .nav-link:hover {
  background: rgba(0,0,0,0.04);
}
header.site-header.scrolled .contact-btn { background: var(--brand-primary); color: #ffffff; border: 1px solid var(--brand-primary); }
