@import url('/css/card-system.css');

/* =========================================================
   LYMPHAWARE SECONDARY PAGE HEADER

   The original homepage header is the visual reference:
   - approved with-tagline logo
   - 440px logo on desktop
   - 300px logo target on mobile, constrained only when needed
   - consistent 1180px content width
   ========================================================= */

.secondary-header {
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #e7edf1;
}

.secondary-header .header-inner {
  width: min(1180px, calc(100% - 40px));
  max-width: 1180px;
  min-height: 92px;
  padding-top: 4px;
  padding-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
}

.secondary-header .header-brand {
  width: 440px;
  flex: 0 0 440px;
  min-width: 0;
}

.secondary-header .header-logo {
  display: block;
  width: 440px !important;
  max-width: 100% !important;
  height: auto;
}

.secondary-header .header-actions {
  display: flex !important;
  align-items: center;
  margin-left: auto;
  flex: 0 0 auto;
}

.secondary-header .back-to-website-button {
  display: inline-flex !important;
  min-width: 150px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 1rem !important;
  line-height: 1.2;
  white-space: nowrap;
}

.secondary-header .mobile-home-button {
  display: none !important;
}

.secondary-header .main-nav,
.secondary-header .mobile-menu {
  display: none !important;
}

/* =========================================================
   SHARED CUSTOMER-FACING TYPE SCALE
   Match the homepage hierarchy throughout supporting pages,
   registration, sign-in and the portal journey.
   ========================================================= */

body:has(.secondary-header) .page-hero h1 {
  font-size: clamp(2.7rem, 3.3vw, 3.75rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -1.5px !important;
}

body:has(.secondary-header) .portal-card h1,
body:has(.secondary-header) .portal-welcome h1 {
  font-size: clamp(2rem, 3vw, 2.8rem) !important;
  line-height: 1.15 !important;
  letter-spacing: -1px !important;
}

body:has(.secondary-header) .page-hero p,
body:has(.secondary-header) .portal-intro,
body:has(.secondary-header) .portal-welcome p {
  font-size: 1.08rem !important;
  line-height: 1.6 !important;
}

body:has(.secondary-header) .section-heading h2,
body:has(.secondary-header) .copy h2,
body:has(.secondary-header) .split-copy h2,
body:has(.secondary-header) .mission-box h2,
body:has(.secondary-header) .cta-box h2 {
  font-size: clamp(2rem, 3vw, 2.8rem) !important;
  line-height: 1.15 !important;
}

body:has(.secondary-header) .section-heading p,
body:has(.secondary-header) .copy p,
body:has(.secondary-header) .split-copy p,
body:has(.secondary-header) .mission-box p,
body:has(.secondary-header) .cta-box p {
  font-size: 1.08rem !important;
  line-height: 1.6 !important;
}

body:has(.secondary-header) .button {
  font-size: 1rem !important;
  line-height: 1.2 !important;
}

/* Use exactly the same compact header geometry on phones and tablets. */
@media (max-width: 900px) {
  .secondary-header .header-inner {
    width: min(100% - 28px, 1180px);
    min-height: 74px;
    gap: 10px;
  }

  .secondary-header .header-brand {
    width: min(300px, calc(100vw - 116px));
    min-width: 0;
    flex: 0 0 auto;
  }

  .secondary-header .header-logo {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
  }

  .secondary-header .header-actions {
    display: flex !important;
    width: 78px;
    min-width: 78px;
    flex: 0 0 78px;
    justify-content: flex-end;
  }

  .secondary-header .back-to-website-button {
    display: none !important;
  }

  .secondary-header .mobile-home-button {
    display: inline-flex !important;
  }

  .secondary-header .mobile-home-button,
  .secondary-header .profile-portal-button,
  .secondary-header .header-actions > .button {
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px !important;
    min-height: 44px !important;
    padding: 0 8px !important;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1rem !important;
    white-space: nowrap;
  }

  body:has(.secondary-header) .page-hero {
    padding: 52px 0 54px !important;
  }

  body:has(.secondary-header) .page-hero h1 {
    font-size: clamp(2.35rem, 10vw, 3rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -1.2px !important;
  }

  body:has(.secondary-header) .portal-card h1,
  body:has(.secondary-header) .portal-welcome h1,
  body:has(.secondary-header) .section-heading h2,
  body:has(.secondary-header) .copy h2,
  body:has(.secondary-header) .split-copy h2,
  body:has(.secondary-header) .mission-box h2,
  body:has(.secondary-header) .cta-box h2 {
    font-size: 2rem !important;
    line-height: 1.15 !important;
  }

  body:has(.secondary-header) .page-hero p,
  body:has(.secondary-header) .portal-intro,
  body:has(.secondary-header) .portal-welcome p,
  body:has(.secondary-header) .section-heading p,
  body:has(.secondary-header) .copy p,
  body:has(.secondary-header) .split-copy p,
  body:has(.secondary-header) .mission-box p,
  body:has(.secondary-header) .cta-box p {
    font-size: 1.03rem !important;
    line-height: 1.6 !important;
  }
}


/* On phones the logo itself is the Home link, so it can use the full header width. */
@media (max-width: 680px) {
  .secondary-header .header-inner {
    width: calc(100% - 28px);
    flex-wrap: wrap;
    column-gap: 0;
    row-gap: 0;
    padding-bottom: 0;
  }

  .secondary-header .header-brand {
    width: 100%;
    max-width: none;
    flex: 1 1 auto;
    padding-bottom: 14px;
  }

  .secondary-header.profile-site-header .header-inner {
    gap: 0 !important;
    row-gap: 0 !important;
  }

  .secondary-header .header-actions {
    display: flex !important;
    width: 100vw;
    min-width: 100vw;
    flex: 0 0 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
    justify-content: flex-start;
    background: #0053b7;
    border-top: 1px solid #00479d;
  }

  .secondary-header .header-actions > .back-to-website-button {
    display: inline-flex !important;
    width: calc(100% - 28px) !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 48px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    justify-content: flex-start !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 0 !important;
  }

  .secondary-header .header-actions > .back-to-website-button::before {
    content: "Return to website";
    font-size: 1rem;
    line-height: 1.2;
    font-weight: 800;
  }

  .secondary-header.profile-site-header .header-actions > .back-to-website-button::before {
    content: "Return to portal";
  }

  .secondary-header .header-actions > .back-to-website-button:hover,
  .secondary-header .header-actions > .back-to-website-button:focus-visible {
    background: rgba(255,255,255,.10) !important;
    color: #ffffff !important;
    text-decoration: none;
  }
}
