/* =========================================================================
   MJN Facilitate — Modern refresh layer (2026)
   Loaded AFTER bootstrap.min.css and style.css. Keeps the existing brand
   (logo, red #871515, Nunito/Rubik) and layout; modernizes type, depth,
   motion and micro-interactions. Progressive enhancement only.
   ========================================================================= */

:root {
  --primary: #871515;
  --primary-600: #a01a1a;
  --primary-700: #6f1010;
  --primary-grad: linear-gradient(135deg, #a01a1a 0%, #871515 55%, #5f0d0d 100%);
  --ink: #1a2433;
  --muted: #5b6675;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --ring: rgba(135, 21, 21, 0.35);
  --shadow-sm: 0 2px 8px rgba(13, 29, 56, 0.06);
  --shadow-md: 0 12px 30px -12px rgba(13, 29, 56, 0.18);
  --shadow-lg: 0 26px 60px -22px rgba(13, 29, 56, 0.30);
  --radius: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Base typography & rhythm ---------------------------------------- */
html { scroll-behavior: smooth; }

body {
  color: var(--ink);
  font-family: "Rubik", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4 {
  font-family: "Nunito", system-ui, sans-serif;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.display-1 { font-size: clamp(2.6rem, 6vw + 1rem, 5rem); }
h1 { font-size: clamp(2rem, 3vw + 1rem, 3.1rem); }
h2 { font-size: clamp(1.6rem, 1.6vw + 1rem, 2.35rem); }
p  { line-height: 1.7; }
.text-muted, small { color: var(--muted) !important; }

::selection { background: var(--primary); color: #fff; }

/* ---- Accessible focus ------------------------------------------------- */
a:focus-visible, button:focus-visible,
.btn:focus-visible, .nav-link:focus-visible,
input:focus-visible, .form-control:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---- Scroll progress bar (added by modern.js) ------------------------ */
#scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0%;
  background: var(--primary-grad);
  z-index: 100000;
  transition: width 0.1s linear;
  box-shadow: 0 0 12px var(--ring);
}

/* ---- Navbar polish ---------------------------------------------------- */
.navbar { transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease); }

.sticky-top.navbar-dark {
  background: rgba(255, 255, 255, 0.82) !important;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--shadow-sm);
}

.navbar-brand img { transition: transform 0.4s var(--ease); }
.navbar-brand:hover img { transform: scale(1.04); }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.4s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}

.btn.redColor, .btn-primary {
  background-image: var(--primary-grad) !important;
  background-color: var(--primary) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 10px 24px -10px var(--ring);
}

.btn.redColor:hover, .btn-primary:hover,
.btn.redColor:focus-visible, .btn-primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px -12px var(--ring);
  color: #fff !important;
}

.btn-outline-light { border-width: 2px; }
.btn-outline-light:hover { transform: translateY(-3px); }

.btn:active { transform: translateY(-1px) scale(0.99); }

/* ---- Cards / shadow surfaces ----------------------------------------- */
.shadow, .shadow-sm {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md) !important;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.facts .shadow:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg) !important; }

.service-item, .team-item, .testimonial-item, .blog-item {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.service-item { background: var(--surface); box-shadow: var(--shadow-sm); }
.service-item:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }

.team-item:hover { transform: translateY(-6px); }

/* Rounded media everywhere for a softer, modern feel */
.rounded, .service-item img, .team-img img, .blog-img img,
.testimonial-item img { border-radius: var(--radius) !important; }

/* ---- Section titles --------------------------------------------------- */
.section-title::before { border-radius: 4px; height: 4px; }

/* ---- Carousel / hero -------------------------------------------------- */
.carousel-caption { background: linear-gradient(180deg, rgba(9, 30, 62, 0.45), rgba(9, 30, 62, 0.82)); }
.carousel-item img { animation: heroZoom 12s ease-out forwards; }
@keyframes heroZoom { from { transform: scale(1.08); } to { transform: scale(1); } }

/* ---- Vendor / testimonial carousels ---------------------------------- */
.vendor-carousel img { filter: grayscale(1); opacity: 0.65; transition: filter 0.4s var(--ease), opacity 0.4s var(--ease); }
.vendor-carousel img:hover { filter: grayscale(0); opacity: 1; }

