.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}
.mega-parent > a.mega-parent-link {
  color: #002e4d;
  font-weight: 600;
  font-size: 16px;
  position: relative;
  padding-bottom: 4px;
  transition: 0.25s;
}
.mega-parent > a.mega-parent-link:hover {
  color: #003C71;
}
.mega-menu-container {
  position: absolute;
  top: 23px;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 28px;
  padding: 20px 15px 25px;
  max-width: 90vw;
  border: 1px solid rgba(255, 255, 255, 0.98);
  box-shadow: 0 26px 60px rgba(0, 40, 90, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  z-index: 9999;
}
.mega-parent:hover > .mega-menu-container {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.mega-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: #7A8B9A;
  margin-bottom: 18px;
}
.mega-menu-row {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.mega-col {
  display: flex;
  flex-direction: column;
}
.mega-col-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: #7b8da1;
  margin-bottom: 6px;
  padding-left: 2px;
  font-weight: 600;
}
.mega-sub {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.mega-sublink {
  display: flex;
  align-items: flex-start;
  padding: 10px;
  border-radius: 16px;
  transition: background 0.25s, box-shadow 0.25s, transform 0.25s;
}
.mega-sublink:hover {
  background: rgba(236, 245, 255, 0.9);
  box-shadow: 0 6px 18px rgba(0, 60, 113, 0.12);
  transform: translateY(-1px);
}
.mega-text-title {
  font-size: 15px;
  color: #00315c;
  margin-bottom: 2px;
}
a:hover .mega-text-title,
a:active .mega-text-title
{
  color: #0050A8;
}
.mega-text-sub {
  font-size: 13px;
  line-height: 1.38;
  color: #6C7A89;
  max-width: 240px;
}
.mega-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: #003C71;
  margin-bottom: 2px;
}

.mega-subdesc {
  font-size: 12px;
  color: #7b8da1;
  line-height: 1.4;
  font-weight: 400;
}

.mobile-contacts {
  display: none;
}
.mobile-burger {
  display: none;
  width: 28px;
  height: 20px;
  flex-direction: column;
  justify-content: space-between;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-left: auto;
}
.mobile-burger span {
  display: block;
  height: 3px;
  width: 100%;
  background: #003C71;
  border-radius: 3px;
}

.mobile-menu-close,
.mobile-submenu-panel
{
  display: none;
}

@media (min-width: 1120px) {
  .nav-list > li.menu-item-has-children > a.mega-parent-link {
    padding-right: 15px;
  }

  .nav-list > li.menu-item-has-children > a.mega-parent-link::before {
    content: "";
    position: absolute;
    right: 0;
    top: 9px;
    width: 5px;
    height: 5px;
    border-right: 2px solid #002e4d;
    border-bottom: 2px solid #002e4d;
    transform: translateY(-60%) rotate(45deg);
    pointer-events: none;
  }

  .nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
  }
  .mega-parent > a.mega-parent-link::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #003C71, rgba(0,118,255,0.4));
    border-radius: 999px;
    transition: width .3s;
  }
  .mega-parent:hover > a.mega-parent-link::after {
    width: 100%;
  }
}
@media (max-width: 1435px) and (min-width: 1120px) {
  .mega-menu-container {
    min-width: 850px;
  }
  .mega-subtitle {
    font-size: 13px;
  }
}
@media (max-width: 1330px) {
  .nav-list {
    gap: 25px;
  }
}
@media (max-width: 1250px) {
  .nav-list {
    gap: 15px;
  }
  .mega-parent > a.mega-parent-link {
      font-size: 14px;
  }
}
@media (max-width: 1119px) {
  .mobile-burger {
    display: flex;
  }
  .header-right {
    display: none;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 360px;
    height: calc(100dvh + env(safe-area-inset-bottom));
    min-height: 100dvh;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-shadow: -8px 0 26px rgba(0,40,90,0.26);
    padding: 50px 22px 26px 22px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    transform: translateX(100%);
    transition: transform .35s ease;
    z-index: 9998;
    overflow-y: auto;
    border-left: 1px solid rgba(0,60,113,0.1);
  }
  .main-nav.open {
    display: block;
    animation: slideInNav .35s ease forwards;
    pointer-events: auto;
  }
  .main-nav.no-scroll {
    overflow: hidden;
  }
  @keyframes slideInNav {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }
  body.mobile-menu-open {
    overflow: hidden;
    touch-action: none;
  }
  .main-nav.open .mobile-menu-close {
    display: block;
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 34px;
    line-height: 21px;
    cursor: pointer;
    color: #0B2D5C;
    z-index: 10;
  }
  .mobile-submenu-panel.open {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 360px;
    height: calc(100dvh + env(safe-area-inset-bottom));
    min-height: 100dvh;
    background: #ffffff;
    box-shadow: -8px 0 26px rgba(0,40,90,0.26);
    z-index: 9999;
    padding: 20px 22px 40px;
    display: flex;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    transition: right .35s ease;
  }

  .submenu-header {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
  }
  .submenu-back {
    border: none;
    background: none;
    font-size: 17px;
    font-weight: 600;
    margin-right: 10px;
    color: #003C71;
    cursor: pointer;
  }
  .submenu-list .m-col-block {
    margin-bottom: 22px;
    border-bottom: 1px solid rgba(0,60,113,0.1);
    padding-bottom: 12px;
  }
  .submenu-list .m-col-block:last-child {
    margin-bottom: 0;
    border-bottom:none;
    padding-bottom: 0;
  }
  .m-contact-title,
  .m-col-title{
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #7A8B9A;
    margin-bottom: 10px;
    font-weight: 600;
  }
  .m-contact-title {
    margin: 15px 0;
  }
  .nav-list > li.menu-item-has-children {
    position: relative;
  }
  .nav-list > li.menu-item-has-children > a::after {
    content: "›";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: 500;
    color: #003C71;
    opacity: .85;
    transition: .25s ease;
    pointer-events: none;
  }
  .m-single-link a,
  .nav-list li a,
  .mega-parent > a.mega-parent-link {
    display: block;
    width: 100%;
    padding: 15px 0;
    font-weight: 600;
    font-size: 16px;
    color: #002e4d;
  }
  .mega-menu-container {
    display: none !important;
  }
  .mobile-contacts {
    display: block;
    margin-top: 28px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,60,113,0.15);
    text-align: center;
  }
  .mobile-contacts a {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #003C71;
  }
  .m-contact-address {
    font-size: 14px;
    color: #002e4d;
    line-height: 1.45;
  }
  .header-lang,
  .socials
  {
    margin-top: 15px;
  }
  .socials {
    justify-content: center;
  }
  .mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
    z-index: 8888;
    cursor: pointer;
  }
  .mobile-menu-open .mobile-overlay {
    opacity: 1;
    visibility: visible;
  }
}
