@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=Open+Sans:wght@400;600;700&family=Poppins:wght@600;700&display=swap');

/* Shared WordPress-like layout + Header and Footer styles */

/* Global container + page wrapper for WordPress-style /free pages */
.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
  margin: auto;
  position: relative;
  padding: 0 clamp(30px, 5vw, 50px);
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Base typography for WordPress-like free pages */
.page-wrapper {
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: #000;
  background-color: #fff;
}

.page-wrapper h1,
.page-wrapper h2,
.page-wrapper h3,
.page-wrapper h4,
.page-wrapper h5,
.page-wrapper h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

.page-wrapper a {
  text-decoration: none;
  color: inherit;
}

.page-wrapper ul {
  list-style: none;
}

.page-wrapper img {
  max-width: 100%;
  height: auto;
}

/* Header */
.header--wp-shell {
  background: #ffffff;
}

.header__shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.header__brand a {
  display: inline-flex;
  line-height: 0;
}

.header__logo {
  width: 162px;
  height: auto;
  display: block;
}

.header__nav {
  margin-left: auto;
}

.header__nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.header__nav-item {
  position: relative;
}

.header__nav-link,
.header__nav-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1rem, 0.96rem + 0.15vw, 1.125rem);
  font-weight: 500;
  color: #18212b;
  line-height: 1.9;
  letter-spacing: -0.1px;
}

.header__nav-link strong,
.header__nav-button strong {
  font-weight: 700;
}

