/* Codex 2026-10-24: FAQ Book lives inside a narrow Helix component column.
   Its stock breakpoint follows the viewport (991px), not the actual component
   width, so at a 1440px viewport the 280px topic navigation crushed the
   question list to 100px. Keep this correction isolated to FAQ Book pages. */
body.com-faqbookpro #fbExtended {
  flex-direction: column;
}

body.com-faqbookpro .fbLeftNavigation_core {
  width: 100% !important;
  margin: 0 0 30px;
  border-right: 0;
}

body.com-faqbookpro .fbLeftNavigation_toggle {
  display: none;
}

body.com-faqbookpro .fbContent_core {
  width: 100%;
}

body.com-faqbookpro ul.fbTopNavigation_root {
  white-space: normal;
}

/* Codex 2026-10-25: Widgetkit module 179 uses a fixed-width action column.
   Below 480px it left only 85px for the excursion text. Stack the action
   below the text, scoped to this module's existing class only. */
@media (max-width: 480px) {
  .rus-new-excursions .uk-grid-small.uk-flex-middle {
    flex-wrap: wrap;
  }

  .rus-new-excursions .uk-grid-small.uk-flex-middle > .uk-width-expand,
  .rus-new-excursions .uk-grid-small.uk-flex-middle > .uk-width-auto {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }

  .rus-new-excursions .uk-grid-small.uk-flex-middle > .uk-width-auto {
    margin-top: 12px;
  }
}


/* Codex 2026-10-25: restore real Helix header height without changing content widths. */
#sp-header {
  height: auto !important;
  min-height: 60px !important;
}

@media (min-width: 992px) {
  #sp-menu .header-modules {
    display: flex !important;
    flex: 0 0 100px !important;
    width: 100px !important;
  }
  #sp-menu .header-modules input {
    width: 80px !important;
  }
  #sp-menu .sp-megamenu-wrapper {
    flex: 1 1 0 !important;
    width: auto !important;
    max-width: none !important;
  }
  #sp-menu .sp-megamenu-parent {
    width: 100% !important;
  }
  #sp-menu .sp-megamenu-parent > li > a {
    padding-right: 5px !important;
    padding-left: 5px !important;
  }
}

/* Codex forum spacing and contrast 2026-10-25. Match the compact pre-J4 forum without changing articles. */
body.com_kunena #sp-main-body { padding-top: 16px !important; }
body.com_kunena #kunena.layout > .pagination-container-links.pt-4 { padding-top: 0 !important; }
body.com_kunena #kunena.layout .kfrontend > h1.card-header a,
body.com_kunena #kunena.layout .kfrontend > h1.card-header small { color: #fff !important; }
/* Codex 2026-10-25: production header v2. Keep logo and navigation in separate
   rows at desktop widths, place search next to logo, and use offcanvas at tablet widths. */
@media (min-width: 1200px) {
  #sp-header .container { position: relative; }
  #sp-header #sp-logo,
  #sp-header #sp-menu {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #sp-header #sp-menu .header-modules {
    position: absolute !important;
    top: 20px !important;
    right: 45px !important;
    flex: none !important;
    width: 180px !important;
  }
  #sp-header #sp-menu .sp-megamenu-wrapper {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #sp-header #sp-menu .sp-megamenu-parent > li > a {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  #sp-header #offcanvas-toggler { display: none !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  #sp-header #sp-menu .sp-megamenu-wrapper { display: none !important; }
  #sp-header #offcanvas-toggler { display: flex !important; }
}

/* Codex 2026-10-25: equal-width native Helix menu in 6-MultiRows header. */
@media (min-width: 1200px) {
  #sp-header.lg-header .sp-megamenu-wrapper { width: 100% !important; flex: 1 1 100% !important; }
  #sp-header.lg-header .sp-megamenu-parent { display: flex !important; flex-wrap: nowrap !important; width: 100% !important; margin: 0 !important; }
  #sp-header.lg-header .sp-megamenu-parent > li { float: none !important; flex: 1 1 0 !important; min-width: 0 !important; text-align: center !important; }
  #sp-header.lg-header .sp-megamenu-parent > li > a { display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; min-height: 76px !important; padding: 8px 3px !important; line-height: 1.15 !important; white-space: normal !important; }
  #sp-header.lg-header .sp-megamenu-parent > li > a > img { display: block !important; margin: 0 auto 2px !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  #sp-header.lg-header .sp-megamenu-wrapper { display: none !important; }
  #sp-header.lg-header #offcanvas-toggler { display: flex !important; }
}

/* Codex 2026-10-25: remove empty MultiRows topbar on phone/tablet. */
@media (max-width: 991.98px) { #sp-header-topbar { display: none !important; } }
