/* NVOBUD mobile v5 — single source of mobile layout (replaces legacy custom.css @media) */

/* ═══ OFFCANVAS ═══ */
.offcanvas-overlay {
  background: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.offcanvs-position-right .offcanvas-menu {
  width: 280px !important;
  max-width: 85vw !important;
  right: -280px !important;
  top: 0 !important;
  height: 100% !important;
  position: fixed !important;
  z-index: 10001 !important;
  background: #1a2730 !important;
  overflow-y: auto !important;
}

body.offcanvs-position-right.offcanvas-active .offcanvas-menu {
  right: 0 !important;
  display: block !important;
  visibility: visible !important;
}

.offcanvas-menu .close-offcanvas {
  color: #fff !important;
  top: 10px !important;
  right: 10px !important;
}

.offcanvas-menu .offcanvas-inner {
  padding: 45px 0 25px !important;
}

.offcanvas-menu .offcanvas-inner ul.nav,
.offcanvas-menu .offcanvas-inner ul.menu,
.offcanvas-menu .offcanvas-inner .mod-menu ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.offcanvas-menu .offcanvas-inner ul li a {
  display: block !important;
  color: #fff !important;
  font-size: 15px !important;
  padding: 13px 20px !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.offcanvas-menu .offcanvas-inner ul ul li a {
  font-size: 13px !important;
  padding-left: 32px !important;
  color: #b0bec5 !important;
  text-transform: none !important;
}

.offcanvas-menu .sp-module.offcanvas,
.offcanvas-menu .mod-custom.offcanvas {
  text-align: center !important;
  padding: 12px 20px !important;
}

#offcanvas-toggler .burger-icon span {
  background-color: #f59b46 !important;
}

/* ═══════════════════════════════════════════
   MOBILE + TABLET (≤991px)
   ═══════════════════════════════════════════ */
@media (max-width: 991px) {

  /* ── Polished mobile header ── */
  html body.site #sp-header,
  html body #sp-header {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: 14px 0 !important;
    overflow: visible !important;
    background: linear-gradient(180deg, rgba(14, 22, 30, 0.98) 0%, rgba(20, 30, 40, 0.96) 100%) !important;
    border-bottom: none !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 999 !important;
  }

  html body #sp-header::after {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 8% !important;
    right: 8% !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, #f59b46 15%, #f59b46 85%, transparent) !important;
    border-radius: 2px !important;
  }

  html body #sp-header .container,
  html body #sp-header .container-inner {
    position: relative !important;
  }

  html body #sp-header .row,
  html body #sp-header .container-inner .row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    min-height: 0 !important;
    height: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Override Bootstrap col-* on header modules */
  html body #sp-header #sp-logo,
  html body #sp-header #sp-logo[class*="col"] {
    flex: 0 0 58% !important;
    width: 58% !important;
    max-width: 58% !important;
    order: 1 !important;
    float: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 0 0 12px !important;
  }

  html body #sp-header #sp-logo .sp-column {
    min-height: 0 !important;
    height: auto !important;
    align-items: center !important;
  }

  html body #sp-header #sp-menu,
  html body #sp-header #sp-menu[class*="col"] {
    flex: 0 0 42% !important;
    width: 42% !important;
    max-width: 42% !important;
    order: 2 !important;
    float: none !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0 12px 0 0 !important;
    text-align: right !important;
  }

  /* Search bar — slim row under logo + burger */
  html body #sp-header #sp-search,
  html body #sp-header #sp-search[class*="col"] {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    order: 3 !important;
    float: none !important;
    position: static !important;
    pointer-events: auto !important;
    padding: 4px 14px 14px !important;
    margin: 0 !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }

  html body #sp-header #sp-search .sp-column,
  html body #sp-header #sp-search .sp-column.d-flex {
    display: block !important;
    width: 100% !important;
    min-height: 0 !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    white-space: normal !important;
  }

  html body #sp-search .search.poisk,
  html body #sp-search .sp-module.poisk {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
  }

  /* Social in offcanvas; language switcher visible in header row */
  html body #sp-search .mod-custom.custom,
  html body #sp-search #mod-custom105,
  html body #sp-search .sp-module.social,
  html body #sp-search .sp-column > .mod-custom,
  html body #sp-search .sp-column > .sp-module.social {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    pointer-events: none !important;
  }

  html body #sp-header .container,
  html body #sp-header .container-inner {
    position: relative !important;
  }

  /* Lang button — same row/height as burger (44px), 8px gap */
  html body #sp-header #sp-search {
    position: static !important;
  }

  html body #sp-header #sp-search .moduletable.langbl,
  html body #sp-header #sp-search .mod-languages.langbl,
  html body #sp-search .moduletable.langbl {
    display: flex !important;
    align-items: center !important;
    visibility: visible !important;
    position: absolute !important;
    top: 1px !important;
    right: 64px !important;
    width: auto !important;
    height: 44px !important;
    overflow: visible !important;
    pointer-events: auto !important;
    z-index: 1003 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  html body #sp-header #sp-menu .sp-column {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0 !important;
    min-height: 44px !important;
    height: 44px !important;
  }

  html body #sp-search .mod-languages,
  html body #sp-search .mod-languages ul,
  html body #sp-search .mod-languages li {
    display: inline-flex !important;
    pointer-events: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  html body #sp-search .mod-languages a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    background: rgba(245, 155, 70, 0.12) !important;
    border: 1px solid rgba(245, 155, 70, 0.45) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
    color: #f59b46 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    pointer-events: auto !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
  }

  html body #sp-search .mod-languages a:hover,
  html body #sp-search .mod-languages a:focus {
    background: rgba(245, 155, 70, 0.18) !important;
    color: #fff !important;
  }

  /* Language switcher in offcanvas (duplicate module) */
  html body .offcanvas-menu .moduletable.lang-offcanvas,
  html body .offcanvas-menu .lang-offcanvas {
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    text-align: center !important;
    padding: 18px 20px 22px !important;
    margin-top: 8px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12) !important;
  }

  html body .offcanvas-menu .lang-offcanvas .mod-languages ul {
    justify-content: center !important;
    gap: 10px !important;
  }

  html body .offcanvas-menu .lang-offcanvas .mod-languages a {
    min-width: 72px !important;
    height: 40px !important;
    font-size: 14px !important;
    border-radius: 20px !important;
  }

  html body #sp-search .poisk form {
    position: relative !important;
    margin: 0 !important;
    width: 100% !important;
  }

  html body #sp-search .poisk input,
  html body #sp-search .search-query,
  html body #sp-search #mod-search-searchword88 {
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 46px 8px 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 22px !important;
    background: rgba(255, 255, 255, 0.07) !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: normal !important;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.18) !important;
    box-sizing: border-box !important;
  }

  html body #sp-search .poisk input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
  }

  html body #sp-search .poisk input:focus,
  html body #sp-search .search-query:focus {
    outline: none !important;
    border-color: rgba(245, 155, 70, 0.65) !important;
    background: rgba(255, 255, 255, 0.11) !important;
    box-shadow: 0 0 0 2px rgba(245, 155, 70, 0.18) !important;
  }

  html body #sp-search .poisk button {
    position: absolute !important;
    right: 3px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #f59b46 0%, #e88a35 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(245, 155, 70, 0.4) !important;
    cursor: pointer !important;
  }

  html body #sp-search .poisk button img {
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    filter: brightness(0) invert(1) !important;
    opacity: 0.95 !important;
  }

  html body #sp-header #sp-logo img,
  html body #sp-logo img {
    max-height: 44px !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    position: relative !important;
    top: 0 !important;
    display: block !important;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)) !important;
  }

  html body #sp-header #sp-logo .logo,
  html body #sp-header #sp-logo .logo-image {
    display: none !important;
  }

  /* Burger */
  html body #offcanvas-toggler,
  html body #sp-header #offcanvas-toggler {
    display: flex !important;
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    float: none !important;
    background: rgba(245, 155, 70, 0.12) !important;
    border: 1px solid rgba(245, 155, 70, 0.45) !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
  }

  html body #offcanvas-toggler .burger-icon {
    width: 20px !important;
  }

  html body #offcanvas-toggler .burger-icon span {
    background-color: #f59b46 !important;
    height: 2px !important;
    margin: 4px 0 !important;
    border-radius: 1px !important;
  }

  html body #sp-header #sp-menu .sp-megamenu-wrapper {
    display: flex !important;
    justify-content: flex-end !important;
    width: 100% !important;
    min-height: 0 !important;
  }

  html body #sp-header .sp-megamenu-parent,
  html body #sp-header #sp-menu .sp-megamenu-parent {
    display: none !important;
  }

  html body #sp-header .container,
  html body #sp-main-body .container,
  html body #sp-footer .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* ── Hero block (title area) ── */
  html body.glav #sp-main-body {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 10px !important;
  }

  html body.glav #sp-main-body .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html body.glav .item-page.glav,
  html body.glav [itemprop="articleBody"],
  html body.glav .com-content-article__body {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  html body.glav .item-page.glav > h1,
  html body.glav [itemprop="articleBody"] > h1,
  html body.glav .com-content-article__body > h1,
  html body.glav h1 {
    font-family: "Exo2MediumCondensed", sans-serif !important;
    font-size: 26px !important;
    margin: 0 !important;
    padding: 24px 20px 0 !important;
    line-height: 1.15 !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    background: transparent !important;
  }

  html body.glav h1::after {
    content: "" !important;
    display: block !important;
    width: 48px !important;
    height: 3px !important;
    background: #f59b46 !important;
    margin: 14px auto 0 !important;
    border-radius: 2px !important;
  }

  html body.glav .item-page.glav > h2,
  html body.glav [itemprop="articleBody"] > h2,
  html body.glav h2 {
    font-size: 15px !important;
    margin: 0 !important;
    padding: 10px 20px 22px !important;
    text-align: center !important;
    font-weight: normal !important;
    color: rgba(255, 255, 255, 0.88) !important;
    letter-spacing: 0.2px !important;
    line-height: 1.45 !important;
    background: transparent !important;
    border-bottom: none !important;
  }

  /* Unified hero panel behind title + subtitle */
  html body.glav [itemprop="articleBody"] {
    margin: 0 12px !important;
    padding: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
    background: linear-gradient(180deg, rgba(16, 26, 36, 0.88) 0%, rgba(16, 26, 36, 0.5) 100%) !important;
    border-radius: 0 0 14px 14px !important;
    border: 1px solid rgba(255, 255, 255, 0.07) !important;
    border-top: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
  }

  html body.glav h1:before,
  html body.glav .item-page.glav h1:before {
    display: none !important;
    content: none !important;
  }

  /* Feature blocks: card list */
  html body.glav .mainblocks,
  html body.glav .item-page .mainblocks,
  html body.glav [itemprop="articleBody"] .mainblocks {
    float: none !important;
    width: auto !important;
    max-width: none !important;
    clear: both !important;
    display: block !important;
    text-align: left !important;
    padding: 16px 18px !important;
    margin: 0 12px !important;
    font-size: 14px !important;
    line-height: 1.45 !important;
    box-sizing: border-box !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    overflow: hidden !important;
  }

  html body.glav .mainblocks:first-of-type,
  html body.glav [itemprop="articleBody"] .mainblocks:first-child {
    margin-top: 4px !important;
    border-radius: 0 !important;
  }

  html body.glav .mainblocks:last-of-type,
  html body.glav [itemprop="articleBody"] .mainblocks:last-child {
    border-radius: 0 0 14px 14px !important;
    border-bottom: none !important;
    margin-bottom: 12px !important;
  }

  html body.glav .mainblocks img {
    float: left !important;
    width: 46px !important;
    max-width: 46px !important;
    height: auto !important;
    margin: 2px 14px 2px 0 !important;
    display: block !important;
  }

  /* Partner logos — no white boxes */
  html body .ju-sponsors-image-inner,
  html body .ju-sponsors-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  html body .ju-sponsors-image-inner img {
    opacity: 0.85 !important;
    filter: brightness(1.05) !important;
  }

  /* Sponsors */
  html body .ju-sponsors-introtext {
    text-align: center !important;
    font-size: 13px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
  }

  html body .default-simple.ju-sponsors-horizontal .ju-sponsors-wrap {
    margin: 0 10px !important;
  }

  /* ── Footer: stack, no overlap ── */
  html body #sp-footer .row {
    display: block !important;
    flex-wrap: wrap !important;
    text-align: center !important;
  }

  html body #sp-footer #sp-user1,
  html body #sp-footer #sp-user2,
  html body #sp-footer #sp-user3,
  html body #sp-footer [class*="col"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 6px 12px !important;
    text-align: center !important;
  }

  html body #sp-user2 .mod-custom p,
  html body #sp-user2 p {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    font-size: 15px !important;
  }

  html body #sp-user2 .cont-foot span,
  html body #sp-user2 span {
    display: block !important;
    margin: 0 !important;
  }

  html body #sp-user2 .social-footer,
  html body #sp-footer .soc-link,
  html body #sp-footer .social-footer {
    display: none !important;
  }

  html body #sp-footer .soc-link img {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    display: inline-block !important;
  }

  html body .author {
    text-align: center !important;
    font-size: 13px !important;
  }

  /* Gallery */
  html body .nvobud-jg-gallery .jg_element_cat,
  html body .jg_element_cat {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-bottom: 12px !important;
  }

  /* Services */
  html body .vid {
    width: 48% !important;
    margin-right: 2% !important;
    float: left !important;
  }

  /* Neutralize desktop custom.css leaks on mobile */
  html body div#sp-search > div > div {
    display: block !important;
    vertical-align: initial !important;
  }

  html body .moduletable.langbl,
  html body .mod-languages.langbl {
    margin-top: 0 !important;
    margin-left: 0 !important;
    float: none !important;
  }

  html body #sp-footer .row {
    display: block !important;
    flex-wrap: wrap !important;
  }

  /* Inner pages */
  html body #sp-main-body {
    padding-top: 16px !important;
    padding-bottom: 24px !important;
    min-height: 0 !important;
  }

  html body #sp-main-body .container,
  html body #sp-main-body .container-inner {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html body .item-page h1,
  html body .com-content-article__body h1,
  html body [itemprop="articleBody"] h1 {
    font-size: 28px !important;
    line-height: 1.2 !important;
    margin: 0 0 16px !important;
    padding: 0 !important;
    text-align: left !important;
  }

  html body .item-page h3,
  html body .about h3 {
    font-size: 20px !important;
    line-height: 1.25 !important;
    margin: 20px 0 12px !important;
  }

  html body .item-page p,
  html body .com-content-article__body p,
  html body [itemprop="articleBody"] p {
    font-size: 15px !important;
    line-height: 1.55 !important;
    margin-bottom: 14px !important;
  }

  html body .about table {
    width: 100% !important;
    display: block !important;
  }

  html body .about table tr {
    display: block !important;
    margin-bottom: 16px !important;
  }

  html body .about table tr td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }

  html body .about table tr td:first-child {
    width: auto !important;
    margin-bottom: 10px !important;
    text-align: center !important;
  }

  html body .about table tr td img {
    max-width: 120px !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
  }

  /* About company background */
  html body.view-article.itemid-158 #sp-main-body,
  html body.view-article.itemid-112 #sp-main-body {
    padding-bottom: 40px !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html body.view-article.itemid-158 #sp-footer,
  html body.view-article.itemid-112 #sp-footer {
    background: #15141b !important;
    margin-top: 0 !important;
  }

  /* Contacts */
  html body .contacts.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html body .contacts.row > [class*="col"] {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 16px !important;
  }

  html body .contacts.row iframe {
    min-height: 240px !important;
  }

  /* Carousel on mobile */
  html body #sp-bottom1 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html body #sp-bottom1 .ju-sponsors-wrap {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
  }

  html body #sp-bottom1 .ju-sponsors-itemwrap {
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html body #sp-bottom1 .ju-sponsors-introtext {
    text-align: center !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  html body #sp-bottom1 .ju-sponsors-navigator-wrap {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 8px !important;
  }
}

/* ═══ SMALL PHONE (≤480px) ═══ */
@media (max-width: 480px) {
  html body.glav h1 {
    font-size: 22px !important;
    padding-top: 22px !important;
  }

  html body.glav h2 {
    font-size: 14px !important;
    padding-bottom: 20px !important;
  }

  html body #sp-header #sp-logo img {
    max-height: 46px !important;
  }

  html body .vid {
    width: 100% !important;
    margin-right: 0 !important;
    float: none !important;
  }
}
