.tpm-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 9999;
  background: var(--tpm-white);
  box-shadow: 0 10px 28px rgba(0, 38, 44, 0.08);
  color: var(--tpm-ink);
  pointer-events: auto;
}

.tpm-header .screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body.admin-bar .tpm-header {
  top: 32px;
}

html.tpm-loader-pending,
html.tpm-loader-pending body {
  overflow: hidden;
}

.tpm-loader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 480px 360px at 50% 42%, rgba(3, 139, 165, 0.055), rgba(3, 139, 165, 0) 70%),
    var(--tpm-white);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.tpm-loader::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -120px;
  width: min(520px, 62vw);
  height: min(520px, 62vw);
  background-image: radial-gradient(rgba(239, 0, 67, 0.2) 1.4px, transparent 1.6px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle at top right, #000 0%, rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0) 74%);
  -webkit-mask-image: radial-gradient(circle at top right, #000 0%, rgba(0, 0, 0, 0.58) 42%, rgba(0, 0, 0, 0) 74%);
  pointer-events: none;
}

.tpm-loader::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: min(440px, 58vw);
  height: min(440px, 58vw);
  background-image: radial-gradient(rgba(239, 0, 67, 0.14) 1.4px, transparent 1.6px);
  background-size: 18px 18px;
  mask-image: radial-gradient(circle at bottom left, #000 0%, rgba(0, 0, 0, 0.52) 38%, rgba(0, 0, 0, 0) 72%);
  -webkit-mask-image: radial-gradient(circle at bottom left, #000 0%, rgba(0, 0, 0, 0.52) 38%, rgba(0, 0, 0, 0) 72%);
  pointer-events: none;
}

.tpm-loader__panel {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(260px, calc(100vw - 72px));
  justify-items: center;
  gap: 22px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 240ms ease, transform 240ms ease;
}

.tpm-loader.is-logo-ready .tpm-loader__panel {
  opacity: 1;
  transform: translateY(0);
}

.tpm-loader__brand {
  display: grid;
  min-height: 132px;
  place-items: center;
}

.tpm-loader__logo,
.tpm-loader__fallback {
  grid-area: 1 / 1;
}

.tpm-loader__logo {
  display: block;
  width: min(210px, 64vw);
  min-height: 132px;
  height: auto;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 18px 22px rgba(0, 38, 44, 0.11));
  transition: opacity 180ms ease;
}

.tpm-loader.is-logo-loaded .tpm-loader__logo {
  opacity: 1 !important;
}

.tpm-loader__fallback {
  display: grid;
  justify-items: center;
  color: var(--tpm-teal) !important;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-shadow: 0 12px 22px rgba(0, 38, 44, 0.12);
  text-transform: none;
  transition: opacity 180ms ease;
}

.tpm-loader__fallback strong {
  color: var(--tpm-teal) !important;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.tpm-loader__fallback span {
  margin-top: 5px;
  color: var(--tpm-pink) !important;
  font-size: 21px;
  font-weight: 700;
}

.tpm-loader.is-logo-loaded .tpm-loader__fallback {
  opacity: 0 !important;
}

.tpm-loader__bar {
  display: block;
  width: min(220px, 58vw);
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 39, 43, 0.12);
}

.tpm-loader__bar span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--tpm-teal);
  transform: scaleX(0);
  transform-origin: left center;
}

.tpm-loader.is-logo-ready .tpm-loader__bar span {
  animation: tpm-loader-fill 1050ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.tpm-loader.is-complete .tpm-loader__bar span {
  transform: scaleX(1);
}

.tpm-loader.is-hidden,
html.tpm-loader-skip .tpm-loader {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

@keyframes tpm-loader-fill {
  0% {
    transform: scaleX(0);
  }

  62% {
    transform: scaleX(0.82);
  }

  100% {
    transform: scaleX(1);
  }
}

.tpm-header__topbar {
  background: var(--tpm-teal);
  color: var(--tpm-white);
  font-size: 13px;
  font-weight: 700;
}

.tpm-header__topbar-inner,
.tpm-header__inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.tpm-header__topbar-inner {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.tpm-header__contact-strip,
.tpm-header__social-strip {
  display: flex;
  align-items: center;
  gap: 18px;
}

.tpm-header__contact-strip a,
.tpm-header__social-strip a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--tpm-white) !important;
  line-height: 1;
  text-decoration: none !important;
  transition: opacity 180ms ease;
}

.tpm-header__contact-strip a:hover,
.tpm-header__contact-strip a:focus-visible,
.tpm-header__social-strip a:hover,
.tpm-header__social-strip a:focus-visible {
  opacity: 0.82;
}

.tpm-header__main {
  background: var(--tpm-white);
}

.tpm-header__inner {
  display: grid;
  min-height: 90px;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr) minmax(220px, 284px);
  gap: clamp(20px, 3vw, 42px);
  align-items: center;
}

.tpm-header__brand,
.tpm-header__panel-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  text-decoration: none !important;
}

.tpm-header__logo {
  display: block;
  width: min(230px, 100%);
  height: auto;
  margin-left: 0;
  max-height: 72px;
  object-fit: contain;
}

