/* ==========================================================================
   CULTURECARE BOT - SENIOR UI/UX DESIGN SYSTEM
   Theme: Luxury AI Robotics Startup × Elite Cultural Heritage Institution
   Colors: Midnight Obsidian (#03060E), Deep Navy (#060B18), Heritage Gold (#D4AF37)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLOR TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Dark Mode Tokens */
  --bg-midnight-950: #03060E;
  --bg-midnight-900: #060B18;
  --bg-midnight-850: #0B1120;
  --bg-midnight-800: #10192D;
  
  --gold-600: #996515;
  --gold-500: #D4AF37;
  --gold-400: #F3C649;
  --gold-300: #FFF0BD;
  
  --emerald-500: #10B981;
  --emerald-400: #34D399;
  --emerald-950: #022C22;
  
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  --font-heading: 'Space Grotesk', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;

  /* Glassmorphism & Surface Tokens */
  --glass-bg: rgba(11, 17, 32, 0.75);
  --glass-bg-gold: rgba(11, 17, 32, 0.88);
  --glass-border: rgba(212, 175, 55, 0.18);
  --glass-border-gold: rgba(212, 175, 55, 0.4);
  --glass-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  
  --card-inner-bg: #060B18;
  --card-inner-border: #1E293B;
  --nav-bg: rgba(3, 6, 14, 0.92);
  --radius-card: 1.25rem;
  --radius-pill: 50rem;
}

/* Light Theme Overrides */
html.light {
  --bg-midnight-950: #F8FAF9;
  --bg-midnight-900: #F1F5F7;
  --bg-midnight-850: #E5EBF0;
  --bg-midnight-800: #D5DFE7;

  --gold-600: #78520A;
  --gold-500: #B8860B;
  --gold-400: #D4AF37;
  --gold-300: #705006;
  
  --emerald-500: #047857;
  --emerald-400: #059669;
  --emerald-950: #ECFDF5;

  --slate-100: #0F172A;
  --slate-200: #1E293B;
  --slate-300: #334155;
  --slate-400: #475569;
  --slate-500: #64748B;
  --slate-600: #94A3B8;
  --slate-700: #CBD5E1;
  --slate-800: #E2E8F0;
  --slate-900: #FFFFFF;

  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-bg-gold: rgba(255, 253, 245, 0.95);
  --glass-border: rgba(184, 134, 11, 0.28);
  --glass-border-gold: rgba(184, 134, 11, 0.5);
  --glass-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.08);

  --card-inner-bg: #FFFFFF;
  --card-inner-border: #CBD5E1;
  --nav-bg: rgba(248, 250, 249, 0.94);
}

/* --------------------------------------------------------------------------
   2. GLOBAL BASE STYLES & TYPOGRAPHY HIERARCHY
   -------------------------------------------------------------------------- */
body {
  background-color: var(--bg-midnight-950);
  color: var(--slate-100);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: -0.025em;
}

h1, .display-3 {
  letter-spacing: -0.035em;
}

/* Section Background Adjustments in Light Mode */
html.light section,
html.light div.bg-dark,
html.light footer.bg-dark {
  background-color: var(--bg-midnight-950) !important;
}

html.light section.bg-dark.border-top {
  background-color: var(--bg-midnight-900) !important;
}

.text-light {
  color: var(--slate-100) !important;
}
.text-secondary {
  color: var(--slate-400) !important;
}

/* --------------------------------------------------------------------------
   3. HIGH-CONTRAST BADGE SYSTEM (VISIBLE IN LIGHT & DARK MODES)
   -------------------------------------------------------------------------- */
