/* MEDOPTIM 3.6.2 - responsive hardening
   Loaded globally. Desktop design is intentionally unchanged. */

@media (max-width: 1050px) {
  /* Stable mobile/tablet header on every template. */
  body .topbar .nav {
    display: flex !important;
    align-items: center !important;
    width: min(calc(100% - 36px), 1180px) !important;
    margin-inline: auto !important;
  }
  body .topbar .brand {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
  }
  body .topbar .navlinks,
  body .topbar .nav > .navcta {
    display: none !important;
  }
  body .topbar .menu-btn {
    display: block !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    padding: 8px 0 8px 18px !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    line-height: 1 !important;
    cursor: pointer !important;
  }
}

@media (max-width: 700px) {
  body .topbar .nav {
    width: min(calc(100% - 24px), 1180px) !important;
    height: 68px !important;
    gap: 12px !important;
  }
  body .topbar .brand span { font-size: 24px !important; }
  body .topbar .brand small { font-size: 9px !important; margin-top: 6px !important; }
  body .topbar .menu-btn { font-size: 28px !important; }

  /* Full-width, readable mobile menu. */
  body .topbar .mobile-menu {
    width: 100% !important;
    padding: 10px 18px 18px !important;
    box-shadow: 0 14px 28px rgba(20,55,160,.08) !important;
  }
  body .topbar .mobile-menu a:not(.btn),
  body .topbar .mobile-menu b {
    padding: 9px 0 !important;
  }
  body .topbar .mobile-menu a.btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 52px !important;
    margin-top: 10px !important;
    padding: 14px 18px !important;
    color: #fff !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  /* Faster mobile reading rhythm: home + standard pages only.
     Blog listing and article layouts keep their dedicated spacing. */
  body.home .medoptim-page > .section {
    padding-top: 44px !important;
    padding-bottom: 44px !important;
  }
  body.home .medoptim-page > .section .section-head {
    margin-bottom: 28px !important;
  }
  body.home .final-cta {
    padding-top: 54px !important;
    padding-bottom: 54px !important;
  }

  body.page:not(.page-id-0) main.medoptim-page > section.section {
    padding-top: 44px !important;
    padding-bottom: 44px !important;
  }
  body.page main.medoptim-page > section.section .head {
    margin-bottom: 26px !important;
  }
  body.page main.medoptim-page > section.final {
    padding-top: 52px !important;
    padding-bottom: 52px !important;
  }
}
