:root {
  --primary: #0d6efd;
  --primary-dark: #0b5ed7;
  --accent: #20c997;
  --bg-soft: #f8f9fb;
  --text-main: #212529;
  --text-muted: #6c757d;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
}

/* -------------------------------------- */
/* DARK MODE ENHANCEMENTS                 */
/* -------------------------------------- */
body.theme-dark {
  background-color: #111827;
  color: #e5e7eb;
}

/* Backgrounds */
body.theme-dark .bg-white,
body.theme-dark .bg-light,
body.theme-dark .bg-soft,
body.theme-dark .navbar,
body.theme-dark .offcanvas,
body.theme-dark .card,
body.theme-dark .accordion-item,
body.theme-dark .footer {
  background-color: #020617 !important;
}

/* Borders */
body.theme-dark .border-bottom,
body.theme-dark .navbar,
body.theme-dark .card,
body.theme-dark .accordion-item,
body.theme-dark .footer,
body.theme-dark .offcanvas {
  border-color: #1f2937 !important;
}

/* Headings & Brand Text */
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, 
body.theme-dark h4, body.theme-dark h5, body.theme-dark h6,
body.theme-dark .h1, body.theme-dark .h2, body.theme-dark .h3,
body.theme-dark .h4, body.theme-dark .h5, body.theme-dark .h6,
body.theme-dark .navbar-brand strong,
body.theme-dark .offcanvas-title {
  color: #f9fafb !important;
}

/* Paragraphs and Text muted */
body.theme-dark .text-muted,
body.theme-dark p {
  color: #9ca3af !important;
}

/* Navbar Links (Overriding Bootstrap's .navbar-light) */
body.theme-dark .navbar-light .navbar-brand .text-muted {
  color: #9ca3af !important;
}
body.theme-dark .navbar-light .nav-link {
  color: #e5e7eb !important;
}
body.theme-dark .navbar-light .nav-link:hover,
body.theme-dark .navbar-light .nav-link:focus {
  color: #60a5fa !important;
}
body.theme-dark .navbar-light .nav-link.active {
  color: #60a5fa !important;
}

/* Hamburger Menu & Close Icons */
body.theme-dark .navbar-toggler-icon,
body.theme-dark .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
body.theme-dark .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Icon & Button Contrast Fixes */
body.theme-dark .text-primary {
  color: #60a5fa !important; /* Lighter blue for visibility */
}
body.theme-dark .text-success {
  color: #34d399 !important; /* Lighter green for visibility */
}
body.theme-dark .feature-icon,
body.theme-dark .badge-soft {
  background-color: rgba(59, 130, 246, 0.20);
  color: #bfdbfe;
}
body.theme-dark .btn-outline-secondary {
  color: #e5e7eb;
  border-color: #4b5563;
}
body.theme-dark .btn-outline-secondary:hover {
  background-color: #374151;
  border-color: #6b7280;
}

/* Form Input Dark Mode Fixes */
body.theme-dark .form-control,
body.theme-dark .form-select {
  background-color: #1f2937;
  border-color: #374151;
  color: #f9fafb;
}
body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  background-color: #1f2937;
  color: #f9fafb;
  border-color: #60a5fa;
  box-shadow: 0 0 0 0.25rem rgba(96, 165, 250, 0.25);
}
body.theme-dark .form-control::placeholder {
  color: #9ca3af;
}

/* Accordion Dark Mode Fixes */
body.theme-dark .accordion-button {
  background-color: #020617;
  color: #f9fafb !important;
}
body.theme-dark .accordion-button:not(.collapsed) {
  background-color: #111827;
  color: #60a5fa !important;
  box-shadow: inset 0 -1px 0 #1f2937;
}
body.theme-dark .accordion-button::after {
  filter: invert(1) grayscale(100%) brightness(200%);
}
body.theme-dark .accordion-body {
  color: #9ca3af !important;
}

/* Cards & Pills */
body.theme-dark .stat-pill {
  background: rgba(30, 41, 59, 0.8);
}
body.theme-dark .floating-card {
  background-color: #111827 !important;
  border: 1px solid #1f2937;
}

/* Clever Map Fix: Invert Map Colors in Dark Mode */
body.theme-dark iframe[src*="openstreetmap"] {
  filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(85%);
}

/* -------------------------------------- */
/* BASE STYLING                           */
/* -------------------------------------- */
.bg-soft {
  background-color: var(--bg-soft);
}
.navbar-brand span {
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 0.75rem;
  background: radial-gradient(circle at 20% 20%, var(--accent), var(--primary));
  box-shadow: 0 8px 20px rgba(13, 110, 253, 0.35);
}
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 5rem;
  padding-bottom: 5rem;
  overflow: hidden;
}
.hero-badge {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(13, 110, 253, 0.2);
  background-color: rgba(248, 249, 252, 0.8);
  backdrop-filter: blur(10px);
}
.hero-title {
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero-subtitle {
  max-width: 36rem;
}
.hero-img-wrapper {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}
.hero-img-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,110,253,0.15), rgba(32,201,151,0.15));
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.floating-card {
  position: absolute;
  right: 6%;
  bottom: 10%;
  background-color: #ffffff;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
  max-width: 220px;
}
.stat-value {
  font-size: 2rem;
  font-weight: 600;
}
.section-title {
  font-weight: 700;
  letter-spacing: -0.03em;
}
.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
}
.service-card {
  transition: all 180ms ease-out;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  border-color: rgba(13, 110, 253, 0.5);
}
.gallery-img {
  border-radius: 1rem;
  object-fit: cover;
  height: 220px;
}
.testimonial-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
}
.badge-soft {
  border-radius: 999px;
  background-color: rgba(13, 110, 253, 0.08);
  color: var(--primary-dark);
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
}
.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(13, 110, 253, 0.08);
  color: var(--primary-dark);
  font-size: 1.2rem;
}
.faq-question {
  font-weight: 500;
}
.contact-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}
.footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}
.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 320ms ease-out, transform 320ms ease-out;
}
.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}
.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-link.active {
  color: var(--primary) !important;
}
.theme-toggle-btn {
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.5);
}
.stat-pill {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.03);
  padding: 0.75rem 1.25rem;
  font-size: 0.9rem;
}
/* Theme Toggle Button Dark Mode Fix */
body.theme-dark .theme-toggle-btn {
  color: #fbbf24 !important; /* Golden yellow for the sun icon */
  border-color: #4b5563;
  background-color: #1f2937; /* Slight background to separate it from the navbar */
}

body.theme-dark .theme-toggle-btn:hover {
  background-color: #374151;
  color: #fcd34d !important; /* Lighter yellow on hover */
}