/*
 * tpl_msg template.css
 * Version 1.0.3
 *
 * Base layout only: header, menu, mobile panel, footer and back to top.
 * Every selector uses a single class (low specificity) so any rule in custom.css wins
 * without !important. Do not edit this file per client, use custom.css instead.
 *
 * Mobile first. Desktop rules start at 992px.
 */

/* Variables. Colors set in the template administrator override these. */
:root {
  --msg_header_bg: #ffffff;
  --msg_header_opacity: 100%;
  --msg_header_text: #1b1f24;
  --msg_header_hover: #0a58ca;
  --msg_transparent_text: #ffffff;
  --msg_cta_bg: #0a58ca;
  --msg_cta_text: #ffffff;
  --msg_mobile_bg: #ffffff;
  --msg_mobile_text: #1b1f24;
  --msg_container_width: 1200px;
  --msg_gutter: 20px;
  --msg_header_height: 72px;
  --msg_speed: 0.4s;
  --msg_ease: cubic-bezier(0.65, 0, 0.35, 1);
  --msg_font: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 992px) {
  :root {
    --msg_gutter: 32px;
    --msg_header_height: 88px;
  }
}

html {
  scroll-padding-top: var(--msg_header_height);
}

html.msg_menu_open,
html.msg_menu_open body {
  overflow: hidden;
}

body {
  font-family: var(--msg_font);
  overflow-x: clip;
}

/* Helpers */
.msg_container {
  width: 100%;
  max-width: calc(var(--msg_container_width) + (var(--msg_gutter) * 2));
  margin-inline: auto;
  padding-inline: var(--msg_gutter);
}

.msg_sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.msg_skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 16px;
  background: #000000;
  color: #ffffff;
  transform: translateY(-200%);
}

.msg_skip:focus {
  transform: none;
}

/* Header */
.msg_header {
  position: relative;
  z-index: 1000;
  background: var(--msg_header_bg);
  background: color-mix(in srgb, var(--msg_header_bg) var(--msg_header_opacity), transparent);
  color: var(--msg_header_text);
  transition: transform var(--msg_speed) var(--msg_ease), background-color 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.msg_header_fixed .msg_header,
.msg_header_smart .msg_header {
  position: sticky;
  top: 0;
}

.msg_header.is_scrolled {
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.msg_header.is_hidden {
  transform: translateY(-100%);
}

/* Transparent header over the hero */
.msg_header.is_transparent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  color: var(--msg_transparent_text);
}

.msg_header_fixed .msg_header.is_transparent,
.msg_header_smart .msg_header.is_transparent {
  position: fixed;
}

.msg_header.is_transparent.is_scrolled {
  background: var(--msg_header_bg);
  background: color-mix(in srgb, var(--msg_header_bg) var(--msg_header_opacity), transparent);
  color: var(--msg_header_text);
}

.msg_header.is_open {
  background: var(--msg_mobile_bg);
  color: var(--msg_mobile_text);
  box-shadow: none;
}

.msg_header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--msg_header_height);
}

/* Topbar (module position "topbar") */
.msg_topbar {
  font-size: 0.875rem;
  padding-block: 6px;
}

.msg_topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}

/* Logo */
.msg_logo {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
}

.msg_logo__img,
.msg_logo__img_alt {
  width: auto;
  max-height: 40px;
}

/* SVG logos have no fixed pixel size, so they get an explicit height and the width follows */
.msg_logo__img.is_svg,
.msg_logo__img_alt.is_svg {
  height: 40px;
}

.msg_logo__img_alt {
  display: none;
}

.msg_header.is_transparent:not(.is_scrolled):not(.is_open) .msg_logo.has_alt .msg_logo__img {
  display: none;
}

.msg_header.is_transparent:not(.is_scrolled):not(.is_open) .msg_logo.has_alt .msg_logo__img_alt {
  display: block;
}

