/* Shared tablet/mobile header. Desktop page headers remain page-owned. */
.tfs-responsive-header {
  display: none;
}

@media (max-width: 1100px) {
  html.tfs-menu-open,
  html.tfs-menu-open body {
    overflow: hidden !important;
  }

  body.tfs-unified-header-ready {
    padding-top: 0 !important;
    overflow-x: clip;
  }

  body.tfs-unified-header-ready #nav.tfs-original-header,
  body.tfs-unified-header-ready nav.tfs-original-header,
  body.tfs-unified-header-ready header.tfs-original-header,
  body.tfs-unified-header-ready .tfs-original-header,
  body.tfs-unified-header-ready .urgency-bar,
  body.tfs-unified-header-ready .top-urgency-bar,
  body.tfs-unified-header-ready .funnel-urgency-bar,
  body.tfs-unified-header-ready .tfs-urgency {
    display: none !important;
  }

  .tfs-responsive-header {
    --tfs-header-ink: #050505;
    --tfs-header-paper: #fff;
    --tfs-header-cream: #fff8f5;
    --tfs-header-cyan: #00e5cc;
    --tfs-header-violet: #9b59ff;
    position: sticky;
    top: 0;
    z-index: 100000;
    display: block;
    width: 100%;
    max-width: 100vw;
    min-height: 82px;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(5, 5, 5, 0.16);
    color: var(--tfs-header-ink);
    font-family: "DM Sans", Arial, sans-serif;
    box-shadow: 0 8px 24px rgba(5, 5, 5, 0.06);
  }

  .tfs-responsive-header__inner {
    position: relative;
    width: min(100% - 40px, 1180px);
    min-height: 82px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .tfs-responsive-header__logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(230px, 52vw);
    min-height: 64px;
    z-index: 1;
  }

  .tfs-responsive-header__logo img {
    display: block;
    width: auto;
    height: 72px;
    max-width: 100%;
    object-fit: contain;
  }

  .tfs-responsive-header__toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 2px solid var(--tfs-header-ink);
    border-radius: 0;
    background: var(--tfs-header-paper);
    color: var(--tfs-header-ink);
    cursor: pointer;
  }

  .tfs-responsive-header__toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .tfs-responsive-header__toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .tfs-responsive-header__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .tfs-responsive-header__toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .tfs-responsive-header__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: calc(100dvh - 82px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px max(20px, calc((100vw - 1180px) / 2)) 24px;
    background: rgba(255, 248, 245, 0.995);
    border-bottom: 2px solid var(--tfs-header-ink);
    box-shadow: 0 24px 48px rgba(5, 5, 5, 0.2);
  }

  .tfs-responsive-header__menu[hidden] {
    display: none !important;
  }

  .tfs-responsive-header__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid rgba(5, 5, 5, 0.16);
    border-left: 1px solid rgba(5, 5, 5, 0.16);
  }

  .tfs-responsive-header__links a {
    min-width: 0;
    min-height: 52px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(5, 5, 5, 0.16);
    border-bottom: 1px solid rgba(5, 5, 5, 0.16);
    background: var(--tfs-header-paper);
    color: var(--tfs-header-ink);
    font-family: "Barlow Condensed", Impact, sans-serif;
    font-size: 18px;
    font-style: italic;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    overflow-wrap: anywhere;
  }

  .tfs-responsive-header__links a:focus-visible,
  .tfs-responsive-header__links a:hover {
    background: linear-gradient(90deg, rgba(0, 229, 204, 0.22), rgba(85, 170, 255, 0.18), rgba(155, 89, 255, 0.2));
    outline: 2px solid var(--tfs-header-ink);
    outline-offset: -2px;
  }

  .tfs-responsive-header__footer {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr);
    gap: 14px;
    align-items: stretch;
    margin-top: 16px;
  }

  .tfs-responsive-header__languages {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid rgba(5, 5, 5, 0.2);
    background: var(--tfs-header-paper);
  }

  .tfs-responsive-header__languages a {
    min-width: 52px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tfs-header-ink);
    font-family: "Barlow Condensed", Impact, sans-serif;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
  }

  .tfs-responsive-header__languages a[aria-current="true"] {
    background: var(--tfs-header-ink);
    color: #fff;
  }

  .tfs-responsive-header__cta {
    min-height: 52px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--tfs-header-ink);
    background: linear-gradient(90deg, var(--tfs-header-cyan), #55aaff, var(--tfs-header-violet));
    color: var(--tfs-header-ink);
    font-family: "Barlow Condensed", Impact, sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
  }

  body.tfs-unified-header-ready .page-shell {
    padding-top: 36px !important;
  }

  body.tfs-unified-header-ready .offer-hero {
    padding-top: 58px !important;
  }

  body.tfs-unified-header-ready.tfs-header-route-academy .hero {
    padding-top: 64px !important;
  }
}

@media (max-width: 560px) {
  .tfs-responsive-header,
  .tfs-responsive-header__inner {
    min-height: 74px;
  }

  .tfs-responsive-header__inner {
    width: calc(100% - 28px);
  }

  .tfs-responsive-header__logo {
    width: min(190px, 52vw);
    min-height: 56px;
  }

  .tfs-responsive-header__logo img {
    height: 62px;
  }

  .tfs-responsive-header__toggle {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
  }

  .tfs-responsive-header__menu {
    max-height: calc(100dvh - 74px);
    padding: 14px 14px 20px;
  }

  .tfs-responsive-header__links {
    grid-template-columns: 1fr;
  }

  .tfs-responsive-header__links a {
    justify-content: flex-start;
    min-height: 48px;
    padding: 11px 14px;
    font-size: 17px;
    text-align: left;
  }

  .tfs-responsive-header__footer {
    grid-template-columns: 1fr;
  }

  .tfs-responsive-header__languages,
  .tfs-responsive-header__cta {
    width: 100%;
  }

  .tfs-responsive-header__languages a {
    flex: 1;
  }

  body.tfs-unified-header-ready .page-shell {
    padding-top: 24px !important;
  }

  body.tfs-unified-header-ready .offer-hero,
  body.tfs-unified-header-ready.tfs-header-route-academy .hero {
    padding-top: 48px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tfs-responsive-header *,
  .tfs-responsive-header *::before,
  .tfs-responsive-header *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