.tpm-header__pin {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--tpm-pink);
  color: var(--tpm-white);
  font-weight: 900;
}

.tpm-header__name {
  margin-left: 10px;
  color: var(--tpm-teal-dark);
  font-size: 17px;
  font-weight: 800;
}

.tpm-header__nav {
  justify-self: center;
}

.tpm-header__menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 2.5vw, 34px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.tpm-header__item {
  position: relative;
}

.tpm-header__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 33px 0;
  color: var(--tpm-ink) !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  text-transform: none;
  transition: color 180ms ease;
}

.tpm-header__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 23px;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--tpm-pink);
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 180ms ease, transform 180ms ease;
}

.tpm-header__link:hover,
.tpm-header__link:focus-visible,
.tpm-header__link.is-active,
.tpm-header__item.is-active > .tpm-header__link,
.tpm-matriz .tpm-header__link:hover,
.tpm-matriz .tpm-header__link:focus-visible,
.tpm-matriz .tpm-header__link.is-active,
.tpm-matriz .tpm-header__item.is-active > .tpm-header__link {
  color: var(--tpm-pink) !important;
}

.tpm-header__link:hover::after,
.tpm-header__link:focus-visible::after,
.tpm-header__link.is-active::after,
.tpm-header__item.is-active > .tpm-header__link::after {
  opacity: 1;
  transform: scaleX(1);
}

.tpm-header__chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}

