/* =========================================================
   Unik premium theme layer — Poppins, spacing, dark mode,
   backgrounds, Lenis-friendly motion (brand #074f78)
   ========================================================= */

/* Poppins loaded in master layout — avoid duplicate @import */
:root {
  --unik-primary: #074f78;
  --unik-primary-rgb: 7, 79, 120;
  --unik-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --unik-space-1: 0.5rem;
  --unik-space-2: 1rem;
  --unik-space-3: 1.5rem;
  --unik-space-4: 2rem;
  --unik-space-5: 3rem;
  --unik-space-6: 4.5rem;
  --unik-space-7: 6rem;
  --unik-radius: 1.25rem;
  --unik-bg-light: #f5f8fb;
  --unik-bg-light-2: #eef3f7;
  --unik-bg-dark: #12171c;
  --unik-bg-dark-2: #1a222b;
  --unik-card-dark: #1e272f;
  --unik-text-dark: #e8eef3;
  --unik-muted-dark: #a9b4bf;
}

/* ---------- Poppins sitewide ---------- */
html, body,
body,
button, input, select, textarea,
.navbar, .nav-link, .btn, .card, .dropdown-menu,
h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
.lead, p, a, span, li, label, small {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif !important;
}

body {
  letter-spacing: 0.01em;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5 {
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* ---------- Consistent section rhythm ---------- */
.unik-section,
section.unik-section,
.service-page > section,
main > section:not(.position-relative.z-index-2) {
  padding-top: clamp(2.75rem, 5vw, 5rem);
  padding-bottom: clamp(2.75rem, 5vw, 5rem);
}

.service-page .mb-7 { margin-bottom: clamp(2rem, 4vw, 3.5rem) !important; }
.service-page .py-lg-7,
.service-page .py-lg-8 {
  padding-top: clamp(2.75rem, 5vw, 5rem) !important;
  padding-bottom: clamp(2.75rem, 5vw, 5rem) !important;
}

.container {
  width: 100%;
}

.unik-badge {
  display: inline-block;
  padding: .35rem .85rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: 999px;
  background: rgba(var(--unik-primary-rgb), .12);
  color: var(--unik-primary);
}

/* ---------- Theme backgrounds ---------- */
html[data-bs-theme="dark"] body {
  background: #12171c !important;
  background-image: none !important;
}

html[data-bs-theme="light"] body {
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(7, 79, 120, 0.06), transparent 60%),
    #ffffff !important;
  background-attachment: fixed;
  color: #1a222b;
}

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
}

html[data-bs-theme="dark"] {
  color-scheme: dark;
}