.header__nav-button {
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Profile accents: Free = green, Premium = blue, neutral = light blue (same colours as the home buttons). */
.header--free { --profile-accent: #2d9c0b; }
.header--premium { --profile-accent: #21638c; }
.header--neutral { --profile-accent: #47a1c5; }

.page-wrapper .header__nav-link,
.page-wrapper .header__nav-button {
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-decoration-color: transparent;
  text-underline-offset: 8px;
}

.page-wrapper .header__nav-link.is-active,
.page-wrapper .header__nav-button.is-active {
  text-decoration-color: var(--profile-accent, #47a1c5);
}

.page-wrapper .header__nav-link:hover,
.page-wrapper .header__nav-button:hover {
  text-decoration-color: color-mix(in srgb, var(--profile-accent, #47a1c5) 45%, transparent);
}

.page-wrapper .header__nav-link.is-active:hover,
.page-wrapper .header__nav-button.is-active:hover {
  text-decoration-color: var(--profile-accent, #47a1c5);
}

/* The Account menu sits at the right edge: open it towards the left so it never widens the page. */
@media (min-width: 768px) {
  .header__nav-item--dropdown > .header__submenu,
  .header__nav-item--dropdown > .header__submenu.open {
    left: auto;
    right: 0;
    transform: none;
  }
}

.header__badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 16px;
  border-radius: 15px;
  background: #47a1c5;
  color: #ffffff !important;
  font-family: 'Manrope', sans-serif;
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.6;
  text-decoration: none !important;
}

.header__badges {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.header__badges::after {
  content: '';
  width: 1px;
  height: 22px;
  margin-left: 14px;
  background: #d9dde4;
  flex-shrink: 0;
}

.header__badge--free { background: #2d9c0b; }
.header__badge--premium { background: #21638c; }

/* The profile the user is not on: grey, but clickable. It lights up in its own colour on hover. */
.header__badge.is-inactive {
  background: #e4e7ec;
  color: #8a929d !important;
}

.header__badge.is-inactive:hover,
.header__badge.is-inactive:focus-visible {
  color: #ffffff !important;
}

.header__badge--free.is-inactive:hover,
.header__badge--free.is-inactive:focus-visible { background: #2d9c0b; }
.header__badge--premium.is-inactive:hover,
.header__badge--premium.is-inactive:focus-visible { background: #21638c; }

.header__badge-mobile {
  display: none;
}

.header__nav-item--badge {
  margin-right: 6px;
}

.header__nav-caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.header__submenu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  min-width: 220px;
  padding: 8px 0;
  margin: 0;
  background: #ffffff;
  border: 1px solid #d9dde4;
  border-radius: 0;
  box-shadow: none;
  transform: translateX(-50%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 30;
}

.header__submenu.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.header__submenu-item {
  margin: 0;
}

.header__submenu-link {
  display: block;
  padding: 7px 18px;
  font-family: 'Open Sans', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  color: #243547;
  white-space: nowrap;
}

.header__submenu-link:hover,
.header__submenu-link.is-active {
  background: #f4f8fb;
  color: #59b11a;
}

/* Language switcher (flag + arrow at the end of the menu) */
.header__nav-item--lang .header__nav-button {
  gap: 7px;
}

.header__lang-flag {
  display: block;
  flex: none;
  width: 22px;
  height: 15px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(24, 33, 43, 0.18);
}

.header__lang-code {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.header__submenu--lang {
  min-width: 200px;
}

.header__lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 766px) {
  .header__nav-item--lang .header__nav-button {
    justify-content: flex-start;
  }

  .header__nav-item--lang .header__nav-caret {
    margin-left: auto;
  }
}

.header__submenu-item--logout {
  border-top: 1px solid #edf2f7;
  margin-top: 4px;
  padding-top: 4px;
}

.header__hamburger {
  display: none;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}

.header__hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  margin-bottom: 6px;
  background: #18212b;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.header__hamburger-line:last-child {
  margin-bottom: 0;
}

.header__hamburger.open .header__hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.header__hamburger.open .header__hamburger-line:nth-child(2) {
  opacity: 0;
}

.header__hamburger.open .header__hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media screen and (max-width: 766px) {
  .header__shell {
    /* Scale the brand and badges together, reserving space for the menu button. */
    --header-mobile-padding: clamp(16px, 4vw, 30px);
    --header-mobile-unit: min(1px, calc((100vw - 2 * var(--header-mobile-padding) - 32px) / 360));
    position: relative;
    gap: calc(12 * var(--header-mobile-unit));
    padding-left: var(--header-mobile-padding);
    padding-right: var(--header-mobile-padding);
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .header__brand {
    flex: 0 0 auto;
  }

  .header__logo {
    width: calc(162 * var(--header-mobile-unit));
  }

  .header__hamburger {
    display: block;
    flex: 0 0 32px;
    margin-left: auto;
  }

  /* On phones the profile badge stays visible next to the logo; the copy inside the menu is hidden. */
  .header__badge-mobile {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .header__badge-mobile .header__badges {
    gap: calc(6 * var(--header-mobile-unit));
  }

  .header__badge-mobile .header__badge {
    font-size: calc(14 * var(--header-mobile-unit));
    padding: calc(4 * var(--header-mobile-unit)) calc(12 * var(--header-mobile-unit));
    border-radius: calc(15 * var(--header-mobile-unit));
    white-space: nowrap;
  }

  .header__badge-mobile .header__badges::after {
    height: calc(22 * var(--header-mobile-unit));
    margin-left: calc(8 * var(--header-mobile-unit));
  }

  .header__nav-item--badge {
    display: none;
  }

  .header__nav {
    position: absolute;
    top: calc(100% - 4px);
    left: 20px;
    right: 20px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid #e4e9ef;
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(16, 32, 48, 0.1);
    display: none;
    z-index: 40;
  }

  .header__nav.open {
    display: block;
  }

  .header__nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .header__nav-link,
  .header__nav-button {
    justify-content: space-between;
    width: 100%;
    padding: 10px 0;
    font-size: 18px;
    line-height: 1.5;
  }

  .header__submenu {
    position: static;
    min-width: 0;
    padding: 8px 0 4px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    display: none;
  }

  .header__submenu.open {
    display: block;
    transform: none;
  }

  .header__submenu-link {
    padding: 9px 0 9px 18px;
    font-size: 15px;
  }
}

/* Footer */
.footer--wp-shell {
  padding-top: 56px;
}

.footer__shell {
  padding-bottom: 92px;
}

.footer__wrapper {
  display: grid;
  grid-template-columns: 40% 35% 25%;
  align-items: start;
}

.footer__brand {
  color: #686868;
}

.footer__brand-logo {
  width: 184px;
  height: auto;
}

.footer__brand-subtitle {
  margin: 2px 0 0;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(14px, 0.875rem + ((1vw - 3.2px) * 0.196), 16px);
  font-weight: 400;
  color: #686868;
}

.footer__brand-meta {
  display: flex;
  align-items: center;
  margin-top: 131px;
}

.footer__brand-badges {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
}

.footer__badge {
  display: block;
  height: auto;
  flex: 0 0 auto;
}

.footer__badge--net {
  width: 88px !important;
  margin-left: 6px;
}

.footer__brand-support {
  margin: 0 0 0 6px;
  max-width: 154px;
  font-family: 'Manrope', sans-serif;
  font-size: clamp(0.8rem, 0.79rem + ((1vw - 0.2rem) * 0.02), 0.84rem);
  font-weight: 600;
  line-height: 1.35;
  color: #686868;
}

.footer__middle-spacer {
  min-width: 0;
}

.footer__nav-column {
  display: flex;
  justify-content: flex-end;
}

.footer__nav {
  display: block;
}

.footer__nav-list {
  margin: 0;
  padding: 0;
  text-align: right;
}

.footer__nav-item + .footer__nav-item {
  margin-top: 8px;
}

.footer__nav-link {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: #111111;
  line-height: 1.6;
}

.footer__nav-link:hover {
  text-decoration: underline;
}

@media screen and (max-width: 900px) {
  .footer__wrapper {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer__brand,
  .footer__middle-spacer,
  .footer__nav-column {
    max-width: 100%;
  }

  .footer__middle-spacer {
    display: none;
  }

  .footer__brand-meta {
    margin-top: 40px;
    flex-wrap: wrap;
    row-gap: 16px;
  }

  .footer__brand-support {
    margin-left: 0;
    max-width: none;
    width: 100%;
  }

  .footer__nav {
    justify-content: flex-start;
  }

  .footer__nav-list {
    text-align: left;
  }
}
