/* Boostara Innovations - Cyber-Medical Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg-dark: #030712;
  --bg-card: rgba(8, 17, 36, 0.75);
  --bg-card-hover: rgba(14, 27, 56, 0.85);
  --cyan-glow: #00f0ff;
  --blue-accent: #2563eb;
  --blue-neon: #38bdf8;
  --amber-gold: #f59e0b;
  --orange-accent: #f97316;
  --border-cyan: rgba(0, 240, 255, 0.2);
  --border-blue: rgba(56, 189, 248, 0.2);
  --border-gold: rgba(245, 158, 11, 0.3);
}

* {
  box-sizing: border-box;
}


html {
  scroll-padding-top: 5.5rem;
  overflow-x: clip;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: #f1f5f9;
  overflow-x: clip;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #030712;
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
  border: 1px solid rgba(0, 240, 255, 0.2);
}
::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

/* Glassmorphic Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 10px 30px -10px rgba(0, 240, 255, 0.15);
}

.glass-panel-gold {
  background: rgba(24, 20, 10, 0.75);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 1rem;
  box-shadow: 0 0 20px -5px rgba(245, 158, 11, 0.2);
}

.glass-panel-gold:hover {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 0 30px -5px rgba(245, 158, 11, 0.35);
}

/* Refined Clinical Accents */
.glow-cyan {
  box-shadow: 0 4px 20px -2px rgba(0, 240, 255, 0.15);
}

.glow-text-cyan {
  color: #00f0ff;
}

.glow-orange {
  box-shadow: 0 4px 20px -2px rgba(249, 115, 22, 0.2);
}

/* Glowing Border Gradients */
.gradient-border-cyan {
  position: relative;
  background: linear-gradient(135deg, rgba(8, 20, 44, 0.9), rgba(5, 12, 28, 0.9));
  border-radius: 1rem;
}
.gradient-border-cyan::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 1rem;
  padding: 1px;
  background: linear-gradient(135deg, #00f0ff, #2563eb, rgba(0,0,0,0), #00f0ff);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Animated Scanner Line */
.scanner-container {
  position: relative;
  overflow: hidden;
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #00f0ff, transparent);
  box-shadow: 0 0 15px #00f0ff, 0 0 25px #00f0ff;
  animation: scanAnimation 3.5s ease-in-out infinite;
  z-index: 20;
}

@keyframes scanAnimation {
  0% {
    top: 0%;
    opacity: 0.2;
  }
  25% {
    opacity: 1;
  }
  50% {
    top: 96%;
    opacity: 1;
  }
  75% {
    opacity: 0.8;
  }
  100% {
    top: 0%;
    opacity: 0.2;
  }
}

/* Subtle Pulse for Nodes */
@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

.pulse-node {
  animation: pulseGlow 2.5s infinite ease-in-out;
}

/* Custom phone frame styling */
.phone-mockup {
  border: 4px solid #1e293b;
  border-radius: 2.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7),
              0 0 35px -5px rgba(0, 240, 255, 0.25);
  background: #020617;
  position: relative;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 5px;
  background: #334155;
  border-radius: 10px;
  z-index: 30;
}

/* Monospace code styling */
.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Platform selector button active states */
.platform-card {
  transition: all 0.25s ease;
}
.platform-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.5);
  box-shadow: 0 10px 25px -5px rgba(0, 240, 255, 0.15);
}

/* Report print styles */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-report, #printable-report * {
    visibility: visible;
  }
  #printable-report {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    color: #000 !important;
    background: #fff !important;
  }
}

/* Deep Concept Modal Custom Styling */
#deep-concept-modal table {
  background: rgba(8, 17, 36, 0.75);
}
#deep-concept-modal th {
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
#deep-concept-modal code {
  color: #38bdf8;
  background: rgba(15, 23, 42, 0.8);
}

/* Alive & Breathing Animations */
@keyframes auraBreathe {
  0%, 100% {
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.25), 0 0 10px rgba(56, 189, 248, 0.2);
    border-color: rgba(0, 240, 255, 0.35);
  }
  50% {
    box-shadow: 0 0 45px rgba(0, 240, 255, 0.55), 0 0 25px rgba(245, 158, 11, 0.35);
    border-color: rgba(0, 240, 255, 0.7);
  }
}