.tpm-header__submenu {
  position: absolute;
  top: calc(100% - 10px);
  left: 50%;
  z-index: 20;
  display: grid;
  min-width: 244px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(3, 139, 165, 0.16);
  border-radius: 8px;
  background: var(--tpm-white);
  box-shadow: 0 18px 36px rgba(0, 38, 44, 0.13);
  list-style: none;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.tpm-header__submenu--depth-2 {
  top: -8px;
  left: 100%;
  transform: translate(0, 0);
}

.tpm-header__submenu .tpm-header__item--has-children::after {
  content: "";
  position: absolute;
  top: -8px;
  right: -10px;
  bottom: -8px;
  width: 12px;
}

.tpm-header__item:hover > .tpm-header__submenu,
.tpm-header__item:focus-within > .tpm-header__submenu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.tpm-header__item:hover > .tpm-header__submenu--depth-2,
.tpm-header__item:focus-within > .tpm-header__submenu--depth-2 {
  transform: translate(0, 0);
}

.tpm-header__submenu .tpm-header__link {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 12px 14px;
  border-radius: 6px;
  color: var(--tpm-teal-dark) !important;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  white-space: normal;
}

.tpm-header__submenu .tpm-header__link::after {
  display: none;
}

.tpm-header__submenu .tpm-header__link:hover,
.tpm-header__submenu .tpm-header__link:focus-visible,
.tpm-matriz .tpm-header__submenu .tpm-header__link:hover,
.tpm-matriz .tpm-header__submenu .tpm-header__link:focus-visible {
  background: var(--tpm-teal);
  color: var(--tpm-white) !important;
}

.tpm-header__submenu .tpm-header__chevron {
  transform: rotate(-45deg);
}

.tpm-header__search {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.tpm-header__search input[type="search"] {
  width: 100%;
  min-height: 50px;
  padding: 0 58px 0 22px;
  border: 1px solid rgba(3, 139, 165, 0.24) !important;
  border-radius: 999px !important;
  background: var(--tpm-white);
  color: var(--tpm-ink);
  font-family: var(--tpm-font-body);
  font-size: 13px !important;
  font-weight: 500;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.tpm-header__search input[type="search"]::placeholder {
  color: rgba(24, 39, 43, 0.68);
  font-size: 13px !important;
}

.tpm-header__search input[type="search"]:focus {
  border-color: var(--tpm-teal) !important;
  box-shadow: 0 0 0 3px rgba(239, 0, 67, 0.13);
}

.tpm-header__search button {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px !important;
  background: var(--tpm-teal) !important;
  color: var(--tpm-white) !important;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.tpm-header__search button:hover,
.tpm-header__search button:focus-visible {
  background: var(--tpm-pink) !important;
  color: var(--tpm-white) !important;
}

.tpm-header__toggle,
.tpm-header__panel-head,
.tpm-header__overlay,
.tpm-header__search--mobile,
.tpm-header__cta--mobile {
  display: none;
}

.tpm-header__toggle {
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  justify-self: end;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent !important;
  box-shadow: none;
  cursor: pointer;
  transition: background 180ms ease;
}

.tpm-header__toggle span:not(.screen-reader-text) {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: var(--tpm-teal);
  transition: opacity 180ms ease, transform 180ms ease;
}

.tpm-header__toggle span:not(.screen-reader-text) + span:not(.screen-reader-text) {
  margin-top: 5px;
}

.tpm-header.is-menu-open .tpm-header__toggle {
  background: rgba(3, 139, 165, 0.1) !important;
}

.tpm-header__toggle:hover span:not(.screen-reader-text),
.tpm-header__toggle:focus-visible span:not(.screen-reader-text) {
  background: var(--tpm-pink);
}

.tpm-header.is-menu-open .tpm-header__toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.tpm-header.is-menu-open .tpm-header__toggle span:nth-child(2) {
  opacity: 0;
}

.tpm-header.is-menu-open .tpm-header__toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .tpm-header__inner {
    grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) minmax(190px, 240px);
    gap: 22px;
  }

  .tpm-header__menu {
    gap: 20px;
  }

  .tpm-header__link {
    font-size: 13px;
  }
}

@media (max-width: 860px) {
  body.admin-bar .tpm-header {
    top: 46px;
  }

  .tpm-header__topbar-inner,
  .tpm-header__inner {
    width: min(100% - 40px, 1180px);
  }

  .tpm-header__topbar {
    font-size: 12px;
  }

  .tpm-header__topbar-inner {
    min-height: 28px;
  }

  .tpm-header__social-strip {
    display: none;
  }

  .tpm-header__contact-strip {
    width: 100%;
    justify-content: center;
    gap: 12px;
  }

  .tpm-header__contact-strip a {
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .tpm-header__inner {
    min-height: 80px;
    grid-template-columns: minmax(0, 180px) 1fr;
  }

  .tpm-header__logo {
    width: min(176px, 100%);
    margin-left: 0;
    max-height: 62px;
  }

  .tpm-header__toggle {
    display: inline-grid;
  }

  .tpm-header__search--desktop {
    display: none;
  }

  .tpm-header__overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    border: 0;
    background: rgba(3, 139, 165, 0.74);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
  }

  .tpm-header.is-menu-open .tpm-header__overlay {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  .tpm-header__nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 2;
    display: block;
    width: min(390px, 88vw);
    height: 100vh;
    padding: 24px;
    overflow-y: auto;
    background: var(--tpm-white);
    box-shadow: -24px 0 44px rgba(0, 38, 44, 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition: opacity 220ms ease, transform 220ms ease;
  }

  body.admin-bar .tpm-header__nav {
    top: 46px;
    height: calc(100vh - 46px);
  }

  .tpm-header.is-menu-open .tpm-header__nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
  }

  .tpm-header__panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
  }

  .tpm-header__panel-logo {
    display: block;
    width: min(205px, 68vw);
    height: auto;
  }

  .tpm-header__panel-close {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent !important;
    color: var(--tpm-teal) !important;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
  }

  .tpm-header__panel-close:hover,
  .tpm-header__panel-close:focus-visible {
    background: rgba(3, 139, 165, 0.1) !important;
    color: var(--tpm-pink) !important;
  }

  .tpm-header__search--mobile {
    display: flex;
    margin-bottom: 22px;
  }

  .tpm-header__menu {
    display: grid;
    gap: 0;
    justify-content: stretch;
  }

  .tpm-header__link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 15px 0;
    border-bottom: 1px solid rgba(3, 139, 165, 0.12);
    font-size: 15px;
  }

  .tpm-header__link::after {
    display: none;
  }

  .tpm-header__submenu,
  .tpm-header__submenu--depth-2 {
    position: static;
    display: none;
    min-width: 0;
    margin: 0;
    padding: 4px 0 10px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .tpm-header__submenu .tpm-header__item--has-children::after {
    display: none;
  }

  .tpm-header__item.is-submenu-open > .tpm-header__submenu {
    display: grid;
  }

  .tpm-header__item:hover > .tpm-header__submenu,
  .tpm-header__item:focus-within > .tpm-header__submenu {
    transform: none;
  }

  .tpm-header__submenu .tpm-header__link {
    padding: 10px 12px;
    border-bottom: 0;
    border-radius: 6px;
    font-size: 14px;
  }

  .tpm-header__submenu .tpm-header__chevron {
    transform: rotate(45deg) translateY(-2px);
  }

  .tpm-header__item.is-submenu-open > .tpm-header__link .tpm-header__chevron {
    transform: rotate(225deg) translate(-2px, -1px);
  }

  .tpm-header__cta--mobile {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
    border: 2px solid var(--tpm-pink);
    border-radius: 999px;
    background: var(--tpm-white);
    color: var(--tpm-pink) !important;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none !important;
    text-transform: uppercase;
  }
}

@media (max-width: 560px) {
  .tpm-header__topbar-inner,
  .tpm-header__inner {
    width: min(100% - 40px, 1180px);
  }

  .tpm-header__contact-strip {
    justify-content: flex-start;
  }

  .tpm-header__contact-strip a:first-child {
    max-width: 42%;
  }

  .tpm-header__contact-strip a:last-child {
    max-width: 58%;
  }

  .tpm-header__inner {
    min-height: 72px;
  }

  .tpm-header__logo {
    width: min(150px, 48vw);
    margin-left: 0;
  }

  .tpm-header__toggle {
    width: 48px;
    height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tpm-loader,
  .tpm-loader__bar span {
    animation: none;
    transition: none;
  }

  .tpm-loader__bar span {
    transform: scaleX(1);
  }
}
