/* =================================================================
   FIXED STYLES.CSS - Complete Layout Fix
   Version: 3.1 (Layout Issues Resolved)
   Description: Properly integrated Bootstrap + Custom CSS
   ================================================================= */

/* ===== 1. CSS CUSTOM PROPERTIES (Design Tokens) ===== */
:root {
  /* Brand Colors - Fixed and Complete */
  --color-primary: #4F46E5;
  --color-primary-50: #EEF2FF;
  --color-primary-100: #E0E7FF;
  --color-primary-200: #C7D2FE;
  --color-primary-300: #A5B4FC;
  --color-primary-400: #818CF8;
  --color-primary-500: #6366F1;
  --color-primary-600: #4F46E5;
  --color-primary-700: #4338CA;
  --color-primary-800: #3730A3;
  --color-primary-900: #312E81;

  /* Neutral Scale */
  --color-gray-25: #FCFCFD;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Semantic Colors */
  --color-success: #10B981;
  --color-success-50: #ECFDF5;
  --color-success-100: #D1FAE5;
  --color-success-300: #6EE7B7;
  --color-success-500: #10B981;
  --color-success-600: #059669;
  --color-success-700: #047857;

  --color-warning: #F59E0B;
  --color-warning-50: #FFFBEB;
  --color-warning-100: #FEF3C7;
  --color-warning-500: #F59E0B;
  --color-warning-600: #D97706;

  --color-danger: #EF4444;
  --color-danger-50: #FEF2F2;
  --color-danger-100: #FEE2E2;
  --color-danger-500: #EF4444;
  --color-danger-600: #DC2626;

  --color-info: #3B82F6;
  --color-info-50: #EFF6FF;
  --color-info-100: #DBEAFE;
  --color-info-500: #3B82F6;
  --color-info-600: #2563EB;

  /* Typography Scale */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Font Weights */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  /* Line Heights */
  --line-height-none: 1;
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;

  /* Spacing Scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max-width: 1280px;
  --header-height: 64px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-base: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-base: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms;
  --transition-base: 200ms;
  --transition-slow: 300ms;
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);

  /* Z-Index Scale */
  --z-base: 0;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* ===== 2. GLOBAL RESET & BASE STYLES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--line-height-normal);
  color: var(--color-gray-800);
  background-color: var(--color-gray-25);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ensure main content takes available space */
main {
  flex: 1;
  margin-top: 60px;
}

/* ===== 3. TYPOGRAPHY SYSTEM ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-gray-900);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.025em;
  margin: 0;
}

.heading-1 {
  font-size: var(--text-5xl);
  font-weight: var(--font-weight-extrabold);
  line-height: var(--line-height-none);
  letter-spacing: -0.05em;
}

.heading-2 {
  font-size: var(--text-4xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.04em;
}

.heading-3 {
  font-size: var(--text-3xl);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: -0.03em;
}

.heading-4 {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
  letter-spacing: -0.02em;
}

.heading-5 {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-snug);
}

.heading-6 {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-normal);
}

p {
  margin: 0;
  line-height: var(--line-height-relaxed);
  color: var(--color-gray-700);
}

.text-lead {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  line-height: var(--line-height-relaxed);
}

/* ===== 4. MODERN NAVIGATION ===== */
.site-header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-gray-200);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-fixed);
  transition: all var(--transition-base) var(--ease-in-out);
  height: var(--header-height);
}

.site-header.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--color-gray-300);
}

.navbar {
  height: 100%;
  padding: 0;
}

.navbar .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-gray-900);
  text-decoration: none;
  transition: var(--transition-base);
}

.navbar-brand:hover {
  color: var(--color-primary-600);
  text-decoration: none;
}

.logo-text {
  background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-800) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.02em;
}

/* Navigation Links */
.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link-custom {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-gray-700);
  text-decoration: none;
  transition: all var(--transition-base) var(--ease-in-out);
  position: relative;
}

