/* ErganiSync brand styles */
:root {
  /* Brand Colors - Modern & Vibrant */
  --brand: #3b82f6;
  /* Bright Blue */
  --brand-dark: #1d4ed8;
  --brand-light: #eff6ff;
  --accent: #8b5cf6;
  /* Violet accent */

  /* UI Colors */
  --sidebar-bg: #0f172a;
  --sidebar-border: #1e293b;
  --content-bg: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;

  /* Gradients */
  --page-grad-top: #f8fafc;
  --page-grad-bottom: #f1f5f9;
  --grad-brand: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --grad-surface: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --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-glow: 0 0 20px rgba(59, 130, 246, 0.5);

  /* Fonts */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Outfit', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* Utilities */
/* Utilities */
.text-brand {
  color: var(--brand) !important;
}

.bg-brand {
  background-color: var(--brand) !important;
}

.bg-brand-lite {
  background: var(--brand-light);
}

.border-brand {
  border: 2px solid var(--brand) !important;
}

.text-gradient {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg) !important;
}

/* Buttons & links */
.btn-brand {
  background: var(--brand);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.btn-brand:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-outline-brand {
  color: var(--brand);
  border: 2px solid var(--brand);
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: 0.75rem;
  background: transparent;
}

.btn-outline-brand:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
  border-color: var(--brand-dark);
}

.link-brand {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

.link-brand:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Top navbar color tweak */
.navbar-dark.bg-dark {
  background-color: #141b2d !important;
}

/* Page background and layout */
.app-bg {
  background: linear-gradient(180deg, var(--page-grad-top), var(--page-grad-bottom));
  min-height: 100vh;
}

.app-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
}

.app-sidebar {
  position: sticky;
  top: 56px;
  height: calc(100vh - 56px);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
}

.app-sidebar .nav-link {
  color: #b8c1d9;
  border-radius: 10px;
  margin: 2px 0;
}

.app-sidebar .nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.app-sidebar .nav-link.active {
  color: #fff;
  background: rgba(47, 111, 236, 0.18);
}

.app-main {
  min-height: calc(100vh - 56px);
}

/* Hide sidebar for guests */
body.guest .app-layout {
  grid-template-columns: 1fr;
}

body.guest .app-sidebar {
  display: none !important;
}

/* Cards and sections */
.card.rounded-4 {
  border-radius: 1rem !important;
}

.card.shadow-sm {
  box-shadow: 0 10px 20px rgba(27, 39, 69, 0.06) !important;
}

.feature-card {
  transition: transform .15s ease, box-shadow .15s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(27, 39, 69, .12) !important;
}

/* Hero sections */
.hero-section {
  background: linear-gradient(180deg, #fff, var(--brand-light));
}

.hero-visual {
  border: 1px solid #f1f3f5;
}

.hero-art {
  /* Subtle geometric pattern without external assets */
  background: radial-gradient(circle at 20% 20%, rgba(47, 111, 236, 0.15), transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(31, 79, 179, 0.12), transparent 40%),
    linear-gradient(180deg, #ffffff, #f8fbff);
}

/* Feature tiles (big icons) */
.feature-tiles {
  width: 100%;
}

.feature-tile {
  background: #fff;
  border: 1px solid #edf2ff;
}

.feature-tile .icon-xl {
  font-size: 2.5rem;
  line-height: 1;
  color: var(--brand);
}

@media (min-width: 992px) {
  .feature-tile .icon-xl {
    font-size: 3.5rem;
  }
}

/* Mini CTA blocks */
.mini-cta {
  border: 1px solid #edf2ff;
}

/* Mobile sidebar overlay */
@media (max-width: 991.98px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    top: 72px;
    left: -270px;
    width: 260px;
    z-index: 1040;
    transition: left .25s ease;
  }

  /* Ensure sidebar becomes visible even if it has .d-none on mobile */
  body.sidebar-open .app-sidebar {
    display: flex !important;
    left: 0;
  }

  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 56px 0 0 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1039;
  }
}

/* Map container */
.map-container {
  height: 380px;
  width: 100%;
  background: #e9ecef;
  border: 1px solid #dee2e6;
}

