/* Compact first-screen header for aquavip.by */

/* --- Fish warning strip --- */
.moybox.topper.fish-warn {
  position: sticky;
  top: 0;
  z-index: 60;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  /* Keep above header layers, but fixed white top sits below via --aquavip-fish-warn-h */
}

/* Stacking: warn(60) > white top(55) > blue nav(50) > middle(10) > content(1) */
body.home-page .m-header__top {
  /* -1px kills subpixel/hairline gap under sticky banner */
  top: calc(var(--aquavip-fish-warn-h, 0px) - 1px) !important;
  z-index: 55 !important;
  background-color: #fff !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  border-top: 0 !important;
  /* theme.css sets border-bottom — that shows as a gap above the blue bar */
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body.home-page.admin-check .m-header__top,
body.home-page.page.admin-check .m-header__top {
  top: calc(var(--aquavip-fish-warn-h, 0px) - 1px) !important;
}

body.home-page .m-header {
  /* Reserve space for fixed white top bar so middle is not covered */
  padding-top: 3.7rem;
  margin-top: 0 !important;
  overflow: visible !important;
}

.main-wrapper {
  overflow: visible !important;
}

.m-header__middle {
  position: relative;
  z-index: 10;
  overflow: visible;
}

/* Blue menu: docks under white on scroll via .is-stuck (fixed) */
.m-header__bottom,
.m-header__bottom.css-color-menu-main,
.css-color-menu-main.m-header__bottom {
  position: relative;
  z-index: 50;
  overflow: visible !important;
  background-color: #86addf !important;
  margin: 0 !important;
  border-top: 0 !important;
  box-shadow: none !important;
}

.m-header__bottom.is-stuck {
  position: fixed !important;
  top: var(--aquavip-blue-sticky-top, 3.7rem) !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 50 !important;
  margin: 0 !important;
  border-top: 0 !important;
  /* Overlap white by 1px so no hairline shows through */
  transform: translateY(-1px);
}

.m-header__bottom-spacer {
  display: none;
  width: 100%;
  height: 0;
  pointer-events: none;
}

.m-header__bottom-spacer.is-active {
  display: block;
  height: var(--aquavip-blue-menu-h, 4.4rem);
}

.desktop-navbar.open,
.mobile-navbar.open {
  z-index: 52 !important;
}

.fish-warn .notif {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: .8rem 4rem .8rem 1.6rem !important;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  line-height: 1.35;
  position: relative;
}

.fish-warn__lines {
  max-width: 110rem;
}

.fish-warn__line {
  margin: 0;
}

.fish-warn .notif p {
  margin: 0;
  color: #fff;
}

.fish-warn__line--primary {
  font-weight: 700;
}

.fish-warn__line--secondary {
  margin-top: .2rem;
  font-size: 1.25rem;
  font-weight: 500;
  opacity: .95;
}

.fish-warn .notif_close {
  position: absolute;
  right: .8rem;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  opacity: .55;
}

.fish-warn .notif_close:hover {
  opacity: 1;
}

.fish-warn__mini {
  display: none;
  width: 100%;
  border: 0;
  cursor: pointer;
  padding: .45rem 1.2rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
  text-align: center;
  background: linear-gradient(270deg, #2882db, #7b71d3 20%, #ae5bbb 40%, #cf4294 60%, #dd3266 80%, #d73b35);
}

.fish-warn.is-collapsed .notif {
  display: none;
}

.fish-warn.is-collapsed .fish-warn__mini {
  display: block;
}

.fish-warn.hidden {
  display: none !important;
}

/* --- Middle header compression --- */
.m-header__middle {
  padding: .55rem 0 !important;
}

/* One flex/grid row for all columns */
.m-header__middle-wrap {
  display: block !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
}

.m-header__middle .logo,
.m-header__middle .hc-logo {
  margin-bottom: 0 !important;
}

.m-header__middle .logo .imglogo,
.m-header__middle .logo img,
.m-header__middle .hc-logo .imglogo,
.m-header__middle .hc-logo img {
  max-height: 5.8rem;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.m-header__middle .box-number {
  max-width: none;
  min-width: 0;
}

.header-contacts,
.m-header__middle .box-number.header-contacts {
  display: grid !important;
  grid-template-columns: auto minmax(11rem, 1fr) minmax(11rem, 1fr) minmax(9rem, auto) minmax(11rem, auto) minmax(9rem, auto);
  grid-template-areas:
    "logo sales service fish meta hours"
    "logo socials service fish meta hours";
  column-gap: 1.4rem;
  row-gap: .35rem;
  align-items: start;
  justify-content: space-between;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.header-contacts > .hc-logo { grid-area: logo; }
.header-contacts > .hc-sales { grid-area: sales; }
.header-contacts > .hc-socials { grid-area: socials; }
.header-contacts > .hc-service { grid-area: service; }
.header-contacts > .hc-fish { grid-area: fish; }
.header-contacts > .hc-meta { grid-area: meta; }
.header-contacts > .hc-hours { grid-area: hours; }

.header-contacts .hc-sales { max-width: 22rem; }
.header-contacts .hc-service { max-width: 20rem; }
.header-contacts .hc-fish { max-width: 14rem; }

.header-contacts__meta {
  max-width: 18rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
}

.header-contacts .hc-hours {
  max-width: 15rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
}

.header-contacts__socials,
.m-header__middle .hc-socials,
.m-header__middle .mess.hc-socials {
  display: block !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
}

.header-contacts__title {
  margin: 0 0 .2rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.25;
  color: #2f2f2f;
}

.header-contacts__col .number-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .15rem;
}

.header-contacts__note,
.header-contacts__note a,
.header-contacts__note .nolink {
  display: block !important;
  float: none !important;
  position: static !important;
  max-width: none !important;
  white-space: normal !important;
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  color: #565656 !important;
  text-decoration: none;
}

.header-contacts__note a:hover {
  text-decoration: underline;
}

.m-header__middle .nav-tabs-number {
  margin-bottom: .4rem;
  margin-top: 0 !important;
  justify-content: flex-start;
}

.m-header__middle .nav-tabs-number__item {
  margin-right: 1.6rem;
}

.m-header__middle .nav-tabs-number__link {
  font-size: 1.2rem;
}

.m-header__middle .number-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 1rem 1.6rem;
}

.m-header__middle .number-block .number-list {
  margin: 0;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start !important;
  gap: .2rem;
}

.m-header__middle .number-list__item {
  margin: 0;
  line-height: 1.2;
}

.m-header__middle .number-list__item.email {
  display: none;
}

.m-header__middle .number-list__link {
  font-size: 1.7rem !important;
  white-space: nowrap;
  float: none !important;
  text-align: left !important;
  max-width: none !important;
  justify-content: flex-start !important;
}

.m-header__middle .number-list__item--service .moytext,
.m-header__middle .moytext--service,
.m-header__middle .moytext {
  display: block !important;
  overflow: visible;
  white-space: normal !important;
  float: none !important;
  text-align: left !important;
  max-width: none !important;
  font-size: 1.25rem !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  color: #565656;
  position: static !important;
}

.m-header__middle .moytext[style*="color"],
.m-header__middle .text-danger {
  color: #565656 !important;
}

.m-header__middle .number-list__item.is-fish-warn-duplicate,
.m-header__middle .timing__item.is-fish-warn-duplicate,
.m-header__middle .moytext.is-fish-warn-duplicate {
  display: none !important;
}

.m-header__middle .mess {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Kill theme #ver4 80px rows / floats — main source of empty space */
.m-header__middle ul.options,
.m-header__middle ul.options#ver4,
.m-header__middle .hc-socials ul.options#ver4 {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .3rem !important;
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  float: none !important;
  clear: both !important;
}

.m-header__middle ul.options > li,
.m-header__middle ul.options#ver4 > li,
.m-header__middle .hc-socials ul.options#ver4 > li {
  float: none !important;
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
}

.m-header__middle ul.options#ver4 > li::before {
  display: none !important;
}