.aura-breathe {
  animation: auraBreathe 4s infinite ease-in-out;
}

@keyframes radarSweep {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.radar-sweep-blade {
  animation: radarSweep 3s linear infinite;
  transform-origin: center center;
}

/* PACS DICOM Windowing & Contrast Modes */
.filter-standard {
  filter: none;
  transition: filter 0.3s ease;
}

.filter-bone {
  filter: invert(1) contrast(1.4) brightness(0.95);
  transition: filter 0.3s ease;
}

.filter-thermal {
  filter: contrast(1.4) hue-rotate(185deg) saturate(2.2);
  transition: filter 0.3s ease;
}

.filter-soft-tissue {
  filter: contrast(1.8) brightness(0.85);
  transition: filter 0.3s ease;
}

/* Animated Target Reticle Box Overlay */
.scan-reticle-box {
  position: absolute;
  border: 2px solid #00f0ff;
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  border-radius: 6px;
}

@keyframes reticleGlow {
  0%, 100% { border-color: #00f0ff; box-shadow: 0 0 10px #00f0ff; }
  50% { border-color: #f59e0b; box-shadow: 0 0 20px #f59e0b; }
}

.scan-reticle-box {
  animation: reticleGlow 2s infinite ease-in-out;
}

/* Live Telemetry Ping Dot */
.live-pulse-dot {
  position: relative;
  display: inline-block;
}
.live-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  background: inherit;
  opacity: 0.4;
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ============================================================
   MOBILE RESPONSIVENESS — Comprehensive fixes
   ============================================================ */

/* Prevent horizontal overflow on mobile without breaking sticky header */
html, body {
  max-width: 100%;
  overflow-x: clip;
}

/* Ensure images never overflow their containers */
img {
  max-width: 100%;
  height: auto;
}

/* Fix pre/code blocks from overflowing on small screens */
pre, code {
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* Ensure tables scroll on mobile instead of overflowing */
table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile navigation drawer improvements */
#mobile-menu-drawer {
  max-height: calc(100vh - 5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Header brand text truncation on very small screens */
@media (max-width: 380px) {
  .text-xl.font-extrabold {
    font-size: 0.95rem;
  }
  header .text-\[10px\] {
    display: none;
  }
}

/* Fix glass panels on mobile — remove heavy backdrop-filter on low-end devices */
@media (max-width: 640px) {
  .glass-panel {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
}

/* Ensure hero sections don't overflow on mobile */
@media (max-width: 768px) {
  section {
    overflow-x: hidden;
  }

  /* Fix super-large hero h1 text on mobile */
  h1.text-4xl {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  /* Better padding for sections on mobile */
  .py-20 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }
}

/* Canvas elements on mobile — ensure they don't overflow */
canvas {
  max-width: 100%;
  height: auto !important;
}

/* Footer grid — stacks nicely on mobile */
@media (max-width: 640px) {
  footer .grid {
    grid-template-columns: 1fr;
  }
}

/* Fix phone mockup sizing on mobile */
@media (max-width: 640px) {
  .phone-mockup {
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Persistent Sticky Header — Never hides on scroll */
header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1000 !important;
  width: 100% !important;
  background-color: rgba(3, 7, 18, 0.95) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.2) !important;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

header.header-scrolled {
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.85), 0 0 15px rgba(0, 240, 255, 0.2) !important;
  border-bottom-color: rgba(0, 240, 255, 0.4) !important;
}

html[data-theme="light"] header {
  background-color: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9) !important;
}

html[data-theme="light"] header.header-scrolled {
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 0 15px rgba(2, 132, 199, 0.15) !important;
}

/* Touch target sizes — minimum 44x44px for all interactive elements on mobile */
@media (max-width: 768px) {
  button, [role="button"], a.block, a.flex {
    min-height: 44px;
  }
}

/* Ensure modals are scrollable on mobile */
.modal-body {
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Focus ring visibility for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #00f0ff;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Scrollbar hide utility for horizontal scroll containers on mobile */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ============================================================
   CROSS-DEVICE ENHANCEMENTS (Any Phone, Tablet, Laptop, Desktop)
   ============================================================ */

/* Prevent iOS Safari auto-zoom on input focus while keeping readability */
@media (max-width: 768px) {
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* Prevent layout distortion during orientation change on iOS & Android */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Smooth touch interaction on mobile devices */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Safe area insets for modern smartphones (iPhone Notch, Dynamic Island, Android camera cutouts) */
body {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

#cookie-banner {
  padding-bottom: max(1rem, env(safe-area-inset-bottom, 1rem));
}

/* Laptop and scaled desktop display adjustments (1024px to 1440px) */
@media (min-width: 1024px) and (max-width: 1440px) {
  .max-w-7xl {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  /* Ensure header nav doesn't wrap or collide on compact laptop screens */
  nav.xl\:flex {
    gap: 0.65rem;
  }
}

/* Ultra-wide desktop screens (>1920px) — prevent excessive stretching */
@media (min-width: 2560px) {
  .max-w-7xl {
    max-width: 1600px;
  }
}

/* ============================================================
   LIGHT / DARK THEME SYSTEM & TOGGLE ICONS
   ============================================================ */

/* Theme Toggle Icon Visibility */
[data-theme="dark"] #theme-sun-icon {
  display: block;
}
[data-theme="dark"] #theme-moon-icon {
  display: none;
}
[data-theme="light"] #theme-sun-icon {
  display: none;
}
[data-theme="light"] #theme-moon-icon {
  display: block;
}

/* Default / Dark Theme Variable Setup */
:root {
  --color-transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

body {
  transition: var(--color-transition);
}

/* ============================================================
   HIGH-PRECISION LIGHT MODE (Clean, Modern AI White Palette)
   ============================================================ */
html[data-theme="light"] {
  color-scheme: light;
}

html[data-theme="light"] body {
  background-color: #f8fafc !important;
  color: #0f172a !important;
}

html[data-theme="light"] header {
  background-color: rgba(255, 255, 255, 0.94) !important;
  border-bottom: 1px solid rgba(2, 132, 199, 0.18) !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

html[data-theme="light"] aside {
  background-color: #f0f9ff !important;
  border-bottom: 1px solid #bae6fd !important;
  color: #0369a1 !important;
}

html[data-theme="light"] .glass-panel {
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(203, 213, 225, 0.8) !important;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.03) !important;
}

html[data-theme="light"] .glass-panel:hover {
  border-color: rgba(2, 132, 199, 0.45) !important;
  box-shadow: 0 16px 30px -8px rgba(2, 132, 199, 0.12) !important;
}

html[data-theme="light"] .glass-panel-gold {
  background: rgba(254, 252, 232, 0.92) !important;
  border-color: rgba(245, 158, 11, 0.35) !important;
  box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.06) !important;
}

html[data-theme="light"] .bg-slate-950,
html[data-theme="light"] .bg-slate-950\/40,
html[data-theme="light"] .bg-slate-950\/60,
html[data-theme="light"] .bg-slate-950\/70,
html[data-theme="light"] .bg-slate-950\/80,
html[data-theme="light"] .bg-\[\#030712\],
html[data-theme="light"] .bg-\[\#030712\]\/90 {
  background-color: #f8fafc !important;
}

html[data-theme="light"] .bg-slate-900,
html[data-theme="light"] .bg-slate-900\/60,
html[data-theme="light"] .bg-slate-900\/80,
html[data-theme="light"] .bg-slate-900\/90 {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .bg-slate-800,
html[data-theme="light"] .bg-slate-800\/60 {
  background-color: #f1f5f9 !important;
}

html[data-theme="light"] .border-slate-800,
html[data-theme="light"] .border-slate-800\/80,
html[data-theme="light"] .border-slate-700 {
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] .text-white {
  color: #0f172a !important;
}

html[data-theme="light"] .text-slate-100 {
  color: #0f172a !important;
}

html[data-theme="light"] .text-slate-200 {
  color: #1e293b !important;
}

html[data-theme="light"] .text-slate-300 {
  color: #334155 !important;
}

html[data-theme="light"] .text-slate-400 {
  color: #475569 !important;
}

html[data-theme="light"] .text-cyan-400,
html[data-theme="light"] .text-cyan-300 {
  color: #0284c7 !important;
}

html[data-theme="light"] .text-emerald-400,
html[data-theme="light"] .text-emerald-300 {
  color: #059669 !important;
}

html[data-theme="light"] .text-amber-400,
html[data-theme="light"] .text-amber-300 {
  color: #d97706 !important;
}

html[data-theme="light"] .bg-emerald-950,
html[data-theme="light"] .bg-emerald-950\/80 {
  background-color: #ecfdf5 !important;
}

html[data-theme="light"] .bg-cyan-950,
html[data-theme="light"] .bg-cyan-950\/70,
html[data-theme="light"] .bg-cyan-950\/80 {
  background-color: #f0f9ff !important;
}

html[data-theme="light"] .bg-blue-950 {
  background-color: #eff6ff !important;
}

html[data-theme="light"] #mobile-menu-drawer {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border: 1px solid #94a3b8;
}

/* ============================================================
   AUTONOMOUS AI SOLUTIONS CAROUSEL STYLES
   ============================================================ */
.ai-solution-carousel-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 1.5rem;
  padding: 1rem 0.25rem 2rem 0.25rem;
}

.ai-solution-carousel-container::-webkit-scrollbar {
  height: 6px;
}
.ai-solution-carousel-container::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
  border-radius: 9999px;
}
.ai-solution-carousel-container::-webkit-scrollbar-thumb {
  background: rgba(0, 240, 255, 0.3);
  border-radius: 9999px;
}

.ai-solution-card {
  flex: 0 0 calc(100% - 1rem);
  scroll-snap-align: start;
}

@media (min-width: 640px) {
  .ai-solution-card {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (min-width: 1024px) {
  .ai-solution-card {
    flex: 0 0 calc(33.333% - 1rem);
  }
}





/* ─────────────────────────────────────────────────────────────
   MODERN INTERACTIVE ENGINE & INFINITE MARQUEE
   ───────────────────────────────────────────────────────────── */
.marquee-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 1.25rem;
}

.marquee-scroll-left {
  animation: marqueeScrollLeft 45s linear infinite;
}

.marquee-scroll-right {
  animation: marqueeScrollRight 50s linear infinite;
}

.marquee-wrapper:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marqueeScrollLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeScrollRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.marquee-card {
  flex: 0 0 280px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.marquee-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(0, 240, 255, 0.7);
  box-shadow: 0 12px 28px -8px rgba(0, 240, 255, 0.35);
}

/* Before / After Split Slider */
.split-viewer-container {
  position: relative;
  width: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  background: #020617;
  border: 1px solid rgba(0, 240, 255, 0.35);
  box-shadow: 0 25px 50px -12px rgba(0, 240, 255, 0.15);
}

.split-overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 50%;
  overflow: hidden;
  z-index: 10;
  border-right: 2px solid #00f0ff;
  box-shadow: 2px 0 18px rgba(0, 240, 255, 0.6);
}

.split-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #00f0ff;
  color: #030712;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  z-index: 20;
  cursor: ew-resize;
  pointer-events: none;
  box-shadow: 0 0 25px rgba(0, 240, 255, 0.9), inset 0 0 6px rgba(255, 255, 255, 0.8);
  transition: transform 0.15s ease;
}

.split-viewer-container:active .split-handle {
  transform: translate(-50%, -50%) scale(1.15);
}

/* Light Theme Adjustments for Marquee & Split Slider */
html[data-theme="light"] .marquee-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(14, 116, 144, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .marquee-card:hover {
  border-color: rgba(14, 116, 144, 0.6);
  box-shadow: 0 12px 28px -8px rgba(14, 116, 144, 0.2);
}

html[data-theme="light"] .split-viewer-container {
  background: #f8fafc;
  border-color: rgba(14, 116, 144, 0.35);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
}