.nav-link-custom:hover {
  background-color: var(--color-primary-50);
  color: var(--color-primary-700);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-link-custom.active {
  color: var(--color-primary-600);
  background-color: var(--color-primary-50);
  font-weight: var(--font-weight-semibold);
}

/* Mobile Menu Toggle */
.navbar-toggler {
  border: none;
  background: none;
  padding: var(--space-2);
  cursor: pointer;
}

.menu-icon {
  width: 24px;
  height: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.menu-icon span {
  width: 100%;
  height: 2px;
  background-color: var(--color-gray-700);
  border-radius: var(--radius-full);
  transition: all var(--transition-base) var(--ease-in-out);
}

/* ===== 5. MODERN BUTTON SYSTEM ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-none);
  padding: var(--space-3) var(--space-4);
  text-decoration: none;
  transition: all var(--transition-base) var(--ease-in-out);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-700) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-primary-700) 0%, var(--color-primary-800) 100%);
  box-shadow: var(--shadow-base);
  transform: translateY(-1px);
  color: white;
  text-decoration: none;
}

.btn-primary:focus {
  box-shadow: var(--shadow-base), 0 0 0 3px rgba(79, 70, 229, 0.2);
}

/* Secondary Button */
.btn-secondary {
  background-color: white;
  border-color: var(--color-gray-300);
  color: var(--color-gray-700);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--color-gray-50);
  border-color: var(--color-gray-400);
  box-shadow: var(--shadow-base);
  transform: translateY(-1px);
  color: var(--color-gray-700);
  text-decoration: none;
}

/* Outline Button */
.btn-outline {
  background-color: transparent;
  border-color: var(--color-primary-500);
  color: var(--color-primary-600);
}

.btn-outline:hover {
  background-color: var(--color-primary-50);
  border-color: var(--color-primary-600);
  color: var(--color-primary-700);
  text-decoration: none;
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-base);
  border-radius: var(--radius-xl);
}

.btn-xl {
  padding: var(--space-5) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-2xl);
}

/* ===== 6. MODERN CARD SYSTEM ===== */
.card {
  background-color: white;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-gray-200);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base) var(--ease-in-out);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  border-color: var(--color-gray-300);
}

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--color-gray-200);
  background-color: var(--color-gray-25);
}

.card-body {
  padding: var(--space-6);
}

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--color-gray-200);
  background-color: var(--color-gray-25);
}

/* Card Variants */
.card-elevated {
  box-shadow: var(--shadow-base);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ===== 7. HERO SECTION - FIXED ===== */
.hero-section {
  position: relative;
  padding: calc(var(--header-height) + var(--space-16)) 0 var(--space-16);
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-gray-25) 0%, rgba(238, 242, 255, 0.3) 100%);
}

