/* ----------------------------------------------------------------
	Custom CSS — laborDoc / FM Clinical Systems
-----------------------------------------------------------------*/

/* Brand color overrides aligned with the design guideline palette */
:root {
  --bs-primary: #1362aa;
  --bs-primary-rgb: 19, 98, 170;
  --fm-primary: #1362aa;
  --fm-accent: #44b5b7;
  --fm-soft: #84c6ca;
  --fm-bg: #ecf3fc;
  --fm-surface: #f7fbff;
  --fm-border: #c9dce7;
  --fm-text: #1e292c;
  --fm-text-muted: #5f6b6d;
}

body {
  background: #f7fbff;
  color: var(--fm-text-muted);
}

a {
  color: var(--fm-primary);
}

a:hover,
a:active {
  color: #0f528f;
}

h1, h2, h3, h4, h5, h6,
.text-dark {
  color: var(--fm-text) !important;
}

.text-primary { color: var(--fm-primary) !important; }
.bg-primary { background-color: var(--fm-primary) !important; }
.border-primary { border-color: var(--fm-primary) !important; }
.btn-primary {
  background-color: var(--fm-primary);
  border-color: var(--fm-primary);
}
.btn-primary:hover,
.btn-primary:focus {
  background-color: #0f528f;
  border-color: #0f528f;
}
.btn-outline-primary {
  color: var(--fm-primary);
  border-color: var(--fm-primary);
}
.btn-outline-primary:hover {
  background-color: var(--fm-primary);
  border-color: var(--fm-primary);
}

.btn-outline-light {
  color: var(--fm-primary);
  border-color: var(--fm-primary);
  background-color: rgba(255, 255, 255, 0.72);
}

.btn-outline-light:hover,
.btn-outline-light:focus {
  color: #fff;
  background-color: var(--fm-primary);
  border-color: var(--fm-primary);
}

/* Nav link active indicator */
.navbar-nav .nav-link.active,
.navbar-nav .nav-link:focus {
  color: var(--fm-accent) !important;
}

.navbar-nav .nav-link:hover {
  color: var(--fm-primary) !important;
}

/* Heading separator line color */
.heading-separator-line {
  border-color: var(--fm-primary) !important;
  width: 60px;
}

.section-backdrop-title {
  color: rgba(30, 41, 44, 0.055) !important;
  opacity: 1 !important;
  letter-spacing: 0.05em;
}

/* Featured box icon primary color */
.featured-box-icon.text-primary { color: var(--fm-primary) !important; }

.text-muted,
.text-white-50 {
  color: var(--fm-text-muted) !important;
}

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

.shadow-sm {
  box-shadow: 0 10px 28px rgba(19, 98, 170, 0.08) !important;
}

.light-shell {
  background: linear-gradient(180deg, rgba(236, 243, 252, 0.98) 0%, rgba(228, 239, 250, 0.96) 100%) !important;
  border-right: 1px solid rgba(19, 98, 170, 0.14);
  box-shadow: 0 0 28px rgba(19, 98, 170, 0.12);
}

.light-shell .nav-link {
  color: var(--fm-text) !important;
  border-radius: 999px;
  padding-inline: 0.85rem !important;
}

.light-shell .nav-link.active {
  background-color: rgba(19, 98, 170, 0.08);
}

.light-shell .navbar-nav .nav-item + .nav-item {
  margin-top: 0.2rem;
}

.light-shell .navbar-toggler span {
  background: var(--fm-primary) !important;
}

.fm-logo-link {
  width: 100%;
}

.fm-logo-wrap {
  padding-top: 0.9rem;
  padding-bottom: 0.65rem;
}

.fm-logo-card {
  display: inline-block;
  padding: 0.8rem 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(19, 98, 170, 0.12);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(19, 98, 170, 0.14);
}

.fm-logo-image {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
}

@media (max-width: 991.98px) {
  .fm-logo-wrap {
    padding-top: 1.1rem;
    padding-bottom: 0.35rem;
  }

  .fm-logo-card {
    padding: 0.9rem 1.05rem;
    border-color: rgba(19, 98, 170, 0.14);
    box-shadow: 0 12px 30px rgba(19, 98, 170, 0.16);
  }

  .fm-logo-image {
    width: 165px;
  }

  .side-header #header-nav {
    margin-top: 0.35rem;
  }
}

