/* == CSS Variables ======================================================= */
:root {
  /* Modern Color Palette */
  --navy: #0B1426;
  --navy-light: #1E2A47;
  --white: #FFFFFF;

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

  --primary:       #2563EB;
  --primary-light: #3B82F6;
  --primary-dark:  #1D4ED8;
  --accent:        #06B6D4;
  --accent-light:  #22D3EE;

  --success: #10B981;
  --warning: #F59E0B;
  --error:   #EF4444;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  --gradient-accent:  linear-gradient(135deg, var(--accent) 0%,  var(--accent-light) 100%);
  --gradient-dark:    linear-gradient(135deg, var(--navy) 0%,    var(--navy-light) 100%);

  /* Legacy support */
  --light-gray:   var(--gray-50);
  --accent-blue:  var(--primary);
  --text-dark:    var(--gray-900);
  --text-medium:  var(--gray-600);
  --text-light:   var(--gray-400);
  --brand-bg:     var(--navy);
  --brand-text:   var(--text-dark);
  --brand-accent: var(--primary);
  --brand-accent-2: var(--accent);
  --brand-primary: var(--primary);

  /* Gradient helper vars (for from-*/to-* utilities) */
  --grad-from: var(--gray-50);
  --grad-to:   #ffffff;
}

/* == Typography & Base =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--gray-800);
  background: #fff;
  line-height: 1.7;
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-top: 0;
}

.display-1, .display-2, .display-3 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.display-4 { font-weight: 600; color: var(--brand-text); }

.lead {
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-600);
}

/* Smooth transitions (broad + targeted overrides for perf) */
* { transition: all .2s cubic-bezier(0.4, 0, 0.2, 1); }
:where(a, button, .btn, .card, .dropdown-menu, .navbar, .hero-video, .hero-fallback, .modern-feature-card, .glass-card) {
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* == Accessibility ======================================================= */
.skip-link {
  position: absolute;
  top: -40px; left: 6px;
  background: var(--brand-accent);
  color: #fff;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 1000;
}
.skip-link:focus { top: 0; }

:where(a, button, input, textarea, select):focus:not(:focus-visible) { outline: none !important; box-shadow: none !important; }
:where(a, button, input, textarea, select):focus-visible { outline: 2px solid var(--brand-accent); outline-offset: 2px; }

/* == Utilities =========================================================== */
/* Spacing */
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-6  { padding-left: 2rem;  padding-right: 2rem; }
.px-8  { padding-left: 2.5rem; padding-right: 2.5rem; }
.pt-4  { padding-top: 1rem; }
.mb-16 { margin-bottom: 4rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-6 { margin-bottom: 2rem !important; }
.mb-8 { margin-bottom: 3rem !important; }
.mt-0 { margin-top: 0 !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-5 { margin-top: 3rem !important; }
.mt-12 { margin-top: 3rem !important; }

/* Gutter helpers (both patterns supported) */
.g-6 > *  { padding: 1.5rem; }                 /* non-Bootstrap usage */
.g-6      { --bs-gutter-x: 2rem; --bs-gutter-y: 2rem; } /* Bootstrap usage */
.g-12     { --bs-gutter-x: 3rem; --bs-gutter-y: 3rem; }

.col-gap-xl { column-gap: 3rem; }

/* Sizing */
.w-14 { width: 3.5rem; } .h-14 { height: 3.5rem; }
.w-16 { width: 4rem; }   .h-16 { height: 4rem; }
.w-20 { width: 5rem; }   .h-20 { height: 5rem; }

/* Radius */
.rounded-xl  { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full{ border-radius: 50%; }

/* Ensure rounded-full elements stay circular */
.rounded-full.w-16, .w-16.rounded-full {
  width: 4rem;
  height: 4rem;
  min-width: 4rem;
  min-height: 4rem;
  max-width: 4rem;
  max-height: 4rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

.rounded-full.w-20, .w-20.rounded-full {
  width: 5rem;
  height: 5rem;
  min-width: 5rem;
  min-height: 5rem;
  max-width: 5rem;
  max-height: 5rem;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Bootstrap rounded-circle elements with fixed dimensions */
.rounded-circle {
  border-radius: 50% !important;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Typography utilities */
.text-sm { font-size: .875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl{ font-size: 1.5rem; }
.text-4xl{ font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.tracking-wider { letter-spacing: .05em; }
.uppercase { text-transform: uppercase; }
.text-balance { text-wrap: balance; }
.letter-spacing-tight { letter-spacing: -0.025em; }
.letter-spacing-wide  { letter-spacing: .1em; }

/* Layout */
.max-w-3xl { max-width: 48rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.grid { display: grid !important; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
.gap-4 { gap: 1rem !important; }

/* Colors */
.text-primary { color: var(--primary) !important; }
.text-accent  { color: var(--accent) !important; }
.text-gray-500 { color: var(--gray-500) !important; }
.text-gray-600 { color: var(--gray-600) !important; }
.text-gray-700 { color: var(--gray-700) !important; }
.text-gray-900 { color: var(--gray-900) !important; }
.text-white { color: #fff !important; }
.text-white\/90 { color: rgba(255,255,255,.9) !important; }
.text-brand-accent { color: var(--brand-accent) !important; }
.text-brand-accent-2 { color: var(--brand-accent-2) !important; }
.text-navy { color: var(--navy) !important; }

/* Background helpers */
.bg-gradient-primary { background: var(--gradient-primary) !important; }
.bg-gradient-accent  { background: var(--gradient-accent) !important; }
.bg-gradient-dark    { background: var(--gradient-dark) !important; }
.bg-brand            { background-color: var(--brand-bg) !important; }
.bg-brand-accent     { background-color: var(--brand-accent) !important; }
.bg-brand-accent-2   { background-color: var(--brand-accent-2) !important; }
.bg-primary\/10      { background-color: rgba(37,99,235,.1) !important; }

/* Tailwind-like gradient-from/to utilities */
.from-gray-50 { --grad-from: var(--gray-50); }
.to-white     { --grad-to:   #ffffff; }
.bg-gradient-to-br {
  background-image: linear-gradient(135deg, var(--grad-from, var(--gray-50)) 0%, var(--grad-to, #fff) 100%) !important;
}

/* Borders */
.border-brand-accent { border-color: var(--brand-accent) !important; }
.border-l-4 { border-left-width: 4px; }
.border-l-red-400   { border-left-color: #f87171; }
.border-l-blue-400  { border-left-color: #60a5fa; }
.border-l-green-400 { border-left-color: #4ade80; }
.border-t { border-top: 1px solid var(--gray-200) !important; }
.border-gray-200 { border-color: var(--gray-200) !important; }

/* Status dots */
.status-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  min-height: 8px;
  max-width: 8px;
  max-height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-sizing: border-box;
}
.status-dot.online  { background-color: var(--success); box-shadow: 0 0 0 2px rgba(16,185,129,.2); }
.status-dot.offline { background-color: var(--gray-400); }

/* Misc small helpers */
.inline-block { display: inline-block; }

/* == Navbar & Dropdowns ================================================== */
.navbar-brand { font-weight: 700; font-size: 1.5rem; }
.navbar-nav .nav-link { font-weight: 500; transition: color .2s ease; }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus { color: var(--brand-accent) !important; }

.navbar .nav-link, .navbar .dropdown-toggle { border-radius: 6px; }
.navbar .nav-link:focus, .navbar .dropdown-toggle:focus { outline: none !important; box-shadow: none !important; }
.navbar .nav-link:focus-visible, .navbar .dropdown-toggle:focus-visible { outline: none; background-color: rgba(255,255,255,.08); }

/* Translucent, blurred dropdown over dark navbar */
.dropdown-menu {
  background-color: rgba(11, 20, 38, 0.80);
  color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.28), 0 10px 10px -5px rgba(0,0,0,.16);
}
.dropdown-item {
  color: rgba(255,255,255,0.9);
  transition: background-color .15s ease, color .15s ease;
}
.dropdown-item:hover, .dropdown-item:focus-visible {
  background-color: rgba(255,255,255,.08);
  color: #fff;
  outline: none;
}
.dropdown-item:focus { outline: none; box-shadow: none; }

/* == Buttons ============================================================= */
.btn-primary {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  font-weight: 600;
  transition: all .3s ease;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #0056a3;
  border-color: #0056a3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,115,207,.3);
}
.btn-outline-primary {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  font-weight: 600;
}
.btn-outline-primary:hover, .btn-outline-primary:focus {
  background-color: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
  transform: translateY(-2px);
}
.btn-outline-light:hover, .btn-outline-light:focus { transform: translateY(-2px); }
.btn-modern {
  border-radius: 12px;
  font-weight: 600;
  padding: .75rem 2rem;
  transition: all .3s ease;
  border: none;
  position: relative;
  overflow: hidden;
}
.btn-modern::before {
  content: "";
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transition: left .5s ease;
}
.btn-modern:hover::before { left: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* == Cards =============================================================== */
.card { transition: transform .2s ease, box-shadow .2s ease; border: 0; }
.card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,.1) !important; }

.glass-card {
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  padding: 1.5rem;
}

.modern-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,.05);
  border: 1px solid var(--gray-200);
  transition: all .3s ease;
}
.modern-card:hover { box-shadow: 0 20px 25px rgba(0,0,0,.1); transform: translateY(-2px); }

.modern-feature-card {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
  transition: all .3s cubic-bezier(0.4,0,0.2,1);
  border: 1px solid rgba(0,0,0,.06);
  height: 100%;
}
.modern-feature-card:hover { transform: translateY(-4px); box-shadow: 0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04); }

/* Brand mark gradient */
.brand-mark { background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2)); border-radius: 4px; }

/* == Icon badges & feature pairs ======================================== */
.icon-badge {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}
.icon-badge.accent { background: var(--gradient-accent); }
.icon-badge.lg     { width: 56px; height: 56px; min-width: 56px; min-height: 56px; max-width: 56px; max-height: 56px; }
.icon-badge.sm     { width: 28px; height: 28px; min-width: 28px; min-height: 28px; max-width: 28px; max-height: 28px; font-size: .75rem; }

/* Icon left, generous spacing to headings/text */
.feature-pair { display:flex; align-items:flex-start; gap:14px; padding:10px 0; }
.feature-title { margin: 2px 0 6px 0; }

/* == Checklist =========================================================== */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-item { display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; }
.check-dot  {
  width: 22px;
  height: 22px;
  min-width: 22px;
  min-height: 22px;
  max-width: 22px;
  max-height: 22px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
}
.check-dot.accent { background: var(--gradient-accent); }
.check-dot.error  { background: linear-gradient(135deg, #ef4444, #f87171); }

/* Replace legacy "long strip" visuals if present */
.criteria-section .flex .bg-gradient-primary,
.criteria-section .flex .bg-gradient-accent,
.row .flex .bg-gradient-primary,
.row .flex .bg-gradient-accent {
  width: 22px !important; height:22px !important; border-radius:9999px !important; padding:0 !important;
}

/* Disable left border accents on modern-feature-card when using pills */
.modern-feature-card[class*="border-l-"] { border-left: none !important; }

/* == HERO (full system) ================================================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--gradient-dark);
}
.hero-media { position: absolute; top:0; left:0; width:100%; height:100%; z-index:0; }
.hero-video {
  position: absolute; top:0; left:0; width:100%; height:100%;
  object-fit: cover; object-position: center;
  opacity: 1; transition: opacity .3s ease;
  z-index: 1; background: var(--gradient-dark);
  pointer-events: none;
}
.hero-video::-webkit-media-controls { display: none !important; }
.hero-overlay {
  position: absolute; top:0; left:0; width:100%; height:100%;
  background: linear-gradient(135deg, rgba(11,20,38,.4) 0%, rgba(30,42,71,.6) 100%);
  z-index: 2;
}
.hero-fallback {
  position: absolute; top:0; left:0; width:100%; height:100%;
  background:
    linear-gradient(135deg, rgba(11,20,38,.9) 0%, rgba(30,42,71,.8) 100%),
    radial-gradient(circle at 30% 30%, rgba(37,99,235,.3) 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(6,182,212,.2) 0%, transparent 50%),
    var(--gradient-dark);
  z-index: 0; opacity: 0; transition: opacity .3s ease;
}
.hero-content {
  position: relative; z-index: 3; text-align: center; padding: 2rem 0;
}
.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800; color: #fff; margin-bottom: 2rem; line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  color: rgba(255,255,255,.9);
  max-width: 700px; margin: 0 auto 3rem; font-weight: 400; line-height: 1.6;
}
.hero-cta { display:flex; flex-direction: column; gap: 1rem; align-items: center; }
@media (min-width: 640px) { .hero-cta { flex-direction: row; justify-content: center; } }
.hero-scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); z-index: 3; }
.scroll-down-arrow {
  width: 24px; height: 24px;
  border: 2px solid rgba(255, 255, 255, .6); border-top: none; border-right: none;
  transform: rotate(-45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
  0%, 100% { transform: translateY(0) rotate(-45deg); opacity: .6; }
  50%      { transform: translateY(-8px) rotate(-45deg); opacity: 1; }
}

/* Variant used on sellers pages – softer overlay */
.hero-section.sellers .hero-overlay {
  background: radial-gradient(ellipse at 50% 0%, rgba(0,0,0,.28), rgba(0,0,0,.5) 70%);
}

/* Reduced height heroes for non-homepage pages (60% of full height) */
.hero-section.reduced-height {
  min-height: 60vh;
}

/* Mobile hero tweaks */
@media (max-width: 768px) {
  .hero-section { min-height: 100vh; }
  .hero-section.reduced-height { min-height: 60vh; }
  .hero-content { padding: 3rem 0; }
}

/* == Animations ========================================================== */
.fade-in { animation: fadeIn .6s ease-in; }
.fade-up { animation: fadeUp .8s ease-out forwards; opacity: 0; transform: translateY(30px); }
@keyframes fadeIn { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
@keyframes fadeUp { to { opacity:1; transform: translateY(0); } }

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

/* == Timeline (classic two-column) ====================================== */
.timeline { position: relative; padding: 20px 0; }
.timeline::before {
  content:""; position:absolute; left:50%; top:0; bottom:0; width:2px;
  background: var(--accent-blue); transform: translateX(-50%);
}
.timeline-item { position: relative; margin-bottom: 50px; width: 50%; }
.timeline-item:nth-child(odd)  { left:0;   padding-right: 40px; text-align: right; }
.timeline-item:nth-child(even) { left:50%; padding-left:  40px; text-align: left; }
.timeline-marker {
  position: absolute;
  top: 0;
  width: 60px;
  height: 60px;
  min-width: 60px;
  min-height: 60px;
  max-width: 60px;
  max-height: 60px;
  background: var(--accent-blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,115,207,.3);
  flex-shrink: 0;
  box-sizing: border-box;
}
.timeline-item:nth-child(odd)  .timeline-marker { right: -30px; }
.timeline-item:nth-child(even) .timeline-marker { left:  -30px; }
.timeline-content h4 { margin-bottom: 10px; color: var(--navy); }
.timeline-period { font-size: .9em; color: var(--accent-blue); font-weight: 600; }
/* Mobile: single column */
@media (max-width: 768px) {
  .timeline::before { left: 30px; }
  .timeline-item { width: 100%; left: 0 !important; padding-left: 70px !important; padding-right: 0 !important; text-align: left !important; }
  .timeline-marker { left: 0 !important; right: auto !important; }
}

/* == Timeline (modern vertical) ========================================= */
.modern-timeline { position: relative; padding: 2rem 0; }
.timeline-step { display:flex; align-items:flex-start; margin-bottom: 4rem; position: relative; }
.timeline-step:last-child { margin-bottom: 0; }
.step-indicator { flex-shrink: 0; margin-right: 2rem; position: relative; z-index: 2; }
.step-number {
  width: 4rem; height: 4rem; border-radius: 50%;
  background: var(--gradient-primary); color: #fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; font-size: 1.125rem; position: relative; z-index: 2;
}
.step-connector {
  position:absolute; top: 4rem; left: 50%; transform: translateX(-50%);
  width:2px; height:4rem; background: linear-gradient(to bottom, var(--primary), var(--gray-200)); z-index:1;
}
.timeline-step:last-child .step-connector { display: none; }
.step-content { flex: 1; padding-top: .5rem; }
.step-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 1rem; }
.step-title { font-size: 1.5rem; font-weight: 700; color: var(--gray-900); margin: 0; }
.step-duration {
  font-size: .875rem; color: var(--primary); font-weight: 600;
  padding: .25rem .75rem; background: rgba(37,99,235,.1); border-radius: 1rem;
}
.step-description { color: var(--gray-600); line-height: 1.6; margin-bottom: 1rem; }
.step-highlights { display:flex; flex-wrap:wrap; gap: .5rem; }
.highlight-pill {
  font-size: .75rem; color: var(--gray-700); background: var(--gray-100);
  padding: .25rem .75rem; border-radius: 1rem; font-weight: 500;
}
@media (max-width: 768px) {
  .timeline-step { flex-direction: column; margin-bottom: 3rem; }
  .step-indicator { margin-right: 0; margin-bottom: 1rem; }
  .step-connector { display: none; }
  .step-header { flex-direction: column; align-items: flex-start; gap: .5rem; }
}

/* == Forms =============================================================== */
.form-label {
  font-weight: 500; color: var(--brand-text); margin-bottom: .5rem;
}
.form-control, .form-select {
  border: 1px solid #D1D5DB;
  border-radius: 6px;
  padding: .75rem;
  transition: all .2s ease;
}
.form-control:hover, .form-select:hover { border-color: var(--brand-accent); }
.form-control:focus, .form-select:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 .2rem rgba(14,165,233,.25);
}
.was-validated .form-control:invalid, .form-control.is-invalid {
  border-color: var(--error);
  padding-right: calc(1.5em + .75rem);
  background-image: none;
}
.was-validated .form-control:valid, .form-control.is-valid {
  border-color: var(--success);
  padding-right: calc(1.5em + .75rem);
  background-image: none;
}

/* Alerts */
.alert-success { background-color: #D1FAE5; border-color: #10B981; color: #065F46; }
.alert-danger  { background-color: #FEE2E2; border-color: #EF4444; color: #991B1B; }
.alert-info    { background-color: #DBEAFE; border-color: var(--brand-accent); color: #1E3A8A; }
.alert-debug   { color: #000; background-color: #fff; border-color: #d6e9c6; }
.alert-error   { color: #b94a48; background-color: #f2dede; border-color: #eed3d7; }

/* Portfolio grid helpers */
.row-cols-lg-3 > * .card { height: 100%; display:flex; flex-direction: column; }
.card-body.d-flex.flex-column { flex:1; }

/* == Footer (modern) ===================================================== */
footer { background-color: var(--navy) !important; }
.footer-modern { padding: 1.5rem 0 1rem; color: rgba(255,255,255,.8); margin-top: 3rem; }
.footer-brand { margin-bottom: .75rem; }
.footer-description { color: rgba(255,255,255,.6); font-size: .875rem; margin: 0; line-height: 1.4; }
.footer-heading {
  color: #fff; font-size: .8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: .75rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .25rem; }
.footer-links a { color: rgba(255,255,255,.7); text-decoration: none; font-size: .8rem; line-height: 1.3; transition: color .2s ease; }
.footer-links a:hover { color: #fff; }
.footer-contact { font-size: .8rem; line-height: 1.3; }
.contact-item { margin-bottom: .5rem; color: rgba(255,255,255,.7); }
.contact-item:last-child { margin-bottom: 0; }
.contact-item strong { color: #fff; display:block; margin-bottom: .25rem; }
.contact-item a { color: rgba(255,255,255,.7); text-decoration:none; transition: color .2s ease; }
.contact-item a:hover { color: #fff; }
.footer-divider { border-color: rgba(255,255,255,.1); margin: 1rem 0 .75rem; }
.footer-copyright { color: rgba(255,255,255,.6); font-size: .75rem; margin: 0; }
.footer-legal { display:flex; gap: .75rem; font-size: .75rem; }
.footer-legal a { color: rgba(255,255,255,.7); text-decoration:none; transition: color .2s ease; }
.footer-legal a:hover { color: #fff; }
.footer-link { transition: all .2s ease; }
.footer-link:hover { opacity: 1 !important; color: var(--accent-blue) !important; }
@media (max-width: 768px) {
  .footer-modern { padding: 1.25rem 0 .75rem; }
  .footer-legal { justify-content: center; margin-top: .75rem; }
}

/* == Backgrounds & Status (utility) ===================================== */
.bg-red-100   { background-color: #fee2e2; }
.bg-blue-100  { background-color: #dbeafe; }
.bg-green-100 { background-color: #dcfce7; }

/* == Loading Skeleton ==================================================== */
.loading-skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}
@keyframes loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* == Images & Performance =============================================== */
img { max-width: 100%; height: auto; }

/* == Shadows & Elevation ================================================= */
.shadow-soft { box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04); }
.shadow-md   { box-shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06); }
.shadow-lg   { box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05); }

/* == Reduced Motion ====================================================== */
@media (prefers-reduced-motion: reduce) {
  .hero-video { opacity: 0; }
  .hero-fallback { opacity: 1; }
  .scroll-down-arrow { animation: none; }
  * { transition: none !important; }
}

/* == Dark Mode (OS-driven) ============================================== */
@media (prefers-color-scheme: dark) {
  /* Base body styles */
  body { color: #e5e7eb; background: #0b1220; }

  /* Card and container backgrounds */
  .card, .modern-feature-card, .glass-card, .step-content {
    background: #10172a; border-color: rgba(255,255,255,.06);
  }
  .dropdown-menu { background-color: rgba(12,18,35,.8); border-color: rgba(255,255,255,.08); }

  /* Headings and titles - make all headings readable */
  h1, h2, h3, h4, h5, h6,
  .h1, .h2, .h3, .h4, .h5, .h6,
  .hero-title,
  .display-1, .display-2, .display-3, .display-4 {
    color: #f8fafc !important;
  }

  /* Text color overrides for readability */
  .text-gray-900 { color: #f8fafc !important; }
  .text-gray-800 { color: #e5e7eb !important; }
  .text-gray-700 { color: #cbd5e1 !important; }
  .text-gray-600 { color: #94a3b8 !important; }
  .text-gray-500 { color: #64748b !important; }
  .text-gray-400 { color: #475569 !important; }
  .text-dark { color: #f8fafc !important; }
  .text-muted { color: #94a3b8 !important; }

  /* Specific component text - covering all mentioned elements */
  .accordion-button,
  .step-title,
  .step-description,
  .feature-title,
  .stat-label,
  .stat-value,
  .check-item p,
  .contact-info h3,
  .contact-info p,
  .form-label,
  .lead,
  .hero-subtitle,
  .timeline-step .step-title,
  .timeline-step .step-description,
  address {
    color: #e5e7eb !important;
  }

  /* Form elements */
  .form-control, .form-select {
    background-color: #1e293b !important;
    border-color: rgba(255,255,255,.1) !important;
    color: #e5e7eb !important;
  }
  .form-control:focus, .form-select:focus {
    background-color: #1e293b !important;
    border-color: var(--primary) !important;
    color: #e5e7eb !important;
  }
  .form-control::placeholder {
    color: #64748b !important;
  }

  /* Buttons with transparent backgrounds */
  .btn-outline-primary, .btn-outline-light {
    color: #e5e7eb !important;
    border-color: rgba(255,255,255,.2) !important;
  }
  .btn-outline-primary:hover, .btn-outline-light:hover {
    background-color: rgba(255,255,255,.1) !important;
    color: #f8fafc !important;
  }

  /* Cards and panels background adjustment for better contrast */
  .card-body {
    background-color: #10172a !important;
  }

  /* FAQ Accordion specific */
  .accordion-item {
    background-color: #10172a !important;
    border-color: rgba(255,255,255,.06) !important;
  }
  .accordion-button:not(.collapsed) {
    background-color: #1e293b !important;
    color: #f8fafc !important;
  }
  .accordion-body {
    background-color: #10172a !important;
    color: #e5e7eb !important;
  }

  /* Timeline steps */
  .step-number {
    background-color: var(--primary) !important;
    color: white !important;
  }
  .step-connector {
    background-color: rgba(255,255,255,.1) !important;
  }

  /* Badges and pills */
  .badge-soft-primary, .badge-soft-accent {
    background-color: rgba(37,99,235,.2) !important;
    color: #93c5fd !important;
  }
  .highlight-pill {
    background-color: rgba(255,255,255,.08) !important;
    color: #cbd5e1 !important;
  }

  /* Icon badges */
  .icon-badge {
    background: var(--gradient-primary) !important;
  }
  .icon-badge.accent {
    background: var(--gradient-accent) !important;
  }

  /* Stats section */
  .stat-item {
    color: #e5e7eb !important;
  }

  /* Ensure white text stays white when intended */
  .text-white {
    color: #ffffff !important;
  }

  /* Override any inline styles that might interfere */
  [style*="color: var(--brand-accent)"] {
    color: var(--accent-light) !important;
  }

  /* Fix bright gradient backgrounds in night mode */
  .bg-gradient-to-br,
  .from-gray-50,
  .to-white,
  section[class*="bg-gradient-to-br"],
  section[class*="from-gray-50"],
  section[class*="to-white"] {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  }

  /* Specific section background overrides */
  .py-20.bg-gradient-to-br.from-gray-50.to-white {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
  }

  /* Fix accordion button default state in night mode */
  .accordion-button {
    background-color: #10172a !important;
    color: #e5e7eb !important;
    border-color: rgba(255,255,255,.06) !important;
  }
  .accordion-button:not(.collapsed) {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: rgba(255,255,255,.1) !important;
  }
  .accordion-button::after {
    filter: invert(1) !important;
  }
  .accordion-button:hover {
    background-color: #1e293b !important;
    color: #f8fafc !important;
  }
}

/* == High Contrast Mode Support ========================================= */
@media (prefers-contrast: high) {
  :root { --gray-50: #ffffff; --gray-100: #f0f0f0; --gray-900: #000000; }
  .glass-card { background: #fff; border: 2px solid var(--gray-900); }
}

/* == Print =============================================================== */
@media print {
  .no-print { display: none !important; }
  .hero-section, .hero-media, .hero-overlay, .hero-fallback, .hero-scroll-indicator { display: none !important; }
  .btn, .navbar, .footer-modern { display: none !important; }
  .modern-feature-card, .glass-card { box-shadow: none !important; border: 1px solid var(--gray-300) !important; }
  body { font-size: 12pt; color: #000; }
  a { color: #000; text-decoration: underline; }
}

/* === CTA Parallax Art =============================================== */
.cta-section {
  position: relative;
  overflow: hidden;           /* keep the art inside the section */
  isolation: isolate;         /* create a stacking context so z-index is predictable */
}

.cta-section .cta-art {
  position: absolute;
  /* Position: bottom-right by default; tweak to taste */
  right: clamp(-120px, -8vw, -40px);
  bottom: clamp(-60px, -5vw, -20px);

  width: clamp(220px, 32vw, 520px);
  height: clamp(220px, 32vw, 520px);

  background-image: url('../images/content/handshake.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;

  opacity: 0.18;              /* subtle by default; JS will modulate slightly */
  pointer-events: none;
  z-index: 1;

  /* Will be driven by JS via CSS variable */
  transform: translate3d(0, var(--cta-parallax-y, 0), 0) rotate(var(--cta-rot, 0deg));
  will-change: transform, opacity;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.25));
}

/* Make sure text and buttons sit above the art */
.cta-section .container,
.cta-section .row,
.cta-section * {
  position: relative;
  z-index: 2;
}

/* Light mode CTAs (if any) can reuse the same art */
.cta-section.bg-white .cta-art,
.cta-section:not(.bg-gradient-dark):not(.text-white) .cta-art {
  opacity: 0.22;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.15));
}

/* Mobile adjustments: increase size for better visibility */
@media (max-width: 768px) {
  .cta-section .cta-art {
    right: -20px;
    bottom: -10px;
    width: clamp(280px, 65vw, 500px);
    height: clamp(280px, 65vw, 500px);
    opacity: 0.20;
  }
}

/* Respect reduced motion: freeze the art */
@media (prefers-reduced-motion: reduce) {
  .cta-section .cta-art {
    transform: none !important;
  }
}


/* ==== Mobile navbar dropdown reliability (≤ 991.98px) =================== */
@media (max-width: 991.98px) {
  /* Keep dropdowns in normal flow inside the collapsed navbar */
  .navbar-nav .dropdown-menu {
    position: static !important;
    float: none;
    display: none !important;
    margin: .5rem 0 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: .5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1050 !important;
    width: auto;
    min-width: 200px;
    transform: none !important;
  }

  .navbar-nav .dropdown-menu.show {
    display: block !important;
  }

  /* Larger tap targets for mobile */
  .navbar-nav .dropdown-item {
    padding: .75rem 1.25rem;
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    text-decoration: none;
  }

  .navbar-nav .dropdown-item:last-child {
    border-bottom: none;
  }

  .navbar-nav .dropdown-item:hover,
  .navbar-nav .dropdown-item:focus {
    background-color: rgba(0, 123, 255, 0.15);
    color: #0056b3;
    text-decoration: none;
    transform: translateX(2px);
  }

  /* Make dropdown toggles more prominent on mobile */
  .navbar-nav .dropdown-toggle {
    position: relative;
    padding: .75rem 0;
  }

  .navbar-nav .dropdown-toggle::after {
    transition: transform 0.2s ease;
  }

  .navbar-nav .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
  }
}

/* =======================================================================
   TOAST STYLING - Light and Dark Mode Support
   ======================================================================= */

/* Light mode toast styling (default) */
.toast {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.375rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  color: #212529;
}

.toast-header {
  background-color: rgba(248, 249, 250, 0.85);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  color: #6c757d;
}

.toast-body {
  background-color: #ffffff;
  color: #212529;
}

/* Dark mode toast styling */
@media (prefers-color-scheme: dark) {
  .toast {
    background-color: #343a40 !important;
    border: 1px solid #495057 !important;
    color: #f8f9fa !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4) !important;
  }

  .toast-header {
    background-color: #495057 !important;
    border-bottom: 1px solid #6c757d !important;
    color: #e9ecef !important;
  }

  .toast-body {
    background-color: #343a40 !important;
    color: #f8f9fa !important;
  }

  /* Dark mode button styling */
  .toast .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%) !important;
  }

  /* Status indicator colors for dark mode */
  .toast-header .rounded[style*="--bs-success"] {
    background-color: #198754 !important;
  }

  .toast-header .rounded[style*="--bs-danger"] {
    background-color: #dc3545 !important;
  }

  .toast-header .rounded[style*="--bs-warning"] {
    background-color: #fd7e14 !important;
  }

  .toast-header .rounded[style*="--bs-info"] {
    background-color: #0dcaf0 !important;
  }
}

/* Enhanced visibility for both modes */
.toast-container {
  z-index: 9999 !important;
  position: fixed !important;
  top: 1rem !important;
  right: 1rem !important;
  pointer-events: none;
}

.toast {
  min-width: 300px !important;
  max-width: 400px !important;
  pointer-events: auto;
  position: relative !important;
  margin-bottom: 0.75rem !important;
  /* Prevent any movement or flickering */
  transform: none !important;
  transition: opacity 0.15s linear !important;
}

/* Remove conflicting animations that cause flickering */
.toast.show {
  opacity: 1 !important;
}

.toast.hide {
  opacity: 0 !important;
}

/* Ensure stable positioning */
.toast-container .toast {
  position: relative !important;
  display: block !important;
}

/* =======================================================================
   CRITICAL HIGH CONTRAST FIXES - FORCE VISIBILITY
   ======================================================================= */

/* Enhanced table theming */
.table {
    background-color: var(--bs-body-bg);
    border-collapse: separate;
    border-spacing: 0;
}

.table td,
.table th {
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
    border-color: var(--bs-border-color) !important;
    vertical-align: middle;
}

.table thead th {
    background-color: var(--bs-secondary-bg) !important;
    color: var(--bs-emphasis-color) !important;
    border-bottom: 2px solid var(--bs-border-color) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.025em;
}

/* Table hover effects */
.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
    background-color: var(--bs-tertiary-bg) !important;
    color: var(--bs-emphasis-color) !important;
}

/* Striped tables */
.table-striped tbody tr:nth-of-type(odd) td {
    background-color: var(--bs-secondary-bg) !important;
}

/* Dark mode specific fixes */
[data-bs-theme="dark"] .table {
    --bs-table-bg: var(--bs-dark);
    --bs-table-color: var(--bs-light);
}

[data-bs-theme="dark"] .table td,
[data-bs-theme="dark"] .table th {
    color: var(--bs-light) !important;
    background-color: var(--bs-dark) !important;
    border-color: var(--bs-gray-600) !important;
}

[data-bs-theme="dark"] .table thead th {
    background-color: var(--bs-gray-800) !important;
    color: var(--bs-light) !important;
    border-bottom: 2px solid var(--bs-gray-600) !important;
}

[data-bs-theme="dark"] .table-hover tbody tr:hover td,
[data-bs-theme="dark"] .table-hover tbody tr:hover th {
    background-color: var(--bs-gray-700) !important;
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .table-striped tbody tr:nth-of-type(odd) td {
    background-color: var(--bs-gray-800) !important;
}

/* Modal and dialog theming */
.modal-content {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}

.modal-header {
    background-color: var(--bs-secondary-bg) !important;
    border-bottom: 1px solid var(--bs-border-color) !important;
    color: var(--bs-emphasis-color) !important;
}

.modal-footer {
    background-color: var(--bs-secondary-bg) !important;
    border-top: 1px solid var(--bs-border-color) !important;
}

.modal-title {
    color: var(--bs-emphasis-color) !important;
    font-weight: 600;
}

.modal-body {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .modal-content {
    background-color: var(--bs-gray-800) !important;
    border-color: var(--bs-gray-600) !important;
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .modal-header {
    background-color: var(--bs-gray-900) !important;
    border-bottom-color: var(--bs-gray-600) !important;
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .modal-footer {
    background-color: var(--bs-gray-900) !important;
    border-top-color: var(--bs-gray-600) !important;
}

[data-bs-theme="dark"] .modal-title {
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .modal-body {
    color: var(--bs-light) !important;
}

/* Card theming */
.card {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
    color: var(--bs-body-color) !important;
}

.card-header {
    background-color: var(--bs-secondary-bg) !important;
    border-bottom: 1px solid var(--bs-border-color) !important;
    color: var(--bs-emphasis-color) !important;
}

.card-body {
    color: var(--bs-body-color) !important;
}

.card-title {
    color: var(--bs-emphasis-color) !important;
    font-weight: 600;
}

.card-text {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .card {
    background-color: var(--bs-gray-800) !important;
    border-color: var(--bs-gray-600) !important;
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .card-header {
    background-color: var(--bs-gray-900) !important;
    border-bottom-color: var(--bs-gray-600) !important;
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .card-body {
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .card-title {
    color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .card-text {
    color: var(--bs-light) !important;
}

/* Removed custom progress bar theming to use Bootstrap defaults */

@keyframes progress-bar-stripes {
    0% { background-position-x: 1rem; }
}

/* Fix opacity issues in specific containers */
.recent-deals-container .list-group-item {
    opacity: 1 !important;
}

/* Force badge visibility */
.badge {
    font-weight: 700 !important;
    border: 2px solid !important;
}

.badge.bg-secondary {
    color: #ffffff !important;
    background-color: #6c757d !important;
    border-color: #495057 !important;
}

.badge.bg-warning {
    color: #000000 !important;
    background-color: #ffc107 !important;
    border-color: #d39e00 !important;
}

.badge.bg-danger {
    color: #ffffff !important;
    background-color: #dc3545 !important;
    border-color: #b02a37 !important;
}

/* Fix muted text contrast */
.text-muted {
    color: #6c757d;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd;
}

/* == Modern UI helpers (cards, buttons, badges, tables) ==================== */
:root{
  --radius-2xl: 14px;
  --elev-1: 0 6px 18px rgba(0,0,0,.08);
  --elev-2: 0 12px 28px rgba(0,0,0,.12);
  --ring: 0 0 0 3px rgba(102, 153, 255, .25);
}

.card-modern{
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radius-2xl);
  box-shadow: var(--elev-1);
  overflow: clip;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  background: #fff;
}
[data-bs-theme="dark"] .card-modern{ background:#111; border-color: rgba(255,255,255,.07); }
.card-modern:hover{ transform: translateY(-2px); box-shadow: var(--elev-2); }

.btn-modern{
  border-radius: 12px;
  font-weight: 600;
  padding: .55rem .9rem;
  letter-spacing: .01em;
}
.btn-modern:focus{ box-shadow: var(--ring); }

.badge-soft{ border-radius: 999px; padding:.45rem .7rem; font-weight:600; }
/* Stage badges - matching pipeline.html colors */
.badge-find{ background-color: #17a2b8; color: white; }
.badge-filter{ background-color: #ffc107; color: #212529; }
.badge-fit{ background-color: #007bff; color: white; }
.badge-finance{ background-color: #28a745; color: white; }
.badge-finalize{ background-color: #6c757d; color: white; }
.badge-closed{ background-color: #28a745; color: white; }
.badge-dead{ background-color: #dc3545; color: white; }
/* Legacy aliases for compatibility */
.badge-review{ background-color: #ffc107; color: #212529; }
.badge-offer{ background-color: #28a745; color: white; }

.table-modern thead th{
  position: sticky; top: 0; z-index: 1;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
}
[data-bs-theme="dark"] .table-modern thead th{ background: rgba(17,17,17,.92); }
.table-modern tbody tr{ transition: background .12s ease; }
.table-modern tbody tr:hover{ background: rgba(59,130,246,.06); }

.form-control, .form-select{ border-radius: 12px; }
.form-control:focus, .form-select:focus{ box-shadow: var(--ring); border-color:#6699ff; }

/* Removed custom progress styling to use Bootstrap defaults */

.container-narrow { max-width: 1080px; }
.shadow-soft{ box-shadow: var(--elev-1); }

/* == Stage Color Dots ==================================================== */
.stage-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  display: inline-block;
  margin-right: .35rem;
}

.dot-find { background-color: var(--bs-secondary, #6c757d); }
.dot-filter { background-color: var(--bs-info, #0dcaf0); }
.dot-fit { background-color: var(--bs-warning, #ffc107); }
.dot-finance { background-color: var(--bs-primary, #0d6efd); }
.dot-finalize { background-color: var(--bs-success, #198754); }
.dot-closed { background-color: var(--bs-success, #198754); }

/* =======================================================================
   END
   ======================================================================= */