/* Fixed background shapes - properly contained */
.hero-section::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.hero-section::after {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

/* ===== 8. FOOTER STYLES ===== */
.site-footer {
  background-color: var(--color-gray-900);
  color: var(--color-gray-300);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.footer-brand {
  max-width: 350px;
}

.footer-brand .logo-text {
  color: white;
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
  background: none;
  -webkit-text-fill-color: white;
}

.footer-description {
  color: var(--color-gray-400);
  line-height: var(--line-height-relaxed);
  margin-bottom: var(--space-6);
}

.footer-section h3 {
  color: white;
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-link {
  color: var(--color-gray-400);
  text-decoration: none;
  transition: color var(--transition-base) var(--ease-in-out);
}

.footer-link:hover {
  color: var(--color-primary-400);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--color-gray-700);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copyright {
  color: var(--color-gray-500);
  font-size: var(--text-sm);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* ===== 9. UTILITY CLASSES ===== */
/* Display */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline-flex { display: inline-flex !important; }
.d-grid { display: grid !important; }

/* Flexbox */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-between { justify-content: space-between !important; }
.justify-end { justify-content: flex-end !important; }
.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.items-stretch { align-items: stretch !important; }

/* Gap */
.gap-1 { gap: var(--space-1) !important; }
.gap-2 { gap: var(--space-2) !important; }
.gap-3 { gap: var(--space-3) !important; }
.gap-4 { gap: var(--space-4) !important; }
.gap-6 { gap: var(--space-6) !important; }
.gap-8 { gap: var(--space-8) !important; }

/* Text */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

/* Font Sizes */
.text-xs { font-size: var(--text-xs) !important; }
.text-sm { font-size: var(--text-sm) !important; }
.text-base { font-size: var(--text-base) !important; }
.text-lg { font-size: var(--text-lg) !important; }
.text-xl { font-size: var(--text-xl) !important; }
.text-2xl { font-size: var(--text-2xl) !important; }
.text-3xl { font-size: var(--text-3xl) !important; }

/* Font Weights */
.font-light { font-weight: var(--font-weight-light) !important; }
.font-normal { font-weight: var(--font-weight-normal) !important; }
.font-medium { font-weight: var(--font-weight-medium) !important; }
.font-semibold { font-weight: var(--font-weight-semibold) !important; }
.font-bold { font-weight: var(--font-weight-bold) !important; }

/* Colors */
.text-primary { color: var(--color-primary-600) !important; }
.text-gray-500 { color: var(--color-gray-500) !important; }
.text-gray-600 { color: var(--color-gray-600) !important; }
.text-gray-700 { color: var(--color-gray-700) !important; }
.text-gray-900 { color: var(--color-gray-900) !important; }
.text-success { color: var(--color-success-600) !important; }
.text-warning { color: var(--color-warning-600) !important; }
.text-danger { color: var(--color-danger-600) !important; }

/* Background Colors */
.bg-white { background-color: white !important; }
.bg-gray-25 { background-color: var(--color-gray-25) !important; }
.bg-gray-50 { background-color: var(--color-gray-50) !important; }
.bg-gray-100 { background-color: var(--color-gray-100) !important; }
.bg-primary { background-color: var(--color-primary-600) !important; }
.bg-primary-50 { background-color: var(--color-primary-50) !important; }
.bg-primary-100 { background-color: var(--color-primary-100) !important; }
.bg-success { background-color: var(--color-success-500) !important; }
.bg-warning { background-color: var(--color-warning-500) !important; }
.bg-danger { background-color: var(--color-danger-500) !important; }

/* Gradients */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--color-primary-600) 0%, var(--color-primary-700) 100%) !important;
  color: white;
}

.bg-gradient-soft {
  background: linear-gradient(135deg, var(--color-gray-25) 0%, rgba(238, 242, 255, 0.3) 100%) !important;
}

/* Border Radius */
.rounded { border-radius: var(--radius-base) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-2xl { border-radius: var(--radius-2xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

/* Shadows */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-base) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* ===== 10. RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .hero-section {
    padding: calc(var(--header-height) + var(--space-8)) 0 var(--space-8);
  }
  
  .heading-1 {
    font-size: var(--text-4xl);
  }
  
  .btn-xl {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .navbar-nav {
    flex-direction: column;
    padding: var(--space-4) 0;
    gap: var(--space-1);
  }
}

@media (max-width: 480px) {
  .hero-section::before,
  .hero-section::after {
    display: none;
  }
}

/* ===== 11. ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.btn:focus-visible,
.nav-link-custom:focus-visible {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}


/* =====================================================
   LANDING PAGE VISUAL FIXES - PRECISE IMPROVEMENTS
   File: app/static/css/style.css (REPLACE existing enhanced styles)
   ===================================================== */

/* ===== SECTION SPACING CONSISTENCY ===== */
.py-16 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.py-20 {
    padding-top: 6rem !important;
    padding-bottom: 6rem !important;
}

.mb-12 {
    margin-bottom: 3rem !important;
}

.mb-16 {
    margin-bottom: 4rem !important;
}

/* ===== MODERN HERO SECTION - REFINED ===== */
.ultra-modern-hero {
    background: linear-gradient(165deg, #ffffff 0%, #f8fafc 40%, #f1f5f9 100%);
    padding-top: calc(var(--header-height, 80px) + 4rem);
    padding-bottom: 5rem;
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
}

.ultra-modern-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -15%;
    width: 50vw;
    height: 50vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.03) 0%, rgba(79, 70, 229, 0.01) 50%, transparent 100%);
    border-radius: 50%;
    z-index: 1;
    filter: blur(40px);
}

.ultra-modern-hero::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: -10%;
    width: 35vw;
    height: 35vw;
    max-width: 400px;
    max-height: 400px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.02) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    filter: blur(30px);
}