.hero-wrap {
  background: linear-gradient(180deg, rgba(236, 243, 252, 0.7) 0%, rgba(247, 251, 255, 0.88) 100%);
}

.hero-wrap .hero-mask {
  background: linear-gradient(135deg, rgba(221, 234, 247, 0.95) 0%, rgba(233, 243, 251, 0.92) 52%, rgba(83, 168, 196, 0.42) 100%) !important;
  opacity: 1 !important;
}

.hero-wrap .hero-content p,
.hero-wrap .scroll-down-arrow,
.hero-wrap .text-white,
.hero-wrap .text-white-50 {
  color: var(--fm-text) !important;
}

.hero-wrap .hero-content .eyebrow,
.hero-wrap .hero-content .hero-accent {
  color: var(--fm-primary) !important;
}

.hero-wrap .hero-content .hero-kicker {
  color: var(--fm-text-muted) !important;
}

.hero-wrap .hero-content .hero-lead {
  color: var(--fm-text) !important;
  opacity: 0.96 !important;
}

.surface-section {
  background: linear-gradient(180deg, #f7fbff 0%, #ecf3fc 100%);
}

.evidence-section {
  background: linear-gradient(180deg, #ecf3fc 0%, #f7fbff 100%) !important;
}

.evidence-section .stats-note,
.evidence-section .discipline-intro {
  color: var(--fm-text-muted) !important;
}

.evidence-section .separator-border > .row > *:after,
.evidence-section .separator-border > .row > *:before {
  background: rgba(19, 98, 170, 0.1) !important;
}

.stat-value {
  color: var(--fm-accent) !important;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -0.03em;
}

.stat-value .counter,
.stat-suffix {
  color: inherit !important;
  font: inherit;
}

.evidence-section .discipline-card {
  background: rgba(68, 181, 183, 0.1) !important;
  border: 1px solid rgba(68, 181, 183, 0.18);
}

.evidence-section .discipline-card p {
  color: var(--fm-text) !important;
}

.footer-light {
  background-color: #f3f8fd !important;
  border-top: 1px solid var(--fm-border);
}

.footer-light,
.footer-light .text-white-50,
.footer-light .nav-link {
  color: var(--fm-text-muted) !important;
}

.footer-light .nav-link:hover {
  color: var(--fm-primary) !important;
}

.contact-sidebar {
  gap: 1rem;
}

.contact-company {
  line-height: 1.15;
}

.contact-address,
.contact-email {
  line-height: 1.5;
}

.contact-note {
  background-color: #f5fbfb !important;
  border-color: rgba(68, 181, 183, 0.28) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.form-control {
  border-color: var(--fm-border);
}

.copy-justify {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.form-control:focus {
  border-color: rgba(19, 98, 170, 0.45);
  box-shadow: 0 0 0 0.25rem rgba(19, 98, 170, 0.12);
}

.legal-page {
  background: linear-gradient(180deg, #f7fbff 0%, #ecf3fc 100%);
  min-height: 100vh;
}

.legal-shell {
  min-height: 100vh;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
  font-weight: 500;
  text-decoration: none;
}

.legal-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--fm-border);
  border-radius: 24px;
  overflow: hidden;
}

.legal-hero {
  padding: 2rem 2rem 1.5rem;
  background: linear-gradient(135deg, rgba(19, 98, 170, 0.09) 0%, rgba(68, 181, 183, 0.12) 100%);
  border-bottom: 1px solid rgba(19, 98, 170, 0.1);
}

.legal-kicker,
.legal-meta {
  color: var(--fm-text-muted);
}

.legal-section {
  padding: 1.5rem 2rem;
}

.legal-section + .legal-section {
  border-top: 1px solid rgba(19, 98, 170, 0.08);
}

.legal-section h2 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

/* Mobile: ensure hero text is readable at all sizes */
@media (max-width: 575.98px) {
  .hero-content .btn {
    width: 100%;
    max-width: 280px;
  }

  .legal-hero,
  .legal-section {
    padding-inline: 1.25rem;
  }
}

/* Workflow step numbers */
.step-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
}

/* Counter numbers accent */
.counter { color: var(--fm-accent); }

/* Smooth transition on featured boxes */
.featured-box.style-3 {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.featured-box.style-3:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(19, 98, 170, 0.12);
}
