/**
 * StroyEnergy: layout polish, 2026-10-16.
 * This file is loaded AFTER legacy styles. It changes layout, not brand colors.
 * No page builder or extra client settings.
 */
:root {
  --se-blue: #315ecb;
  --se-green: #2ebe63;
  --se-dark: #243239;
  --se-ink: #26323b;
  --se-border: #e1e6eb;
}
html { overflow-x: clip !important; overflow-y: auto !important; }
html body { overflow-x: clip !important; overflow-y: visible !important; width: 100%; min-height: 100%; }
body.modal-open { overflow: hidden !important; }
*, *::before, *::after { box-sizing: border-box; }
body { color: var(--se-ink); line-height: 1.55; }
img, iframe, video { max-width: 100%; }
.site-header, #site-content, .ns-footer { width: 100%; max-width: 100%; }
@media (min-width: 1200px) {
  .container { width: min(1240px, calc(100% - 48px)); }
}
.ns-container { width: min(1240px, calc(100% - 48px)) !important; max-width: 1240px !important; padding: 0 !important; }
@media (max-width: 767px) {
  .container, .ns-container { width: calc(100% - 32px) !important; max-width: 100% !important; margin-left: auto; margin-right: auto; }
}
#site-content { position: relative; z-index: 1; }

/* White, always visible, compact header. */
.site-header { position: relative; z-index: 1; background: #fff; }
.site-header .header_bg { background: #fff; }
.site-header .header_bg .stroyenergy-header-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 16px 0; margin: 0; min-height: 112px;
  font-size: 14px; line-height: 1.45;
}
.site-header .stroyenergy-header-top > div { float: none !important; width: auto !important; padding: 0; min-width: 0; }
.site-header .stroyenergy-header-top__brand { display: flex !important; align-items: center; flex: 1 1 39%; gap: 16px; }
.stroyenergy-header-logo { display: inline-flex !important; align-items: center; max-width: 210px; text-decoration: none; }
.stroyenergy-header-logo img { display: block; width: auto; max-width: 190px; max-height: 80px; height: auto; object-fit: contain; }
.stroyenergy-brand-text { display: inline-block; color: var(--se-blue); font: 700 25px/1 'Roboto Condensed', Arial, sans-serif; text-transform: uppercase; white-space: nowrap; }
.stroyenergy-brand-text strong { color: var(--se-green); }
.stroyenergy-header-region { font-size: 13px; line-height: 1.4; color: #4c5962; border-left: 2px solid var(--se-green); padding-left: 16px; }
.site-header .stroyenergy-header-top__contacts { flex: 1 1 35%; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.stroyenergy-header-address { max-width: 370px; }
.stroyenergy-header-email, .site-header .stroyenergy-header-top__contacts .stroyenergy-header-email { margin-top: 8px; font-size: 14px; }
.stroyenergy-header-email a { color: #2756b5; }
.site-header .stroyenergy-header-top__phone { flex: 0 0 auto; text-align: right; }
.stroyenergy-header-phone-link { display: block; color: var(--se-dark); font: 700 21px/1.3 'Roboto Condensed',Arial,sans-serif; text-decoration: none; white-space: nowrap; }
.stroyenergy-header-telegram { display: inline-block; color: #1685b9; font-size: 13px; margin-top: 8px; text-decoration: none; }

/* Sticky nav is a sibling of <header>, not a child of the finite-height hero. */
body .stroyenergy-nav.navbar {
  position: sticky !important; top: 0; left: 0; right: 0;
  z-index: 1100 !important; width: 100%; min-height: 64px; height: auto;
  margin: 0; border: 0; border-radius: 0;
  background: var(--se-blue); box-shadow: 0 4px 14px rgba(27,51,106,.14);
}
body.admin-bar .stroyenergy-nav { top: 32px; }
.stroyenergy-nav > .container { display: flex; align-items: stretch; min-height: 64px; }
.stroyenergy-nav .navbar-header { display: none; height: 64px; }
.stroyenergy-nav .header_nav { flex: 1; min-width: 0; display: flex !important; align-items: center; justify-content: space-between; gap: 12px; }
.stroyenergy-nav .menu-header { min-width: 0; flex: 1; }
.stroyenergy-nav .navbar-nav { display: flex; float: none; align-items: stretch; margin: 0 !important; }
.stroyenergy-nav .navbar-nav > li { float: none; }
body .stroyenergy-nav .header_nav ul.navbar-nav > li > a {
  display: flex; align-items: center; justify-content: center;
  min-height: 64px; padding: 12px 12px; border: 0;
  font: 700 14px/1.25 'Roboto Condensed', Arial, sans-serif; text-align: center;
  color: white; text-transform: uppercase; white-space: normal;
}
body .stroyenergy-nav .navbar-nav > li > a:hover,
body .stroyenergy-nav .navbar-nav > li.current-menu-item > a,
body .stroyenergy-nav .navbar-nav > li.current_page_item > a,
body .stroyenergy-nav .navbar-nav > li > a:focus {
  color: white; background: rgba(0,0,0,.13);
}
.stroyenergy-nav .header_nav .test { flex: 0 0 auto; }
body .stroyenergy-nav .header_nav .btn {
  float: none; display: inline-flex; justify-content: center; align-items: center;
  position: static; top: auto; right: auto; bottom: auto;
  width: auto; min-width: 176px; height: 42px; min-height: 42px;
  padding: 0 18px; margin: 0; border: 0; border-radius: 6px;
  background: var(--se-green); color: white; font: 700 14px/1.2 'Roboto Condensed', Arial, sans-serif;
  text-transform: uppercase; white-space: nowrap;
}
body .stroyenergy-nav .header_nav .btn:hover { background: #23984c; }
.stroyenergy-nav .dropdown-menu { min-width: 210px; background: #fff; border: 1px solid var(--se-border); border-radius: 0 0 6px 6px; box-shadow: 0 12px 24px rgba(0,0,0,.14); }
.stroyenergy-nav .dropdown-menu a { display: block; color: #26323b; font-size: 14px; line-height: 1.4; padding: 11px 14px; }
.stroyenergy-nav .dropdown-menu a:hover { color: var(--se-blue); background: #f0f4ff; }

/* Hero stays below sticky navigation. */
.header_bg_bt { width: 100%; max-width: 100%; min-height: 0; height: 540px; }
.header_bg_bt::after { background: rgba(13,27,47,.55); opacity: 1; }
.header_bg_bt.header_page_bg { height: 0; min-height: 0; }
.header_bg_bt.header_page_bg::after { display: none; }
.header_bg_bt.no-hero { height: 0; min-height: 0; }
.header_bg_bt > .container { position: relative; z-index: 2; }
#header_slider { height: auto; padding: 110px 64px 90px 0; max-width: 920px; color: #fff; }
#header_slider .header_slider_title { max-width: 800px; line-height: 1.15; }
#header_slider .header_slider_text { line-height: 1.5; }

/* Site-wide footer: consistent width, straightforward two-column CTA. */
.ns-footer { clear: both; }
.ns-footer .ns-container { padding-left: 0 !important; padding-right: 0 !important; }
/* Replace the stretched legacy footer.jpg with a crisp CSS-only diagonal split. */
.ns-footer__top {
  padding: 36px 0;
  background: #3d7dd0;
  background-image: linear-gradient(104deg, #3d7dd0 50%, #339beb 50%);
}
.ns-footer__top .ns-container { display: flex; flex-direction: row; gap: 64px; align-items: center; justify-content: space-between; }
.ns-footer__left, .ns-footer__right { width: 50%; flex: 1 1 50%; min-width: 0; background: transparent; }
.ns-footer__info { font-size: 15px; line-height: 1.45; font-weight: 600; }
.ns-footer__tel { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin: 16px 0 0; }
.ns-footer__tel p { margin: 0; }
.ns-footer__tel a { font-size: clamp(20px,2vw,26px); line-height: 1.3; color: white; }
.ns-footer__tooltip { position: static; width: auto; min-width: 0; padding: 8px 12px; font-size: 13px; line-height: 1.35; border-radius: 6px; color: white; background: rgba(25,42,71,.62); }
.ns-footer__tooltip::after { display: none; }
.ns-footer__right p { margin: 0 0 16px; font-size: 17px; line-height: 1.4; font-weight: 600; max-width: 520px; }
.ns-footer__right .btn { position: static; display: inline-flex; justify-content: center; align-items: center; min-height: 48px; width: auto; min-width: 220px; padding: 12px 22px; margin: 0; border-radius: 6px; font-size: 15px; background: var(--se-green); }
.ns-footer__right .btn:hover { background: #23984c; color: white; }
.ns-footer__bootom { background: var(--se-dark); }
.ns-footer__row { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding: 36px 0 30px; }
.ns-footer__logo { flex: 1.4 1 430px; max-width: none; min-width: 0; align-items: flex-start; gap: 14px; }
.ns-footer__logo img { width: 70px; height: 70px; object-fit: contain; margin: 0; flex: 0 0 70px; }
.ns-footer__logo--content { min-width: 0; }
.ns-footer__logo--content h3 { padding: 0; margin: 0 0 8px; font-size: 19px; font-weight: 700; line-height: 1.3; }
.ns-footer__logo--content p { margin: 0; font-size: 14px; line-height: 1.55; max-width: 430px; font-weight: 400; }
.ns-footer__contacts { flex: 1 1 265px; max-width: none; min-width: 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.ns-footer__contacts p { margin: 0 0 8px; }
.ns-footer__contacts a { color: white; text-decoration: underline; }
.ns-footer__link { flex: 0 1 auto; color: #70e89e; white-space: nowrap; font-size: 15px; font-weight: 700; }
.ns-footer__row::after { background: rgba(255,255,255,.17); }
.ns-footer__footer { padding: 24px 0 30px; gap: 32px; align-items: flex-start; }
.ns-footer__docs { flex: 1 1 70%; font-size: 13px; line-height: 1.5; font-weight: 400; }
.ns-footer__docs p { margin: 0 0 12px; }
.ns-footer__docs p:last-child { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; font-size: 13px; line-height: 1.5; }
.ns-footer__docs a { color: #dce6eb; }
.ns-footer__links { font-size: 19px; font-weight: 700; }
.ns-footer__links p { margin: 0; }
.ns-footer__links a { color: white; }


/* Fixed viewport control: no Bootstrap affix classes or layout-dependent offsets. */
#top-link-block.se-back-to-top {
  position: fixed; z-index: 1000; left: 24px; right: auto; bottom: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  background: var(--se-blue); color: #fff; text-decoration: none;
  box-shadow: 0 4px 14px rgba(27, 51, 106, .22);
  transition: background .15s ease, box-shadow .15s ease;
}
#top-link-block.se-back-to-top.hidden { display: none !important; }
#top-link-block.se-back-to-top svg { display: block; width: 22px; height: 22px; }
#top-link-block.se-back-to-top:hover { background: #254cac; box-shadow: 0 6px 18px rgba(27, 51, 106, .28); }
#top-link-block.se-back-to-top:focus-visible { outline: 3px solid var(--se-green); outline-offset: 3px; }
@media (max-width: 767px) {
  #top-link-block.se-back-to-top { left: 16px; right: auto; bottom: 16px; width: 44px; height: 44px; }
}

/* Consistent modal and CF7 form dimensions. */
#modal.popup { padding: 16px !important; }
#modal .popup-content { min-height: 100%; padding: 20px 0; }
#modal .popup-body { width: min(100%, 520px); max-height: calc(100dvh - 64px); overflow-y: auto; padding: 36px 40px; border-radius: 12px; }
#modal .popup-header { gap: 8px; margin-bottom: 24px; }
#modal .popup-header h5 { font-size: clamp(26px,4vw,32px); line-height: 1.2; }
#modal .popup-header p { width: 100%; max-width: 390px; font-size: 15px; line-height: 1.5; }
#modal .popup-form, #modal .popup-form .wpcf7 { width: 100%; }
#modal .popup-form .input-group { margin-bottom: 12px !important; }
#modal .popup-form .form-control { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 8px !important; font-size: 15px; }
#modal .popup-form .wpcf7-form p { margin-bottom: 10px; }
#modal .popup-form .btn { min-height: 48px; border-radius: 8px; background: var(--se-green); font-size: 14px; }
#modal .popup-form .btn:hover { background: #23984c; }
#modal .popup-form .checkbox { font-size: 13px; line-height: 1.5; }
#modal .popup-close { right: 12px; top: 12px; }

/* Mobile/tablet navigation and footer in one document flow. */
@media (max-width: 1120px) {
  .stroyenergy-nav > .container { display: block; }
  .stroyenergy-nav .navbar-header { display: block; height: 60px; }
  .stroyenergy-nav .navbar-toggle { display: block; margin: 12px 0; border-color: rgba(255,255,255,.45); }
  .stroyenergy-nav .navbar-toggle .icon-bar { background-color: white; }
  .stroyenergy-nav .header_nav.navbar-collapse { display: none !important; flex: none; width: 100%; padding: 0 0 18px; height: auto !important; border: 0; box-shadow: none; }
  .stroyenergy-nav .header_nav.navbar-collapse.in { display: block !important; }
  .stroyenergy-nav .navbar-nav { display: block; float: none !important; margin: 0 !important; }
  .stroyenergy-nav .navbar-nav > li { display: block; float: none; }
  body .stroyenergy-nav .header_nav ul.navbar-nav > li > a { display: block; text-align: left; min-height: 0; padding: 12px 10px; }
  .stroyenergy-nav .header_nav .test { padding-top: 12px; }
  .stroyenergy-nav .header_nav .btn { width: 100%; }
  .stroyenergy-nav .nav-submenu-toggle { display: inline-block; }
  .stroyenergy-nav .dropdown-menu, .stroyenergy-nav .header_nav .menu-item-has-children > .dropdown-menu {
    display: none; float: none; position: static; top: auto; left: auto; width: 100%; box-shadow: none;
  }
  .stroyenergy-nav .menu-item-has-children.is-expanded > .dropdown-menu { display: block !important; }
  .ns-footer__top .ns-container { gap: 32px; }
}
@media (max-width: 991px) {
  .site-header .header_bg .stroyenergy-header-top { flex-wrap: wrap; gap: 12px 24px; min-height: 0; }
  .site-header .stroyenergy-header-top__brand { flex: 1 1 100%; }
  .site-header .stroyenergy-header-top__contacts { flex: 1 1 58%; }
  .site-header .stroyenergy-header-top__phone { flex: 0 1 auto; }
  .ns-footer__row { gap: 28px; }
}
@media (max-width: 767px) {
  body.admin-bar .stroyenergy-nav { top: 46px; }
  .site-header .header_bg .stroyenergy-header-top { padding: 14px 0; gap: 12px; text-align: left; }
  .site-header .stroyenergy-header-top > div { width: 100% !important; }
  .site-header .stroyenergy-header-top__brand { flex: 1 1 100%; justify-content: flex-start; gap: 16px; }
  .stroyenergy-header-logo img { max-width: 155px; }
  .stroyenergy-header-region { font-size: 12px; }
  .site-header .stroyenergy-header-top__contacts { flex: 1 1 100%; }
  .site-header .stroyenergy-header-top__phone { text-align: left; }
  .stroyenergy-header-phone-link { font-size: 19px; }
  .header_bg_bt { height: auto; min-height: 300px; }
  .header_bg_bt.no-hero, .header_bg_bt.header_page_bg { height: 0; min-height: 0; }
  #header_slider { padding: 70px 0 60px; }
  #header_slider .header_slider_title { font-size: 26px; line-height: 1.2; }
  .ns-footer__top { padding: 28px 0; }
  .ns-footer__top .ns-container { flex-direction: column; align-items: stretch; gap: 24px; }
  .ns-footer__left, .ns-footer__right { width: 100%; flex: 1 1 auto; }
  .ns-footer__tel { margin-top: 12px; }
  .ns-footer__right p { font-size: 16px; }
  .ns-footer__right .btn { width: 100%; }
  .ns-footer__row { display: flex; flex-direction: column; padding: 28px 0 20px; gap: 20px; }
  .ns-footer__logo { flex: 0 1 auto; width: 100%; }
  .ns-footer__contacts { flex: 0 1 auto; width: 100%; }
  .ns-footer__link { margin: 0; }
  .ns-footer__footer { flex-direction: column; gap: 20px; }
  .ns-footer__docs p:last-child { gap: 10px 16px; }
  #modal .popup-body { padding: 30px 20px; }
}
