@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500&display=swap");

:root {
  /* Unified Dark Theme Colors */
  --bg-primary: #020617; /* Slate 950 - Deep Navy */
  --bg-secondary: #0f172a; /* Slate 900 - Navy */
  --bg-tertiary: #050505; /* Pitch Black for sections */
  
  --text-primary: #f8fafc; /* Slate 50 - Off White */
  --text-secondary: #94a3b8; /* Slate 400 - Muted blue-grey */
  --text-muted: #64748b; /* Slate 500 */
  
  --brand-primary: #3b82f6; /* Blue 500 - Main Brand */
  --brand-accent: #facc15; /* Yellow 400 - Lines & Underlines */
  --brand-success: #10b981; /* Emerald 500 - Percentages & Trends */
  
  --border-primary: rgba(255, 255, 255, 0.05);
  --border-secondary: rgba(255, 255, 255, 0.1);
  
  --glass-bg: rgba(15, 23, 42, 0.8);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Ensure .dark class is still compatible but does nothing */
.dark {}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  /* Prevent horizontal scroll issues reliably on mobile */
  overflow-x: hidden;
  width: 100vw;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

body {
  font-family: "Poppins", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  overflow-x: hidden;
  width: 100%;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Playfair Display", serif;
  color: var(--text-primary);
}

/* Logo Theme Support */
.logo-theme-aware {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.dark .logo-theme-aware {
  filter: brightness(0) invert(1);
}

/* Glassmorphism */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: background 0.3s ease, border 0.3s ease;
}

.glass-nav {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s ease, border-bottom 0.3s ease;
}

/* Mega Menu */
.mega-menu-trigger:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease-in-out;
  background: var(--bg-secondary) !important;
  border-color: var(--border-primary) !important;
  color: var(--text-primary) !important;
}

.mega-menu h4 {
  color: var(--text-primary) !important;
}

.mega-menu a {
  color: var(--text-secondary) !important;
}

.mega-menu a:hover {
  color: var(--brand-primary) !important;
}

/* Text Gradients */
.text-gradient-blue {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-gold {
  background: linear-gradient(135deg, #b45309 0%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animations */
.hover-float:hover {
  transform: translateY(-5px);
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.blob-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: drift 20s infinite alternate;
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }

  to {
    transform: translate(50px, 50px);
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Global Form Styles */
input, textarea, select {
  background-color: var(--bg-primary) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-secondary) !important;
  border-radius: 0.5rem;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--brand-primary) !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Base Select Overrides (for standard browser dropdowns) */
select option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

/* Force Dark Mode on White Box Components */
.bg-white {
  background-color: var(--bg-secondary) !important;
}

.text-slate-900 {
  color: var(--text-primary) !important;
}

.border-slate-100, .border-slate-200 {
  border-color: var(--border-primary) !important;
}

/* Global Marquee Animation */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
  display: flex !important;
  width: max-content;
}

.animate-marquee:hover {
  animation-play-state: paused;
}