body,
.card,
.navbar,
.dropdown-menu,
.form-control,
.btn {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

html[data-bs-theme="light"] header.header-sticky > .navbar {
  background: #ffffff !important;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 18px rgba(7, 79, 120, 0.06);
  border-bottom: 1px solid rgba(7, 79, 120, 0.08);
}

html[data-bs-theme="dark"] header.header-sticky > .navbar {
  background: #12171c !important;
  backdrop-filter: none;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Unified sticky header shell */
.unik-header-shell {
  position: sticky;
  top: 0;
  z-index: 1045;
  width: 100%;
}

.unik-header-shell header.header-sticky {
  position: relative !important;
  top: auto !important;
  background: transparent !important;
}

/* Top bar — always brand blue in every theme */
.unik-topbar.navbar,
html[data-bs-theme="light"] .unik-topbar.navbar,
html[data-bs-theme="dark"] .unik-topbar.navbar {
  background: linear-gradient(90deg, #074f78, #0a628f) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 40px;
  box-shadow: none !important;
}

.unik-topbar .text-white,
.unik-topbar a.text-white {
  color: rgba(255, 255, 255, 0.95) !important;
}

.unik-topbar a.text-white:hover {
  color: #ffffff !important;
}

.unik-topbar .btn-icon {
  opacity: 0.92;
}

.unik-topbar .btn-icon:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12) !important;
}

html[data-bs-theme="light"] .unik-content-card,
html[data-bs-theme="light"] .category-card:not(.bg-primary),
html[data-bs-theme="light"] .unik-service-card {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(7, 79, 120, 0.06);
}

html[data-bs-theme="light"] .category-card.bg-primary {
  background: linear-gradient(135deg, #074f78, #0a628f) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 28px rgba(7, 79, 120, 0.22);
}

html[data-bs-theme="light"] .category-card.bg-primary h3,
html[data-bs-theme="light"] .category-card.bg-primary .h6,
html[data-bs-theme="light"] .category-card.bg-primary p {
  color: #ffffff !important;
}

html[data-bs-theme="dark"] #bd-theme {
  color: #9fd0ef !important;
}

html[data-bs-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #074f78, #0a628f) !important;
  border: none !important;
  box-shadow: 0 10px 24px rgba(7, 79, 120, 0.18);
}

html[data-bs-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #0a628f, #074f78) !important;
  border: none !important;
}

html[data-bs-theme="dark"] .bg-mode,
html[data-bs-theme="dark"] .card.bg-mode,
html[data-bs-theme="dark"] .unik-service-card,
html[data-bs-theme="dark"] .service-page .hover-card {
  background-color: var(--unik-card-dark) !important;
  color: var(--unik-text-dark);
  border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-body-secondary,
html[data-bs-theme="dark"] .text-secondary,
html[data-bs-theme="dark"] .small.text-muted,
html[data-bs-theme="dark"] .card-text,
html[data-bs-theme="dark"] .unik-service-card p,
html[data-bs-theme="dark"] .unik-service-list li,
html[data-bs-theme="dark"] .lead.text-muted {
  color: var(--unik-muted-dark) !important;
}

html[data-bs-theme="dark"] h1,
html[data-bs-theme="dark"] h2,
html[data-bs-theme="dark"] h3,
html[data-bs-theme="dark"] h4,
html[data-bs-theme="dark"] h5,
html[data-bs-theme="dark"] h6,
html[data-bs-theme="dark"] .card-title,
html[data-bs-theme="dark"] .unik-service-card h5 {
  color: #f3f7fa !important;
}

html[data-bs-theme="dark"] .bg-light,
html[data-bs-theme="dark"] .service-features-band,
html[data-bs-theme="dark"] .card-header.bg-light {
  background-color: var(--unik-bg-dark) !important;
  color: var(--unik-text-dark);
}

html[data-bs-theme="light"] .service-features-band {
  background:
    linear-gradient(180deg, rgba(7, 79, 120, 0.04), rgba(7, 79, 120, 0.02)),
    var(--unik-bg-light-2) !important;
}

/* ---------- Deep dark-mode hover fixes (no white-wash) ---------- */
html[data-bs-theme="dark"] .card:hover,
html[data-bs-theme="dark"] .unik-service-card:hover,
html[data-bs-theme="dark"] .unik-hover-lift:hover,
html[data-bs-theme="dark"] .hover-card:hover,
html[data-bs-theme="dark"] .category-card:hover,
html[data-bs-theme="dark"] .unik-advantage-card:hover {
  background-color: #25313b !important;
  color: #f3f7fa !important;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.45) !important;
}

html[data-bs-theme="dark"] .card:hover h1,
html[data-bs-theme="dark"] .card:hover h2,
html[data-bs-theme="dark"] .card:hover h3,
html[data-bs-theme="dark"] .card:hover h4,
html[data-bs-theme="dark"] .card:hover h5,
html[data-bs-theme="dark"] .card:hover h6,
html[data-bs-theme="dark"] .card:hover p,
html[data-bs-theme="dark"] .card:hover span,
html[data-bs-theme="dark"] .card:hover li,
html[data-bs-theme="dark"] .unik-service-card:hover h5,
html[data-bs-theme="dark"] .unik-service-card:hover p,
html[data-bs-theme="dark"] .unik-service-card:hover li {
  color: #f3f7fa !important;
}

html[data-bs-theme="dark"] .btn-light {
  background-color: #e8eef3 !important;
  border-color: #e8eef3 !important;
  color: #0e1318 !important;
}

html[data-bs-theme="dark"] .btn-light:hover {
  background-color: #ffffff !important;
  color: #0e1318 !important;
}

html[data-bs-theme="dark"] .btn-outline-primary {
  color: #8ec5e8 !important;
  border-color: rgba(142, 197, 232, 0.55) !important;
}

html[data-bs-theme="dark"] .btn-outline-primary:hover {
  background-color: rgba(7, 79, 120, 0.35) !important;
  color: #ffffff !important;
}

html[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--unik-card-dark);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .dropdown-item {
  color: var(--unik-text-dark);
}

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
  background-color: rgba(7, 79, 120, 0.35);
  color: #fff;
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-control.bg-light {
  background-color: #1a222b !important;
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--unik-text-dark) !important;
}

html[data-bs-theme="dark"] .navbar .nav-link {
  color: rgba(232, 238, 243, 0.88) !important;
}

html[data-bs-theme="dark"] .navbar .nav-link:hover,
html[data-bs-theme="dark"] .navbar .nav-link.active {
  color: #ffffff !important;
}

/* ---------- Lucide icons ---------- */
[data-lucide],
i[data-lucide],
svg.lucide {
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
  stroke: currentColor;
}

.icon-lg svg.lucide,
.icon-xl svg.lucide,
.unik-service-icon svg.lucide,
.service-cta-icon svg.lucide {
  width: 1.35rem;
  height: 1.35rem;
}

.icon-xl svg.lucide { width: 1.6rem; height: 1.6rem; }

.unik-service-icon,
.service-cta-icon,
.icon-lg,
.icon-xl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.unik-service-icon {
  width: 60px;
  height: 60px;
  border-radius: .85rem;
  background: rgba(var(--unik-primary-rgb), .12);
  color: var(--unik-primary);
}

html[data-bs-theme="dark"] .unik-service-icon {
  background: rgba(7, 79, 120, 0.35);
  color: #9fd0ef;
}

/* ---------- Service CTA (distinct from map contact bar) ---------- */
.service-cta-panel {
  border-radius: var(--unik-radius);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border: 1px solid rgba(var(--unik-primary-rgb), 0.18);
  background:
    linear-gradient(135deg, rgba(7, 79, 120, 0.08), rgba(7, 79, 120, 0.02) 45%, transparent),
    var(--bs-body-bg);
  box-shadow: 0 1rem 2.5rem rgba(7, 79, 120, 0.08);
}

html[data-bs-theme="dark"] .service-cta-panel {
  background:
    linear-gradient(135deg, rgba(7, 79, 120, 0.28), rgba(30, 39, 47, 0.95)),
    var(--unik-card-dark);
  border-color: rgba(142, 197, 232, 0.18);
  box-shadow: 0 1.25rem 2.75rem rgba(0, 0, 0, 0.35);
}

.service-cta-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  background: rgba(var(--unik-primary-rgb), 0.12);
  color: var(--unik-primary);
}