.msg_logo__text {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Call to action */
.msg_cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 0;
  border-radius: 6px;
  background: var(--msg_cta_bg);
  color: var(--msg_cta_text);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.msg_cta:hover {
  filter: brightness(1.1);
}

.msg_cta:active {
  transform: scale(0.98);
}

/* Burger button: three lines that turn into an X while the box spins */
.msg_burger {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.msg_burger__box {
  position: relative;
  display: block;
  width: 26px;
  height: 18px;
  transition: transform var(--msg_speed) var(--msg_ease);
}

.msg_burger__line {
  position: absolute;
  left: 0;
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: top var(--msg_speed) var(--msg_ease), transform var(--msg_speed) var(--msg_ease), opacity 0.2s ease;
}

.msg_burger__line:nth-child(1) {
  top: 0;
}

.msg_burger__line:nth-child(2) {
  top: 8px;
}

.msg_burger__line:nth-child(3) {
  top: 16px;
}

.msg_burger[aria-expanded="true"] .msg_burger__box {
  transform: rotate(180deg);
}

.msg_burger[aria-expanded="true"] .msg_burger__line:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

.msg_burger[aria-expanded="true"] .msg_burger__line:nth-child(2) {
  opacity: 0;
}

.msg_burger[aria-expanded="true"] .msg_burger__line:nth-child(3) {
  top: 8px;
  transform: rotate(135deg);
}

/* Panel: full screen menu on mobile, slides in from the left */
.msg_panel {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: calc(var(--msg_panel_top, var(--msg_header_height)) + 16px) var(--msg_gutter) 40px;
  background: var(--msg_mobile_bg);
  color: var(--msg_mobile_text);
  overflow-y: auto;
  overscroll-behavior: contain;
  transform: translateX(-100%);
  visibility: hidden;
}

.msg_header.is_open .msg_panel {
  transform: none;
  visibility: visible;
}

/*
 * The slide animation only runs while the menu is being opened or closed
 * (template.js adds is_animating for that moment). Without this, resizing the
 * window across the breakpoint would animate the panel out and flash the whole
 * screen with the mobile menu color.
 */
@media (max-width: 991.98px) {
  .msg_header.is_animating .msg_panel {
    transition: transform var(--msg_speed) var(--msg_ease), visibility 0s linear var(--msg_speed);
  }

  .msg_header.is_animating.is_open .msg_panel {
    transition: transform var(--msg_speed) var(--msg_ease), visibility 0s;
  }
}

/* Menu (mobile) */
.msg_nav__list,
.msg_subnav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.msg_nav__list {
  display: flex;
  flex-direction: column;
}

.msg_nav__item,
.msg_subnav__item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.msg_nav__item {
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.msg_nav__link,
.msg_subnav__link {
  flex: 1;
  display: block;
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.msg_nav__link {
  padding-block: 14px;
  font-size: 1.25rem;
  font-weight: 600;
}

.msg_subnav__link {
  padding-block: 10px;
  font-size: 1.05rem;
}

.msg_nav__link:hover,
.msg_subnav__link:hover,
.msg_nav__item.is_active > .msg_nav__link,
.msg_subnav__item.is_active > .msg_subnav__link {
  color: var(--msg_header_hover);
}

.msg_nav__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.msg_nav__arrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease;
}

.msg_nav__arrow[aria-expanded="true"]::before {
  transform: rotate(225deg);
}

.msg_subnav {
  display: none;
  width: 100%;
  padding: 0 0 10px 16px;
}

li.is_open > .msg_subnav {
  display: block;
}

.msg_panel > .msg_cta {
  width: 100%;
  padding-block: 16px;
  font-size: 1.1rem;
}

/* Desktop header and dropdowns */
@media (min-width: 992px) {
  .msg_burger {
    display: none;
  }

  .msg_panel {
    position: static;
    z-index: auto;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    margin-left: auto;
    padding: 0;
    background: transparent;
    color: inherit;
    overflow: visible;
    transform: none;
    visibility: visible;
    transition: none;
  }

  .msg_nav__list {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .msg_nav__item {
    position: relative;
    flex-wrap: nowrap;
    border: 0;
  }

  .msg_nav__link {
    padding: 8px 12px;
    font-size: 1rem;
    font-weight: 500;
  }

  .msg_nav__item.has_children > .msg_nav__link {
    padding-right: 4px;
  }

  .msg_nav__arrow {
    width: 24px;
    height: 32px;
  }

  .msg_nav__arrow::before {
    width: 6px;
    height: 6px;
  }

  .msg_subnav {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    display: block;
    width: auto;
    min-width: 220px;
    padding: 8px 0;
    border-radius: 6px;
    background: var(--msg_header_bg);
    color: var(--msg_header_text);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }

  .msg_nav__item:hover > .msg_subnav,
  .msg_nav__item:focus-within > .msg_subnav,
  .msg_nav__item.is_open > .msg_subnav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .msg_subnav__link {
    padding: 10px 20px;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  /* Third level stays inside the same dropdown, indented */
  .msg_subnav .msg_subnav {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 4px 12px;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .msg_subnav .msg_nav__arrow {
    display: none;
  }

  .msg_panel > .msg_cta {
    width: auto;
    padding: 12px 24px;
    font-size: 1rem;
  }
}

/* Main: empty and full width. Each section of your design controls its own background. */
.msg_main {
  display: block;
}

.msg_main:focus {
  outline: none;
}

.msg_article_title {
  padding-block: 40px 24px;
}

/* Footer */
.msg_footer {
  background: #f4f5f7;
  color: #1b1f24;
}

.msg_footer__cols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-block: 48px;
}

@media (min-width: 640px) {
  .msg_footer__cols_2,
  .msg_footer__cols_3,
  .msg_footer__cols_4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .msg_footer__cols_3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .msg_footer__cols_4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.msg_footer__col h3 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.msg_footer__col ul {
  list-style: none;
  padding: 0;
}

.msg_menu__sub {
  margin-top: 6px;
  padding-left: 12px;
}

.msg_footer__col li + li {
  margin-top: 6px;
}

.msg_footer__col a {
  text-decoration: none;
}

.msg_footer__col a:hover {
  text-decoration: underline;
}

.msg_footer__bottom {
  border-top: 1px solid rgba(128, 128, 128, 0.25);
  padding-block: 20px;
  font-size: 0.875rem;
}

/* Back to top */
.msg_totop {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--msg_cta_bg);
  color: var(--msg_cta_text);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.msg_totop.is_visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

html.msg_menu_open .msg_totop {
  opacity: 0;
  visibility: hidden;
}

/* Error page */
.msg_error {
  padding-block: calc(var(--msg_header_height) + 64px) 96px;
  text-align: center;
}

.msg_error__code {
  font-size: clamp(4rem, 12vw, 8rem);
  font-weight: 800;
  line-height: 1;
}

.msg_error__title {
  margin-block: 16px 12px;
}

.msg_error__text {
  margin-bottom: 28px;
  opacity: 0.8;
}

.msg_error__debug {
  margin-top: 40px;
  text-align: left;
  overflow-x: auto;
}

/* Offline page */
.msg_offline {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: #f4f5f7;
}

.msg_offline__card {
  width: 100%;
  max-width: 400px;
  padding: 32px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.msg_offline__logo {
  margin-bottom: 20px;
}

.msg_offline__text {
  margin-bottom: 20px;
}

.msg_offline__form {
  display: grid;
  gap: 8px;
}

.msg_offline__form input {
  padding: 10px 12px;
  border: 1px solid #c9ced6;
  border-radius: 6px;
}

.msg_offline__form .msg_cta {
  margin-top: 12px;
}