.badge-gold {
  background-color: #D4AF37 !important;
  color: #03060E !important;
  font-weight: 700 !important;
  font-family: var(--font-heading);
  letter-spacing: 0.05em;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.badge-gold-subtle {
  background-color: rgba(212, 175, 55, 0.22) !important;
  color: #F3C649 !important;
  border: 1px solid rgba(212, 175, 55, 0.5) !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius-pill) !important;
}
html.light .badge-gold-subtle {
  background-color: rgba(184, 134, 11, 0.15) !important;
  color: #78520A !important;
  border: 1px solid rgba(184, 134, 11, 0.6) !important;
}

.badge-emerald {
  background-color: #10B981 !important;
  color: #FFFFFF !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius-pill) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.badge-emerald-subtle {
  background-color: rgba(16, 185, 129, 0.22) !important;
  color: #34D399 !important;
  border: 1px solid rgba(16, 185, 129, 0.5) !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius-pill) !important;
}
html.light .badge-emerald-subtle {
  background-color: rgba(4, 120, 87, 0.15) !important;
  color: #047857 !important;
  border: 1px solid rgba(4, 120, 87, 0.6) !important;
}

.badge-danger-subtle {
  background-color: rgba(239, 68, 68, 0.22) !important;
  color: #F87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.5) !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius-pill) !important;
}
html.light .badge-danger-subtle {
  background-color: rgba(220, 38, 38, 0.15) !important;
  color: #B91C1C !important;
  border: 1px solid rgba(220, 38, 38, 0.6) !important;
}

.badge-slate {
  background-color: #334155 !important;
  color: #F8FAFC !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.9rem !important;
  border-radius: var(--radius-pill) !important;
}
html.light .badge-slate {
  background-color: #E2E8F0 !important;
  color: #0F172A !important;
  border: 1px solid #CBD5E1 !important;
}

/* --------------------------------------------------------------------------
   4. LUXURY CARDS, GLASSMORPHISM & BORDERS
   -------------------------------------------------------------------------- */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(212, 175, 55, 0.38);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.glass-panel-gold {
  background: var(--glass-bg-gold);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border-gold);
  border-radius: var(--radius-card);
  box-shadow: 0 15px 40px -10px rgba(212, 175, 55, 0.2);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Image Contain & Framing */
.img-contain {
  object-fit: contain !important;
  max-width: 100%;
}

.pdf-gallery-img {
  object-fit: contain !important;
  background-color: var(--card-inner-bg);
  padding: 8px;
  border-radius: 0.85rem;
  width: 100%;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}
.pdf-gallery-img:hover {
  transform: scale(1.02);
}

/* Background Grid Pattern */
.bg-arch-grid {
  background-size: 48px 48px;
  background-image: 
    linear-gradient(to right, rgba(212, 175, 55, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(212, 175, 55, 0.06) 1px, transparent 1px);
}

/* Gold Text Gradient */
.text-gold-gradient {
  background: linear-gradient(135deg, #FFF0BD 0%, #F3C649 40%, #D4AF37 75%, #B8860B 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.light .text-gold-gradient {
  background: linear-gradient(135deg, #8B6508 0%, #B8860B 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --------------------------------------------------------------------------
   5. BUTTONS & UI CONTROLS
   -------------------------------------------------------------------------- */
.btn-gold {
  background: linear-gradient(135deg, #F3C649 0%, #D4AF37 50%, #B8860B 100%);
  color: #03060E !important;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.85rem 2.25rem;
  box-shadow: 0 10px 25px -5px rgba(212, 175, 55, 0.35);
  transition: all 0.3s ease;
  letter-spacing: -0.01em;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px -5px rgba(212, 175, 55, 0.5);
  color: #000 !important;
}

.btn-outline-gold {
  background: var(--glass-bg);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--slate-100) !important;
  border-radius: var(--radius-pill);
  padding: 0.85rem 2.25rem;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.btn-outline-gold:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-400);
  color: var(--slate-100) !important;
  transform: translateY(-2px);
}

/* Video Controls Floating Bar */
.btn-video-ctrl {
  background: rgba(3, 6, 14, 0.88) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(212, 175, 55, 0.6) !important;
  font-family: monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}
.btn-video-ctrl:hover {
  background: #D4AF37 !important;
  color: #03060E !important;
  border-color: #D4AF37 !important;
  transform: translateY(-2px);
}
html.light .btn-video-ctrl {
  background: rgba(15, 23, 42, 0.92) !important;
  color: #FFFFFF !important;
  border: 1px solid rgba(184, 134, 11, 0.7) !important;
}

/* --------------------------------------------------------------------------
   6. HEADER NAVIGATION (FULL WIDTH, CLEAN TRANSPARENT MENU)
   -------------------------------------------------------------------------- */
.navbar-custom {
  background-color: var(--nav-bg) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.35s ease;
}

.nav-link-custom {
  color: var(--slate-300) !important;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-pill);
  transition: all 0.2s ease;
  background: transparent !important;
}
.nav-link-custom:hover {
  color: var(--gold-400) !important;
  background: rgba(212, 175, 55, 0.12) !important;
}

.theme-toggle-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--gold-400);
  border-radius: var(--radius-pill);
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}
.theme-toggle-btn:hover {
  background: rgba(212, 175, 55, 0.2);
  transform: scale(1.08);
}

