.primary-footer {
  position: relative;
  min-height: 40rem;
  background: url(/wp-content/themes/kla-wp/assets/images/footer/footer-pattern.png), 
              linear-gradient(to bottom, #41007f, #007bc6);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1.8rem;
  overflow: hidden;
  min-height: 40rem;
}

.landing-simple .primary-footer {
  background: linear-gradient(to bottom, #41007f, #aa1dd5);
}

.landing-instruments .primary-footer {
  background: linear-gradient(90deg, #41007F 0%, #AA1DD5 100%);
  box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.15);
}

.landing-instruments .primary-footer .inner--footer > div {
  column-gap: 16.7rem;
}
.landing-instruments .primary-footer .inner--footer p {
  font-size: 2.4rem;
}

.primary-footer .logo {
  margin-bottom: 4rem;
}

.primary-footer a,
.primary-footer a:visited {
  color: #fff;
  white-space: nowrap;
  opacity: 1;
  transition: 0.3s all ease-in-out;
}

.primary-footer a.open-cookie-settings {
  cursor: pointer;
}

.primary-footer a.open-cookie-settings:hover {
  opacity: 1;
  color: #00A7E1;
}


.primary-footer__menu .current-menu-item > a,
.primary-footer__menu .current-menu-parent > a,
.primary-footer__menu .current-menu-ancestor > a,
.primary-footer__menu .current_page_parent > a,
.primary-footer__menu .current-page-ancestor > a,
.primary-footer__menu .current_page_ancestor > a,
.primary-footer__menu .current-product-parent > a { 
  opacity: 0.5;
}

.primary-footer__sub-menu a:hover,
.primary-footer__menu a:hover,
.primary-footer__sub-menu a:visited:hover,
.primary-footer__menu a:visited:hover  { opacity: 1; color: #00A7E1 }

.primary-footer__subsection * { line-height: 1.3; }

.primary-footer .inner { position: relative;}

.primary-footer__copyright {
  opacity: 0.7;
  font-size: 1.5rem;
}

/* LOGO */
.primary-footer .logo {
  height: 3rem;
}

.landing-instruments .primary-footer .logo {
  height: auto;
}

[lang="ko"] .social-media p { font-weight: 700; }

.social-media {
  font-size: 1.5rem;
  margin-bottom: 4rem;
}

.social-media p { line-height: 2rem }
.social-media li:not(:last-of-type) { margin-right: 1rem }

.primary-footer__sub-menu li:not(:last-of-type) {
  margin-right: 2rem;
}

.social-media__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 4rem;
  height: 4rem;
  font-size: 0;
}

.primary-footer .social-media__icon:hover { opacity: 1 }

/* WeChat update */
.wechat-trigger{
  cursor: pointer;
}
.wechat-overlay{
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background-color: hsla(0,2%,35%,.85);
  overflow-x: hidden;
  overflow-y: scroll;
}
.wechat-overlay.active{
  display: flex;
  transition: all .3s ease;
}
.wechat-overlay .wechat-overlay--content{
  width: max-content;
  height: inherit;
  margin: 0 auto;
  padding: 0;
  flex-direction: column;
  justify-content: center;
}
.wechat-overlay .wechat-overlay--content p{
  margin-top: 2rem;
}

/* KLA Time Magazine Special US Footer */
.kla_logo {
  grid-area: logo;
  margin-block-end: auto;
}
.primary-footer__menu {
  grid-area: nav;
}
.primary-footer__subsection {
  grid-area: subsection;
}
.social-media {
  grid-area: social;
}
.time_magazine_2024 {
  grid-area: time_magazine_2024;
  max-width: 315px;
  width: 100%;
  margin-block-end: 40px;
}
.footer_grid {
  display: grid;
  grid-template-columns: auto;
  grid-template-areas: 
    "logo"
    "time_magazine_2024"
    "social"
    "subsection";
}

/* ja no social media special footer */

html[lang="ja"] .primary-footer {
  .social-media {
    display: none;
  }

  @media only screen and (width < 768px) {
    min-height: 23rem;
  }

  @media only screen and (width < 1024px) {
    .inner > div.flex {
      flex-wrap: nowrap;
      margin-block-start: 2rem;
    }
  }
}

/* Tablet */

@media only screen and (min-width: 768px) {
  .primary-footer {
    background: url(/wp-content/themes/kla-wp/assets/images/footer/footer-pattern.png), 
                linear-gradient(to right, #41007f, #007bc6);
    min-height: auto;
  }

  .landing-simple .primary-footer {
    background: linear-gradient(to right, #41007f, #aa1dd5);
  }

  .landing-simple .primary-footer__copyright {
    margin-bottom: 0;
    line-height: 1;
    margin-right: 20px;
  }

  .landing-instruments .primary-footer {
    background: linear-gradient(90deg, #41007F 0%, #AA1DD5 100%);
    box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.15);
  }

  .primary-footer .logo {
    height: 3.8rem;
  }

  .landing-instruments .primary-footer .logo {
    height: auto;
  }

  .social-media {
    margin-bottom: 3rem;
    flex: 1 1 auto;
    align-items: flex-end;
  }
  .social-media p { min-width: 19rem; margin-bottom: 1rem; }

  [lang="zh-hans"] .social-media p { min-width: 90px; }

  .footer_grid {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: 
      "logo social"
      "time_magazine_2024 subsection";
    align-items: end;
  }
  .time_magazine_2024 {
    margin-block-end: 0;
  }
}

/* Desktop */

@media only screen and (min-width: 1024px) {
  .primary-footer .logo {
    margin-bottom: 0;
  }
  .primary-footer__menu {
    order: 1;
    font-size: 1.5rem;
    flex: 1 1 auto;
    font-family: 'OpenSans-SemiBold', sans-serif;
  }

  [lang="ko"] .primary-footer__menu {
    font-family: 'NotoSans-Bold', sans-serif;
  }

  .primary-footer__menu>ul {
    display: flex;
  }
  .primary-footer__menu>ul li {
    display: flex;
    align-items: center;
    margin: 0 3rem 0 0;
  }
  .primary-footer__menu>ul li:last-of-type,
  .primary-footer__sub-menu>ul li:last-of-type {
    margin-right: 0;
  }
  .primary-footer__menu .external-light:after {
    top: -0.15em;
  }
  .primary-footer__subsection {
    order: 2;
    margin-top: 6rem;
    flex-basis: 55%;
  }

  [lang="ko"] .primary-footer__subsection {
    flex-basis: auto;
  }

  [lang="ko"] .primary-footer__menu {
    flex: 70%;
  }

  .primary-footer__copyright {
    margin-top: 0;
  }
  .social-media {
    order: 3;
    margin-left: 5rem;
    margin-top: 6rem;
    margin-bottom: 0;
    text-align: center;
    flex: 0 0 auto;
  }
  .footer_grid {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: 
      "logo nav nav"
      "time_magazine_2024 subsection social";
    align-items: center;
  }
  .time_magazine_2024 {
    margin-block-start: 3rem;
  }
}

/* Desktop HD */

@media only screen and (min-width: 1480px) {
  .primary-footer__content {
    padding: 6rem 0;
  }
}

.landing-simple .primary-footer a:first-child {
  margin-right: auto;
}