.ultra-modern-hero .container {
    position: relative;
    z-index: 2;
}

/* ===== REFINED TYPOGRAPHY ===== */
.hero-headline-ultra {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #0f172a;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-primary-gradient {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

/* ===== ENHANCED INPUT GROUP ===== */
.hero-input-group-ultra {
    background: white;
    border-radius: 20px;
    padding: 6px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(226, 232, 240, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 2rem;
}

.hero-input-group-ultra:hover {
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(79, 70, 229, 0.1);
    border-color: rgba(79, 70, 229, 0.2);
}

.hero-input-group-ultra:focus-within {
    box-shadow: 
        0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05),
        0 0 0 3px rgba(79, 70, 229, 0.1);
    border-color: #4f46e5;
}

.hero-input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 1.25rem;
    z-index: 2;
    pointer-events: none;
    transition: color 0.3s ease;
}

.hero-input-group-ultra:focus-within .hero-input-icon {
    color: #4f46e5;
}

.form-control-xl.hero-input-ultra {
    padding: 1.125rem 1.5rem 1.125rem 3.75rem;
    font-size: 1rem;
    border: none;
    background: transparent;
    box-shadow: none !important;
    outline: none;
    flex: 1;
    border-radius: 16px;
    line-height: 1.5;
}

.form-control-xl.hero-input-ultra::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.btn-xl.hero-input-btn-ultra {
    padding: 1.125rem 2rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    border: none;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    line-height: 1.5;
}

.btn-xl.hero-input-btn-ultra:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

/* ===== AVATAR STACK - REFINED ===== */
.avatar-stack-ultra {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.avatar-stack-img-ultra {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid white;
    margin-left: -12px;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.avatar-stack-img-ultra:first-child {
    margin-left: 0;
    z-index: 4;
}

.avatar-stack-img-ultra:nth-child(2) {
    z-index: 3;
}

.avatar-stack-img-ultra:nth-child(3) {
    z-index: 2;
}

.avatar-stack-img-ultra:hover {
    transform: scale(1.1);
    z-index: 5;
}

/* ===== REFINED SECTION BADGES ===== */
.section-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    color: #0369a1;
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(3, 105, 161, 0.1);
    letter-spacing: 0.025em;
}

/* ===== FIXED CARD SYSTEM (REMOVE AWKWARD BORDERS) ===== */
.card-modern {
    background: white;
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 
        0 1px 3px 0 rgba(0, 0, 0, 0.1),
        0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
    overflow: hidden;
    position: relative;
    padding: 2.5rem;
    height: 100%;
}

/* REMOVE the problematic top border */
.card-modern::before {
    display: none !important;
}

.card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(79, 70, 229, 0.05);
    border-color: rgba(79, 70, 229, 0.1);
}