@media (max-width: 575.98px) {
  .map-container {
    height: 300px;
  }
}

/* Ensure Leaflet controls are above content */
.leaflet-control {
  z-index: 1045;
}

/* Glossy accents */
.badge-pill {
  display: inline-block;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: rgba(47, 111, 236, .12);
  color: var(--brand);
  font-weight: 600;
}

.glow {
  box-shadow: 0 0 0 6px rgba(47, 111, 236, .06), 0 10px 30px rgba(47, 111, 236, .25) !important;
}

.shimmer {
  position: relative;
  overflow: hidden;
}

.shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(75deg, transparent 30%, rgba(255, 255, 255, .6) 45%, transparent 60%);
  transform: translateX(-120%);
  animation: shimmer 3.2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

/* KPI cards */
.kpi-card {
  background: #fff;
  border: 1px solid #edf2ff;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  text-align: center;
}

.kpi-card .kpi {
  font-weight: 800;
  font-size: 1.75rem;
  color: #0b1226;
}

.kpi-card .label {
  color: #6b7280;
  font-size: .9rem;
}

/* Screenshot carousel */
.screenshot-frame {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  height: 360px;
}

@media (max-width: 575.98px) {
  .screenshot-frame {
    height: 240px;
  }
}

.carousel-indicators [data-bs-target] {
  background-color: var(--brand);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3));
}

/* Integrations strip */
.integrations-strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.integration-badge {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  padding: .5rem .75rem;
  border-radius: .75rem;
  font-weight: 600;
}

/* Testimonials */
.testimonial {
  background: #fff;
  border: 1px solid #eef2ff;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
}

.testimonial .quote {
  color: #111827;
  font-weight: 600;
}

.testimonial .meta {
  color: #6b7280;
  font-size: .9rem;
}

/* Sticky CTA for guests */
.sticky-cta {
  position: fixed;
  z-index: 1045;
  left: 0;
  right: 0;
  bottom: 12px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.sticky-cta .bar {
  pointer-events: all;
  background: #0f1a36;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: .5rem;
  display: flex;
  gap: .5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.sticky-cta .bar .btn {
  border-radius: 999px;
}

@media (min-width: 992px) {
  .sticky-cta {
    display: none;
  }
}

/* Navbar & Footer */
.navbar {
  transition: all 0.3s ease;
}

.navbar.bg-white {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
}

.font-display {
  font-family: 'Outfit', sans-serif;
}

.tracking-tight {
  letter-spacing: -0.02em;
}

.tracking-wide {
  letter-spacing: 0.05em;
}

.hover-white:hover {
  color: #fff !important;
}

/* Mega Footer */
footer a {
  transition: color 0.2s ease;
}

footer .bi {
  transition: transform 0.2s ease;
}

footer a:hover .bi {
  transform: translateY(-2px);
}

/* Landing Page Enhancements */
.step-card {
  position: relative;
  z-index: 1;
}

.step-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
}

.connector-line {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e9ecef;
  z-index: 0;
  transform: translateX(50%);
}

@media (max-width: 991px) {
  .connector-line {
    display: none;
  }
}

/* Trusted By Strip */
.trusted-by img {
  filter: grayscale(100%) opacity(0.5);
  transition: all 0.3s ease;
}

.trusted-by img:hover {
  filter: grayscale(0%) opacity(1);
}

/* CTA gradient band */
.cta-band {
  background: linear-gradient(92deg, #2f6fec 0%, #5a8dff 60%, #7aa0ff 100%);
  color: #fff;
  border-radius: 16px;
  padding: 2rem;
}

.cta-band .lead {
  color: rgba(255, 255, 255, .9);
}

/* Trust & Security tiles */
.trust-tiles .trust-tile {
  background: #fff;
  border: 1px solid #edf2ff;
  border-radius: 1rem;
  padding: 1.25rem;
  text-align: center;
}

.trust-tiles .icon-xl {
  font-size: 2.5rem;
  color: var(--brand);
}

@media (min-width: 992px) {
  .trust-tiles .icon-xl {
    font-size: 3rem;
  }
}