html[data-bs-theme="dark"] .service-cta-icon {
  background: rgba(7, 79, 120, 0.45);
  color: #b6def5;
}

.service-cta-section {
  /* keep breathing room above global map CTA */
  padding-bottom: clamp(2rem, 4vw, 3.25rem) !important;
}

/* ---------- Motion (Lenis-friendly, no jerks) ---------- */
html {
  scroll-behavior: auto; /* Lenis owns smooth scrolling */
}

@media (prefers-reduced-motion: no-preference) {
  .unik-reveal {
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    transition: opacity .6s var(--unik-ease), transform .6s var(--unik-ease);
  }

  .unik-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }

  .unik-reveal-delay-1 { transition-delay: .05s; }
  .unik-reveal-delay-2 { transition-delay: .1s; }
  .unik-reveal-delay-3 { transition-delay: .15s; }
  .unik-reveal-delay-4 { transition-delay: .2s; }

  .unik-hover-lift {
    transition: transform .28s var(--unik-ease), box-shadow .28s var(--unik-ease), background-color .28s ease, color .28s ease;
    will-change: transform;
  }

  .unik-hover-lift:hover {
    transform: translate3d(0, -4px, 0);
  }

  html[data-bs-theme="light"] .unik-hover-lift:hover {
    box-shadow: 0 1rem 2rem rgba(7, 79, 120, 0.12);
  }

  .btn {
    transition: transform .2s var(--unik-ease), box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
  }

  .btn:hover {
    transform: translate3d(0, -1px, 0);
  }

  .navbar .nav-link,
  .footer-links a {
    transition: color .2s ease, opacity .2s ease, padding .2s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .unik-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  html, body {
    scroll-behavior: auto !important;
  }
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

img, video, svg { max-width: 100%; height: auto; }

@media (max-width: 575.98px) {
  .display-4, .display-5 {
    font-size: clamp(1.65rem, 7.5vw, 2.15rem) !important;
    line-height: 1.2;
  }

  .btn-lg {
    padding: .7rem 1.1rem;
    font-size: 1rem;
  }

  .service-cta-panel .btn-lg {
    width: 100%;
  }
}

@media (max-width: 991.98px) {
  .navbar-collapse {
    max-height: min(80vh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.service-page a:focus-visible,
.navbar a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--unik-primary);
  outline-offset: 3px;
}

/* Kill legacy sticky jitter — shell handles sticky in-flow */
.unik-header-shell header.header-sticky,
.unik-header-shell header.header-sticky.header-sticky-on {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  width: 100% !important;
  animation: none !important;
  transform: none !important;
  border-bottom: 1px solid rgba(7, 79, 120, 0.08);
}

html[data-bs-theme="dark"] .unik-header-shell header.header-sticky,
html[data-bs-theme="dark"] .unik-header-shell header.header-sticky.header-sticky-on {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* Homepage hero — flush under sticky header */
main > section.unik-home-hero,
section.unik-home-hero {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
}

section.unik-home-hero .card {
  border-radius: 0 !important;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