/* ---- Footer ----------------------------------------------------------- */
.link-animated a { position: relative; }
.link-animated a::before { content: "›"; opacity: 0; margin-right: 0; transition: 0.35s var(--ease); }
.link-animated a:hover { padding-left: 14px; }
.link-animated a:hover::before { opacity: 1; }

/* ---- Image fade-in (set by modern.js) -------------------------------- */
img.mjn-img { opacity: 0; transition: opacity 0.7s var(--ease); }
img.mjn-img.is-loaded { opacity: 1; }

/* ---- Scroll reveal ---------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="left"]  { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="zoom"]  { transform: scale(0.94); }

/* ---- Back to top ------------------------------------------------------ */
.back-to-top {
  border-radius: 12px !important;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.back-to-top:hover { transform: translateY(-4px); }

/* ---- Reduced motion --------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .carousel-item img { animation: none !important; }
}

/* =========================================================================
   v2 — service pages, detail pages, copy components, robustness
   ========================================================================= */

/* ---- Spinner: never trap the page (fires if JS never clears it) ------ */
#spinner.show { animation: mjnSpinnerSafety 0.4s ease 5s forwards; }
@keyframes mjnSpinnerSafety { to { opacity: 0; visibility: hidden; } }

/* ---- Page header / breadcrumb (inner pages) -------------------------- */
.bg-header {
  background: linear-gradient(rgba(9, 30, 62, 0.78), rgba(9, 30, 62, 0.82)),
    url(../img/carousel-1.jpg) center center no-repeat;
  background-size: cover;
}
.bg-header h1 { letter-spacing: -0.02em; }
.bg-header a { text-decoration: none; opacity: 0.9; transition: 0.3s var(--ease); }
.bg-header a:hover { opacity: 1; color: #fff; }

/* ---- Service cards (the /service grid) ------------------------------- */
.mjn-service-card {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-md);
}
.mjn-service-card > [class*="bg-image"],
.mjn-service-card .mjn-service-bg {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  transition: transform 0.6s var(--ease);
}
.mjn-service-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(9,30,62,0) 25%, rgba(9,30,62,0.88) 100%);
  transition: background 0.4s var(--ease);
}
.mjn-service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.mjn-service-card:hover .mjn-service-bg,
.mjn-service-card:hover > [class*="bg-image"] { transform: scale(1.08); }
.mjn-service-card .mjn-service-body { padding: 28px; color: #fff; }
.mjn-service-card .mjn-service-icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  border-radius: 14px; background: var(--primary-grad);
  font-size: 1.4rem; margin-bottom: 14px; box-shadow: 0 8px 20px -8px var(--ring);
}
.mjn-service-card h4 { color: #fff; margin-bottom: 8px; }
.mjn-service-card p { color: rgba(255,255,255,0.82); margin-bottom: 14px; font-size: 0.95rem; }
.mjn-service-link {
  display: inline-flex; align-items: center; gap: 8px; color: #fff;
  font-weight: 700; text-decoration: none; transition: gap 0.3s var(--ease);
}
.mjn-service-link:hover { color: #fff; gap: 14px; }

/* ---- Lead paragraph -------------------------------------------------- */
.mjn-lead { font-size: 1.18rem; line-height: 1.7; color: #33414f; }

/* ---- "What's included" feature grid ---------------------------------- */
.mjn-feature-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 575.98px) { .mjn-feature-grid { grid-template-columns: 1fr; } }
.mjn-feature {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface-2); border: 1px solid #e9eef5;
  border-radius: 14px; padding: 16px 18px; transition: 0.35s var(--ease);
}
.mjn-feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.mjn-feature i { color: var(--primary); font-size: 1.15rem; margin-top: 2px; }
.mjn-feature span { font-weight: 600; color: var(--ink); }

/* ---- Sidebar cards --------------------------------------------------- */
.mjn-side-card {
  background: var(--surface); border: 1px solid #e9eef5;
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
}
.mjn-side-card + .mjn-side-card { margin-top: 26px; }
.mjn-side-list a {
  display: flex; align-items: center; gap: 10px; padding: 11px 0;
  border-bottom: 1px solid #eef2f7; color: var(--ink);
  text-decoration: none; font-weight: 600; transition: 0.3s var(--ease);
}
.mjn-side-list a:last-child { border-bottom: 0; }
.mjn-side-list a:hover { color: var(--primary); padding-left: 6px; }
.mjn-side-list a.active { color: var(--primary); }
.mjn-side-list i { color: var(--primary); }

/* ---- CTA card -------------------------------------------------------- */
.mjn-cta-card {
  background: var(--primary-grad); color: #fff;
  border-radius: var(--radius); padding: 30px; text-align: center;
  box-shadow: 0 20px 40px -18px var(--ring);
}
.mjn-cta-card h3, .mjn-cta-card a { color: #fff; }
.mjn-cta-card .mjn-cta-phone { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.mjn-cta-card .btn { background: #fff !important; color: var(--primary) !important; background-image: none !important; }
.mjn-cta-card .btn:hover { transform: translateY(-3px); }

/* =========================================================================
   v3 — modern header (navbar) + footer
   ========================================================================= */

/* ---- Navbar logo + CTA ----------------------------------------------- */
.mjn-logo {
  height: 68px; width: auto; display: block;
  /* subtle shadow keeps the logo crisp on the transparent navbar over the hero */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28));
}
.sticky-top.navbar-dark .mjn-logo {
  height: 56px;                 /* trim slightly once the bar is compact + white */
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}
@media (max-width: 575.98px) { .mjn-logo, .sticky-top.navbar-dark .mjn-logo { height: 50px; } }

.mjn-nav-cta {
  border-radius: 999px !important;
  font-weight: 700;
  box-shadow: 0 10px 22px -10px var(--ring);
}
.mjn-nav-cta:hover { transform: translateY(-2px); }
/* keep the CTA readable on the sticky (white) navbar */
.sticky-top.navbar-dark .mjn-nav-cta { color: #fff !important; }

/* a touch more breathing room between top-level links */
@media (min-width: 992px) {
  .navbar-dark .navbar-nav .nav-link { margin-left: 22px; font-size: 17px; }
}

/* ---- Footer ---------------------------------------------------------- */
.mjn-footer {
  background: radial-gradient(1200px 400px at 80% -10%, #0e2f5e 0%, transparent 60%),
              linear-gradient(180deg, #0a2245 0%, #071833 100%);
  color: #c7d4e6;
  margin-top: 80px;
}
.mjn-footer-logo { max-width: 190px; height: auto; }
.mjn-footer-text { color: #9fb1c9; line-height: 1.7; margin-bottom: 0; }

.mjn-footer-head {
  color: #fff; font-weight: 700; margin-bottom: 18px;
  position: relative; padding-bottom: 10px;
}
.mjn-footer-head::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 38px; height: 3px; border-radius: 3px; background: var(--primary-grad);
}

.mjn-footer-links { list-style: none; padding: 0; margin: 0; }
.mjn-footer-links li { margin-bottom: 10px; }
.mjn-footer-links a {
  color: #aebfd6; text-decoration: none; transition: 0.3s var(--ease);
  display: inline-flex; align-items: center;
}
.mjn-footer-links a::before {
  content: "›"; color: var(--primary); margin-right: 8px;
  transform: translateX(0); transition: 0.3s var(--ease);
}
.mjn-footer-links a:hover { color: #fff; }
.mjn-footer-links a:hover::before { transform: translateX(4px); }

.mjn-footer-contact {
  display: flex; align-items: center; gap: 10px; color: #c7d4e6;
  text-decoration: none; margin-bottom: 12px; transition: 0.3s var(--ease);
}
.mjn-footer-contact i { color: var(--primary); font-size: 1.05rem; }
a.mjn-footer-contact:hover { color: #fff; transform: translateX(3px); }

.mjn-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.92rem; color: #8ea2bd;
}
.mjn-footer-tagline { color: #8ea2bd; }

/* =========================================================================
   v3 — picture consistency
   ========================================================================= */
/* Uniform team photos (source images are different sizes) */
.team-img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
/* Align vendor/partner logos neatly in the carousel */
.vendor-carousel img { height: 56px; width: auto; object-fit: contain; margin: 0 auto; }
/* Detail-page hero image: consistent, crisp framing */
.col-lg-8 > img.img-fluid { aspect-ratio: 16 / 9; object-fit: cover; }
/* Prevent layout shift / keep media responsive */
img { max-width: 100%; }
