/* ============================================
   Legal Pages - Shared Styles
   Used by: Legal and Regulatory, Privacy Policy
   Root class: .legal-text-page
   ============================================ */

@font-face {
  font-family: "Futura";
  src: local("Futura Medium"), local("Futura-Medium");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Futura";
  src: local("Futura Bold"), local("Futura-Bold");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* --- Hide Salient parent theme header/footer --- */
body.page-template-new-legal #header-outer,
body.page-template-new-legal #header-space,
body.page-template-new-legal #footer-outer,
body.page-template-new-legal #slide-out-widget-area,
body.page-template-new-legal #to-top,
body.page-template-new-privacy #header-outer,
body.page-template-new-privacy #header-space,
body.page-template-new-privacy #footer-outer,
body.page-template-new-privacy #slide-out-widget-area,
body.page-template-new-privacy #to-top {
  display: none !important;
}

body {
  margin: 0;
  padding: 0;
}

.legal-text-page {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  background: #f5f5f7;
  color: #003057;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-text-page *,
.legal-text-page *::before,
.legal-text-page *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

/* ============================================
   Header
   ============================================ */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
}

.legal-header__logo {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
  width: 160px;
}

.legal-header__logo-icon {
  height: 40px;
  width: auto;
  filter: none !important;
}

.legal-header__logo-text {
  height: 30px;
  width: auto;
  filter: none !important;
}

.legal-header__nav {
  display: flex;
  gap: 54px;
  align-items: center;
}

.legal-header__nav-link {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  color: #003057;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

.legal-header__nav-link:hover {
  opacity: 0.7;
}

.legal-header__lang {
  width: 160px;
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
}

.legal-header__lang-btn {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  color: #003057;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.legal-header__mobile-bar {
  display: none;
}

/* ============================================
   Main Content
   ============================================ */
.legal-main {
  flex: 1;
  padding: 40px 204px 80px;
}

.legal-main__title {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-size: 54px;
  font-weight: 500;
  color: #003057;
  line-height: 1;
  margin-bottom: 32px;
}

.legal-main__body {
  max-width: 824px;
}

.legal-main__body p {
  font-family: "Montserrat", sans-serif !important;
  font-size: 16px;
  font-weight: 400;
  color: #666;
  line-height: 1.5;
  text-align: justify;
  margin-bottom: 0;
}

.legal-main__body p + p {
  margin-top: 24px;
}

.legal-main__body h2 {
  font-family: "Montserrat", sans-serif !important;
  font-size: 16px;
  font-weight: 700;
  color: #003057;
  line-height: 1.5;
  margin-top: 48px;
  margin-bottom: 0;
}

.legal-main__body h2 + p {
  margin-top: 0;
}

/* ============================================
   Footer
   ============================================ */
.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
}

.legal-footer__left {
  display: flex;
  gap: 54px;
  align-items: center;
}

.legal-footer__text,
.legal-footer__link {
  font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
  font-size: 14px;
  font-weight: 500;
  color: #003057;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
}

.legal-footer__link {
  transition: opacity 0.3s ease;
}

.legal-footer__link:hover {
  opacity: 0.7;
}

.legal-footer__link.is-active {
  text-decoration: underline;
  text-decoration-color: #bda600;
  text-underline-offset: 4px;
}

.legal-footer__right {
  display: flex;
}

/* ============================================
   RWD - Tablet (< 1024px)
   ============================================ */
@media (max-width: 1024px) {
  .legal-header {
    padding: 20px 24px;
  }
  .legal-header__nav {
    gap: 32px;
  }
  .legal-main {
    padding: 40px 80px 60px;
  }
  .legal-footer {
    padding: 20px 24px;
  }
  .legal-footer__left {
    gap: 32px;
  }
}

/* ============================================
   RWD - Mobile (< 768px)
   ============================================ */
@media (max-width: 768px) {
  /* Header */
  .legal-header {
    padding: 12px 20px 0;
    gap: 22px;
    justify-content: flex-start;
  }

  .legal-header__nav,
  .legal-header__lang {
    display: none;
  }

  .legal-header__logo {
    width: auto;
    gap: 4px;
  }
  .legal-header__logo-icon {
    height: 20px;
  }
  .legal-header__logo-text {
    height: 15px;
    margin-top: 3px;
  }

  .legal-header__mobile-bar {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    height: 67px;
    padding: 20px 20px 20px 10px;
    background: #1c1c1c;
  }

  .legal-header__mobile-lang {
    font-family: "Futura", "Century Gothic", "Trebuchet MS", Arial, sans-serif !important;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    color: #fff;
  }

  .legal-header__hamburger {
    width: 72px;
    height: 20px;
    border: none;
    border-top: 2px solid #fff;
    border-bottom: 2px solid #fff;
    background: none;
    cursor: pointer;
    padding: 0;
  }

  /* Main Content */
  .legal-main {
    padding: 32px 24px 60px;
  }

  .legal-main__title {
    font-size: 36px;
    margin-bottom: 24px;
  }

  .legal-main__body p {
    font-size: 14px;
    text-align: left;
  }

  .legal-main__body h2 {
    font-size: 14px;
    margin-top: 32px;
  }

  /* Footer: 2x2 grid */
  .legal-footer {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "year linkedin"
      "privacy legal";
    justify-content: center;
    justify-items: center;
    align-items: center;
    gap: 24px 19px;
    padding: 16px 12px 32px;
  }

  .legal-footer__left {
    display: contents;
  }
  .legal-footer__right {
    display: contents;
  }
  .legal-footer__text {
    grid-area: year;
  }
  .legal-footer__right .legal-footer__link {
    grid-area: linkedin;
  }
  .legal-footer__left a:nth-of-type(1) {
    grid-area: privacy;
  }
  .legal-footer__left a:nth-of-type(2) {
    grid-area: legal;
  }

  .legal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0 19px;
  }

  .legal-footer::after {
    content: "";
    flex-basis: 100%;
    height: 0;
    order: 3;
  }

  .legal-footer__text {
    order: 1;
  }
  .legal-footer__right .legal-footer__link {
    order: 2;
  }
  .legal-footer__left a:nth-of-type(1) {
    order: 4;
    margin-top: 24px;
  }
  .legal-footer__left a:nth-of-type(2) {
    order: 5;
    margin-top: 24px;
    margin-left: -7px;
  }
}
