/* MF modern header — overrides theme top/nav bars */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap");

.mf-site-header {
  position: relative;
  z-index: 1000;
  font-family: "Outfit", sans-serif;
}

.mf-topbar,
.mf-navbar {
  position: relative;
  z-index: 2;
}

/* Hide old theme header pieces if any leftover */
.mf-site-header .hd-sec,
.mf-site-header .mnmenu-sec { display: none !important; }

/* ===== Top bar ===== */
.mf-topbar {
  background: linear-gradient(90deg, #0c4a6e 0%, #0369a1 55%, #0d9488 100%);
  color: #fff;
  padding: 10px 0;
}

.mf-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.mf-topbar__contacts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  min-width: 0;
}

.mf-topbar__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  color: #fff !important;
  text-decoration: none !important;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 0.25s ease, transform 0.25s ease;
}

.mf-topbar__chip:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-1px);
  color: #fff !important;
}

.mf-topbar__chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.mf-topbar__icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 12px;
}

.mf-topbar__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #34d399);
  color: #0c4a6e !important;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(0,0,0,0.15);
}

.mf-topbar__badge i { color: #0c4a6e; }

/* ===== Main navbar ===== */
.mf-navbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(14,165,233,0.12);
  box-shadow: 0 10px 30px rgba(12,74,110,0.06);
  padding: 12px 0;
}

.mf-navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.mf-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  min-width: 0;
  flex-shrink: 0;
}

.mf-brand__mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #0c4a6e, #0ea5e9);
  box-shadow: 0 10px 22px rgba(14,165,233,0.28);
  overflow: hidden;
  padding: 8px;
}

.mf-brand__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.mf-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.mf-brand__text strong {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0c4a6e;
  letter-spacing: -0.02em;
}

.mf-brand__text small {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

/* Nav links — override theme .main-menu rules */
.mf-site-header .mf-nav,
.mf-site-header .mf-nav ul {
  float: none !important;
  text-align: left !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.mf-site-header .mf-nav > ul {
  display: flex !important;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  line-height: normal !important;
}

.mf-site-header .mf-nav > ul > li {
  display: block !important;
  float: none !important;
  margin: 0 !important;
  position: relative;
}

.mf-site-header .mf-nav > ul > li > a {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: 10px 16px !important;
  margin: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #0c4a6e !important;
  font-family: "Outfit", sans-serif !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  text-decoration: none !important;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease !important;
}

.mf-site-header .mf-nav > ul > li > a:hover {
  background: #e0f2fe !important;
  color: #0284c7 !important;
  transform: translateY(-1px);
}

.mf-site-header .mf-nav > ul > li.active > a {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6) !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(14,165,233,0.28);
}

.mf-site-header .mf-nav > ul > li.active > a:hover {
  color: #fff !important;
}

.mf-nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none !important;
  color: #0c4a6e !important;
  background: linear-gradient(120deg, #fbbf24, #34d399, #38bdf8);
  background-size: 200% 200%;
  box-shadow: 0 10px 24px rgba(14,165,233,0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: mfCtaShine 4s linear infinite;
}

.mf-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(20,184,166,0.28);
  color: #0c4a6e !important;
  text-decoration: none !important;
}

@keyframes mfCtaShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Never leave the theme preloader covering the page */
body.is-loaded #preloader,
#preloader.is-done {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

/* Custom mobile menu (meanmenu disabled) */
.mean-container { display: none !important; }

.mf-navbar,
.mf-navbar .container,
.mf-navbar__inner {
  overflow: visible !important;
}

.mf-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, #0c4a6e, #0ea5e9);
  box-shadow: 0 10px 22px rgba(14,165,233,0.28);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-shrink: 0;
  z-index: 30;
  position: relative;
}

.mf-menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mf-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mf-menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.mf-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Behind topbar/navbar so menu links stay clickable (navbar uses backdrop-filter) */
.mf-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 74, 110, 0.45);
  z-index: 1;
  pointer-events: none;
}

.mf-nav-backdrop.is-open {
  display: block;
  pointer-events: auto;
}

.mf-nav-mobile-cta { display: none !important; }

@media (max-width: 991px) {
  .mf-nav-cta { display: none; }
  .mf-brand__text small { display: none; }
  .mf-topbar__chip--email span:last-child {
    max-width: 160px;
  }
  .mf-navbar__inner {
    position: relative;
    min-height: 58px;
    flex-wrap: nowrap;
  }
  .mf-menu-toggle {
    display: inline-flex !important;
  }

  .mf-site-header .mf-nav {
    display: block !important;
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    z-index: 5;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(12,74,110,0.18);
    border: 1px solid #e0f2fe;
    padding: 10px !important;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

  .mf-site-header .mf-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .mf-site-header .mf-nav > ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 2px !important;
    line-height: 1.25 !important;
  }

  .mf-site-header .mf-nav > ul > li {
    width: 100% !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .mf-site-header .mf-nav > ul > li > a {
    width: 100% !important;
    justify-content: flex-start !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    line-height: 1.25 !important;
    min-height: 0 !important;
    height: auto !important;
    position: relative;
    z-index: 1;
    pointer-events: auto !important;
    cursor: pointer;
  }

  .mf-nav-mobile-cta {
    display: block !important;
    margin-top: 4px !important;
    padding-top: 4px !important;
    border-top: 1px solid #e0f2fe !important;
  }

  .mf-nav-mobile-cta a {
    background: linear-gradient(135deg, #0ea5e9, #14b8a6) !important;
    color: #fff !important;
    justify-content: center !important;
  }
}

@media (max-width: 767px) {
  .mf-topbar__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .mf-topbar__contacts {
    width: 100%;
  }
  .mf-topbar__chip {
    font-size: 0.8rem;
    padding: 6px 10px;
  }
  .mf-topbar__chip--email {
    width: 100%;
  }
  .mf-topbar__chip--email span:last-child {
    max-width: calc(100% - 40px);
  }
  .mf-brand__mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
  .mf-brand__text strong {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-nav-cta { animation: none !important; }
  .mf-menu-toggle span,
  .mf-site-header .mf-nav { transition: none !important; }
}