/* Static-site behaviour that the original theme handled with JavaScript. */
#header {
  position: relative;
  z-index: 200;
  background: #fff;
}

#header .navbar-brand {
  flex: 0 0 auto;
}

#header .container {
  max-width: 1320px;
}

#header .navbar-logo {
  display: block;
  width: 250px;
  height: auto;
  max-width: none;
}

#header .navbar {
  flex-wrap: nowrap;
  min-height: 104px;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

#header .sm > li > a {
  padding: 1rem 0.65rem;
  font-size: 0.95rem;
}

#header .sm > li > a.has-submenu {
  padding-right: 1.85rem;
}

#header .navbar-btn {
  margin-left: 0.65rem;
}

#header .navbar-btn .btn {
  font-size: 0.85rem;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
}

@media (max-width: 1199.98px) {
  #header .navbar-logo {
    width: 210px;
  }

  #header .sm > li > a {
    padding: 1rem 0.4rem;
    font-size: 0.82rem;
  }

  #header .sm > li > a.has-submenu {
    padding-right: 1.85rem;
  }

  #header .navbar-btn .btn {
    font-size: 0.75rem;
    padding: 0.45rem 0.7rem;
  }
}

@media (max-width: 575.98px) {
  #header .navbar-logo {
    width: 168px;
  }
}

#header .sm > li > a .sub-arrow {
  right: 0.35rem;
  width: 0.7rem;
  margin-top: 0;
  transform: translateY(-50%);
  opacity: 1;
  color: #003057;
}

#header .sm > li > a .sub-arrow:before {
  font-size: 0.65rem;
}

#header .sm > li:hover > a .sub-arrow:before,
#header .sm > li:focus-within > a .sub-arrow:before {
  content: "\f077";
}

@media (min-width: 992px) {
  #header .navbar {
    position: relative;
    align-items: stretch;
  }

  #header .navbar-brand,
  #header .navbar-btn {
    display: flex;
    align-items: center;
  }

  #header .navbar-btn {
    display: flex !important;
  }

  #header .navbar-menu {
    align-items: stretch;
  }

  #header #main-menu-state ~ .navbar-nav,
  #header .sm,
  #header .sm > li {
    display: flex;
    align-items: stretch;
  }

  #header .sm {
    flex: 1 1 auto;
  }

  #header .sm > li > a {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
  }

  #header .sm > li.has-mega-menu {
    position: static;
  }

  #header .sm > li:hover > ul,
  #header .sm > li:focus-within > ul {
    display: block;
  }

  #header .sm > li > ul.mega-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 1.25rem);
    width: 100% !important;
    z-index: 1500;
    padding-top: calc(3rem + 1.25rem);
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 48, 87, 0.12);
  }
}

@media (max-width: 991.98px) {
  #header .sm > li > ul.mega-menu,
  #header .sm > li > ul.sub-menu {
    display: none;
    position: static;
    width: auto !important;
    max-width: none;
    padding: 0.35rem 0 0.85rem;
    background: transparent;
    box-shadow: none;
  }

  #header .sm > li.is-open > ul.mega-menu,
  #header .sm > li.is-open > ul.sub-menu {
    display: block;
  }
}

.langs {
  position: relative;
}

.wpml-ls-legacy-dropdown-click .wpml-ls-sub-menu {
  display: none;
}

.langs:hover .wpml-ls-sub-menu,
.langs:focus-within .wpml-ls-sub-menu {
  display: block;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 2000;
  min-width: 11rem;
  margin: 0;
  padding: 0.35rem 0;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 48, 87, 0.15);
}

.wpml-ls-sub-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  color: #003057;
  white-space: nowrap;
}

/* Heading level was corrected; keep the size the theme used for the old tag. */
h2.heading-level-3,
h3.heading-level-3 {
  font-size: 1.75rem;
}

h2.heading-level-4,
h3.heading-level-4,
h4.heading-level-4 {
  font-size: 1.5rem;
}

h2.heading-level-5,
h3.heading-level-5 {
  font-size: 1.25rem;
}

h2.heading-level-6,
h3.heading-level-6,
h4.heading-level-6 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* Product cards used a fixed box sized for shorter English names. */
.posts .product .post-wrap {
  display: flex;
  flex-direction: column;
}

.posts .product .post-title {
  height: auto;
  overflow: visible;
  font-size: 1.5rem;
}

.posts .product .post-excerpt {
  height: auto;
  overflow: visible;
}

.posts .product .post-wrap > p:last-child {
  margin-top: auto;
}

.ua-missing {
  padding: 2.5rem 0 3rem;
}

.ua-missing p {
  font-size: 1.125rem;
}

form.wpcf7-form .wpcf7-submit:disabled {
  opacity: 0.55;
}

.products-nav {
  position: relative;
  z-index: 30;
}

.products-nav .dropdown-menu {
  min-width: 100%;
  max-height: 70vh;
  overflow-y: auto;
}

/* The poster was shifted left of the play button, which is centered in the cover area. */
@media (min-width: 768px) {
  .post-jumbotron .embed-container {
    overflow: hidden;
  }

  .post-jumbotron .embed-container .post-jumbotron-img {
    top: 0;
    left: 0;
    right: auto;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    transform: none;
    object-fit: cover;
    object-position: center;
  }
}

/* Ukrainian benefit titles are longer than the English source. */
@media (min-width: 992px) {
  .feature-band > .wp-block-group__inner-container {
    max-width: 1320px;
  }

  .feature-band .wp-block-columns > .wp-block-column:not(:first-child) {
    margin-left: 0;
  }

  .feature-band .wp-block-column {
    overflow-wrap: normal;
    word-break: normal;
  }
}

#footer .footer-about {
  max-width: 36rem;
  line-height: 1.65;
}

@media (min-width: 992px) {
  #footer .footer-contacts {
    margin-bottom: 0;
  }
}

#footer .footer-contacts a {
  color: inherit;
}

#footer .footer-products-row {
  margin-top: 1.5rem;
}

#footer ul.footer-nav.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 30px;
}

#footer ul.footer-nav.products > li > a {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-family: Montserrat, sans-serif;
  font-weight: 700;
}

@media (max-width: 991.98px) {
  #footer ul.footer-nav.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1.25rem;
  }
}

@media (max-width: 575.98px) {
  #footer ul.footer-nav.products {
    grid-template-columns: 1fr;
  }
}