/* --------------------------------------------------------------------------
   7. HOTSPOTS & ROBOT VISUALIZER
   -------------------------------------------------------------------------- */
.hotspot-node {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-midnight-950);
  border: 2px solid var(--gold-400);
  color: var(--gold-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: monospace;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
}
.hotspot-node.active {
  background: var(--gold-400);
  color: #03060E;
  transform: translate(-50%, -50%) scale(1.3);
  box-shadow: 0 0 30px #D4AF37;
}

.scan-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  box-shadow: 0 0 20px #D4AF37;
  animation: scanAnim 3.5s infinite ease-in-out;
  pointer-events: none;
}

@keyframes scanAnim {
  0%, 100% { top: 5%; }
  50% { top: 92%; }
}

/* --------------------------------------------------------------------------
   8. RESPONSIVE BREAKPOINTS & MOBILE OPTIMIZATIONS
   -------------------------------------------------------------------------- */
.brand-logo-img {
  width: 80px;
  height: 80px;
  transition: all 0.3s ease;
}

@media (max-width: 991.98px) {
  /* Scale down navbar logo slightly on mobile so header height is balanced */
  .brand-logo-img {
    width: 52px !important;
    height: 52px !important;
  }

  /* Responsive Hero Section Top Padding */
  #hero {
    padding-top: 7.5rem !important;
    padding-bottom: 3.5rem !important;
    min-height: auto !important;
  }

  .display-3 {
    font-size: 2.25rem !important;
    line-height: 1.25 !important;
  }
  .display-5 {
    font-size: 1.85rem !important;
  }

  .navbar-collapse {
    background: var(--bg-midnight-900);
    padding: 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    margin-top: 0.75rem;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
  }

  /* Robot telemetry overlay badges on mobile */
  .telemetry-badge-top {
    top: 0.5rem !important;
    left: 0.5rem !important;
    margin: 0 !important;
  }
  .telemetry-badge-bottom {
    bottom: 0.5rem !important;
    right: 0.5rem !important;
    margin: 0 !important;
  }
}

@media (max-width: 575.98px) {
  .display-3 {
    font-size: 1.95rem !important;
  }
  
  .hero-btn-container {
    width: 100%;
  }
  .hero-btn-container .btn {
    width: 100%;
  }

  /* Hero Metrics Row Mobile Optimization */
  .hero-metrics-row {
    row-gap: 1.25rem !important;
  }
  .hero-metric-col {
    border: none !important;
    padding: 0.75rem 0.5rem !important;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-midnight-950);
}
::-webkit-scrollbar-thumb {
  background: var(--slate-800);
  border-radius: 4px;
  border: 1px solid var(--glass-border);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-400);
}