/* ===== ENHANCED FEATURE ICONS ===== */
.feature-icon-modern {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-icon-modern i {
    font-size: 2rem;
    z-index: 1;
    transition: transform 0.4s ease;
}

.card-modern:hover .feature-icon-modern {
    transform: scale(1.1);
}

.card-modern:hover .feature-icon-modern i {
    transform: scale(1.1);
}

/* ===== REFINED COMPARISON CARDS ===== */
.comparison-section {
    background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
    padding: 5rem 0;
}

.comparison-card {
    border-radius: 24px;
    padding: 3rem;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.before-card {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: rgba(239, 68, 68, 0.1);
}

.after-card {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: rgba(16, 185, 129, 0.1);
}

.comparison-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.before-card .comparison-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.after-card .comparison-icon {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

/* ===== DEMO SECTION ENHANCEMENT ===== */
.demo-section-modern {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 0;
}

.demo-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 0 1px rgba(226, 232, 240, 0.5);
    background: white;
}

.demo-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.demo-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.demo-dot:nth-child(1) { background: #ef4444; }
.demo-dot:nth-child(2) { background: #f59e0b; }
.demo-dot:nth-child(3) { background: #10b981; }

.demo-content {
    aspect-ratio: 16/9;
    background: #fafafa;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* ===== ENHANCED STATS SECTION ===== */
.stats-modern {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.stats-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(79, 70, 229, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    z-index: 1;
}

.stats-modern .container {
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    position: relative;
    padding: 2rem 1rem;
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== POLISHED TESTIMONIAL ===== */
.testimonial-section {
    background: white;
    padding: 6rem 0;
}

.blockquote {
    position: relative;
    padding: 3rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 2rem;
}

.blockquote::before {
    content: '"';
    position: absolute;
    top: -15px;
    left: 30px;
    font-size: 5rem;
    color: #4f46e5;
    font-family: Georgia, serif;
    line-height: 1;
    opacity: 0.2;
}

.blockquote p {
    font-size: 1.25rem;
    line-height: 1.6;
    color: #334155;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* ===== POLISHED CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
    padding: 6rem 0;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    color: white;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.cta-section .text-lead {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 3rem;
}

/* ===== ENHANCED FOOTER (IF NEEDED) ===== */
.site-footer {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 4rem 0 2rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(226, 232, 240, 0.2) 50%, transparent 100%);
}

/* ===== ENHANCED BUTTON STYLES ===== */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border-radius: 16px;
    font-weight: 600;
    padding: 1rem 2rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    background: transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    font-weight: 600;
    padding: 1rem 2rem;
}

.btn-outline-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline-light:hover::before {
    width: 100%;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-color: white;
    color: white;
}

/* ===== RESPONSIVE DESIGN - FIXED ===== */
@media (max-width: 768px) {
    .ultra-modern-hero {
        min-height: auto;
        padding-top: calc(var(--header-height, 80px) + 2rem);
        padding-bottom: 3rem;
    }
    
    .hero-input-group-ultra {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
        max-width: 100% !important;
    }
    
    .hero-input-icon {
        position: static;
        transform: none;
        order: -1;
        align-self: flex-start;
        margin-bottom: 8px;
    }
    
    .form-control-xl.hero-input-ultra {
        padding-left: 1.25rem;
        order: 1;
    }
    
    .btn-xl.hero-input-btn-ultra {
        width: 100%;
        justify-content: center;
        order: 2;
    }
    
    .avatar-stack-ultra {
        justify-content: center;
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .demo-container {
        border-radius: 20px;
    }
    
    .comparison-card {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .card-modern {
        padding: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .feature-icon-modern {
        width: 60px;
        height: 60px;
        margin-bottom: 1.5rem;
    }
    
    .feature-icon-modern i {
        font-size: 1.75rem;
    }
    
    .py-16 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .py-20 {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    .blockquote {
        padding: 2rem;
    }
    
    .stat-item {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-headline-ultra {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .btn-xl {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .avatar-stack-img-ultra {
        width: 40px;
        height: 40px;
        margin-left: -10px;
    }
    
    .feature-icon-modern {
        width: 56px;
        height: 56px;
        margin-bottom: 1rem;
    }
    
    .comparison-card {
        padding: 1.5rem;
    }
    
    .card-modern {
        padding: 1.5rem;
    }
}

/* ===== UTILITY CLASSES FOR SPACING ===== */
.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.text-white-90 {
    color: rgba(255, 255, 255, 0.9) !important;
}

.hover-lift:hover {
    transform: translateY(-4px);
    transition: transform 0.3s ease;
}

.transition-all {
    transition: all 0.3s ease;
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.hero-section,
.demo-section-modern,
.stats-modern,
.cta-section {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.card-modern,
.feature-icon-modern {
    will-change: transform;
    backface-visibility: hidden;
}