.m-header__middle ul.options > li > a,
.m-header__middle ul.options#ver4 > li > a,
.m-header__middle .hc-socials ul.options#ver4 > li > a {
  display: inline-flex !important;
  height: auto !important;
  min-height: 0 !important;
  width: auto !important;
  max-width: none !important;
}

.m-header__middle ul.options#ver4 > li > a > i,
.m-header__middle .hc-socials ul.options#ver4 > li > a > i {
  font-size: 1.45rem !important;
  line-height: 2.4rem !important;
  width: 2.4rem !important;
  height: 2.4rem !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.m-header__middle .timing {
  max-width: 22rem;
  margin: 0;
}

.m-header__middle .timing__item {
  font-size: 1.2rem !important;
  line-height: 1.3 !important;
  margin: 0;
}

.m-header__middle .timing .link {
  display: inline-block;
  margin-top: .3rem;
  font-size: 1.3rem;
}

.m-header__middle .search,
.m-header__middle .woocommerce {
  display: none !important;
}

/* Pending tools (before JS moves them into .m-navbar) */
.m-navbar-tools.is-pending {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- Bottom nav --- */
.m-navbar__button {
  height: 4rem !important;
}

.m-navbar-menu {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: wrap;
}

.m-navbar-menu__link {
  height: 4rem !important;
  padding: 0 .8rem !important;
  font-size: 1.25rem !important;
}

.m-navbar-tools {
  display: flex;
  align-items: center;
  gap: .8rem 1.2rem;
  margin-left: auto;
  flex: 0 0 auto;
  max-width: 42rem;
  position: relative;
  overflow: visible;
  z-index: 5;
}

.m-navbar-tools .search {
  flex: 1 1 16rem;
  min-width: 14rem;
  max-width: 22rem;
  margin: 0;
  position: relative;
  overflow: visible;
}

.m-navbar-tools .js-search {
  position: relative;
  overflow: visible;
}

.m-navbar-tools .search-wrap,
.m-navbar-tools .form-icon,
.m-navbar-tools #search {
  width: 100%;
}

/* Absolute dropdown: does not stretch the blue menu bar */
.m-navbar-tools .js-search-suggest {
  position: absolute;
  left: auto;
  right: 0;
  top: calc(100% + .35rem);
  z-index: 120;
  width: min(42rem, calc(100vw - 2.4rem));
  min-width: 0;
  max-width: min(42rem, calc(100vw - 2.4rem));
  margin: 0;
  padding: 0;
  background: #fff;
  border: .1rem solid #ededed;
  border-radius: 1rem;
  box-shadow: 0 .5rem 2rem rgba(0, 0, 0, .15);
  max-height: min(70vh, 42rem);
  overflow-x: hidden;
  overflow-y: auto;
  color: #252525;
  box-sizing: border-box;
}

.m-navbar-tools .js-search-suggest:empty,
.m-navbar-tools .js-search-suggest:not(.is-open) {
  display: none !important;
  border: 0;
  box-shadow: none;
}

.m-navbar-tools .live-search {
  display: none !important;
}

.m-navbar-tools .search__input {
  height: 3.2rem;
  border-radius: 1.6rem;
  background: #fff;
  border: 0;
  color: #252525;
  box-shadow: none;
}

.m-navbar-tools .form-icon .icon {
  color: #6b6b6b;
}

.m-navbar-tools .woocommerce {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin: 0;
}

.m-navbar-tools .woocommerce__item {
  margin-left: .8rem;
}

.m-navbar-tools .woocommerce__item:first-child {
  margin-left: 0;
}

.m-navbar-tools .woocommerce__icon {
  width: 3.4rem;
  height: 3.4rem;
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .95);
}

.m-navbar-tools .woocommerce__content {
  margin-left: .7rem;
}

.m-navbar-tools .woocommerce__first-bl,
.m-navbar-tools .woocommerce__last-bl {
  color: #fff !important;
  font-size: 1.2rem;
  font-style: normal;
  line-height: 1.25;
}

.m-navbar-tools .woocommerce__first-bl:hover,
.m-navbar-tools .woocommerce__last-bl:hover {
  text-decoration: underline;
}

@media screen and (max-width: 1299px) {
  .m-navbar-tools {
    max-width: 34rem;
    gap: .6rem 1rem;
  }

  .m-navbar-tools .search {
    min-width: 12rem;
    max-width: 16rem;
    flex-basis: 14rem;
  }

  .m-navbar-tools .woocommerce__content {
    display: none;
  }

  .m-navbar-menu__link {
    padding: 0 .55rem !important;
    font-size: 1.15rem !important;
  }
}

/* --- Home first screen content --- */
@media screen and (min-width: 992px) {
  .m-header__middle-wrap {
    display: block !important;
    width: 100%;
  }

  .m-header__middle .box-number.header-contacts {
    display: grid !important;
    width: 100% !important;
  }

  .m-header__top {
    padding-top: 0;
    padding-bottom: 0;
  }

  .m-header__bottom,
  .css-color-menu-main {
    position: relative;
    overflow: visible !important;
    z-index: 50 !important;
    background-color: #86addf !important;
  }

  .m-header__bottom.is-stuck {
    position: fixed !important;
    top: var(--aquavip-blue-sticky-top, 3.7rem) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 50 !important;
  }

  .m-header__middle {
    position: relative;
    z-index: 10;
    overflow: visible;
  }

  .m-navbar {
    gap: .8rem 1.2rem;
    overflow: visible !important;
  }

  .m-navbar__button {
    margin-right: 1.2rem !important;
  }

  .desktop-navbar.open,
  .mobile-navbar.open {
    z-index: 52 !important;
  }

  .glavnaya .forcefullwidth_wrapper_tp_banner,
  .glavnaya .rev_slider_wrapper.fullwidthbanner-container {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    overflow: visible;
    max-height: none;
  }

  .glavnaya .stats-wrap {
    padding-top: 1rem;
  }

  .glavnaya .stats-wrap .stats {
    padding: 1.6rem 0 .8rem !important;
  }

  .glavnaya .stats-wrap .stats .stat {
    margin: 1rem 2rem !important;
  }

  .glavnaya .stat__icon {
    margin-bottom: 1rem;
  }

  .glavnaya .advantages-wrap {
    padding-top: 2rem;
  }
}

/* --- Mobile --- */
@media screen and (max-width: 991px) {
  .fish-warn .notif {
    padding: .7rem 3.2rem .7rem 1.2rem;
    font-size: 1.25rem;
    text-align: left;
  }

  .fish-warn__line--secondary {
    font-size: 1.15rem;
  }

  .m-header__middle {
    padding: .55rem 0 .45rem !important;
  }

  .fish-warn .notif {
    padding: .55rem 3rem .55rem 1rem !important;
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
  }

  .m-header__top {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .header-contacts {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "logo logo"
      "sales service"
      "socials socials"
      "hours hours";
    align-items: start;
    justify-items: center;
    text-align: center;
    gap: .5rem .7rem;
    width: 100%;
  }

  .header-contacts > .hc-logo { grid-area: logo; }
  .header-contacts > .hc-sales { grid-area: sales; width: 100%; max-width: 100%; }
  .header-contacts > .hc-service { grid-area: service; width: 100%; max-width: 100%; }
  .header-contacts > .hc-socials { grid-area: socials; width: 100%; }
  .header-contacts > .hc-hours { grid-area: hours; width: 100%; }
  .header-contacts > .hc-fish,
  .header-contacts > .hc-meta { display: none !important; }

  .header-contacts .hc-logo .imglogo,
  .header-contacts .hc-logo img {
    max-height: 4.6rem;
  }

  .header-contacts__col .number-list {
    align-items: center;
  }

  .header-contacts__meta {
    display: none !important;
  }

  .m-header__middle .header-contacts__fish-note {
    display: none !important;
  }

  .m-header__middle .number-list__link {
    justify-content: center !important;
    font-size: 1.35rem !important;
  }

  .m-header__middle .hc-hours .timing {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .15rem .55rem;
    text-align: center;
  }

  .m-header__middle ul.options#ver4 {
    justify-content: center;
  }

  .m-header__middle .mess,
  .header-contacts__socials {
    width: 100%;
  }

  .m-navbar-tools {
    display: none !important;
  }

  body.home-page .m-header {
    padding-top: 3.7rem;
  }

  .m-header__bottom.is-stuck {
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  }

  .m-header__bottom .m-navbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .m-header__bottom .m-navbar__button {
    width: auto !important;
    max-width: 100%;
    flex: 1 1 auto;
    margin-right: 0 !important;
  }
}

@media screen and (max-width: 767px) {
  .fish-warn__mini {
    font-size: 1.15rem;
    padding: .4rem .8rem;
  }

  .m-header__middle .header-contacts__fish-note {
    font-size: 1.15rem;
    max-width: 22rem;
  }
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
  .header-contacts {
    gap: 1.2rem 1.4rem;
  }

  .header-contacts__title {
    font-size: 1.1rem;
  }

  .m-header__middle .number-list__link {
    font-size: 1.45rem !important;
  }

  .header-contacts__note,
  .header-contacts__note a {
    font-size: 1.1rem !important;
  }

  .m-header__middle .header-contacts__fish-note {
    font-size: 1.1rem;
    max-width: 15rem;
  }
}

@media screen and (min-width: 600px) and (max-width: 991px) {
  .header-contacts {
    justify-items: stretch;
    text-align: left;
  }

  .header-contacts__col .number-list {
    align-items: flex-start;
  }

  .m-header__middle .number-list__link {
    justify-content: flex-start !important;
  }
}


/* Kill theme floats/heights that cause overlaps in the new layout */
.m-header__middle .header-contacts .moytext,
.m-header__middle .header-contacts__note,
.m-header__middle .header-contacts__note a {
  float: none !important;
  clear: none !important;
}

.m-header__middle ul.options#ver4 {
  overflow: visible !important;
  height: auto !important;
  text-align: left !important;
  margin: 0 !important;
}

.m-header__middle ul.options#ver4 > li {
  height: auto !important;
  float: none !important;
}

.m-header__middle ul.options#ver4 > li::before {
  display: none !important;
}

/* Red availability note — own column */
.m-header__middle .header-contacts__fish-note {
  display: block;
  margin: 0;
  max-width: 100%;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  color: #e30613;
  text-align: left;
  white-space: normal;
  float: none !important;
  clear: none !important;
}
