/* Triplan Website / Containers / Site Header
 * Shortcode: [triplan_site_header]
 *
 * Realtime preview:
 * Open previews/website/site-header.html with VS Code Live Preview, then edit
 * the variables below or any selector in this file.
 */

.tp-site-header,
.tp-site-header-spacer {
  --tp-site-header-height: 84px;
  --tp-site-header-pad-y: 10px;
  --tp-site-header-content-height: calc(var(--tp-site-header-height) - (var(--tp-site-header-pad-y) * 2));
}

.tp-site-header {
  --tp-site-header-max-width: 1640px;
  --tp-site-header-pad-x: clamp(30px, 5.2vw, 98px);
  --tp-site-header-logo-column: 132px;
  --tp-site-header-logo-width: 108px;
  --tp-site-header-logo-height: min(64px, var(--tp-site-header-content-height));
  --tp-site-header-filter-height: 76px;
  --tp-site-header-bg: rgba(255, 255, 255, 0.94);
  --tp-site-header-primary-text: var(--tp-ink);
  --tp-site-header-text: var(--tp-site-header-primary-text);
  --tp-site-header-muted: var(--tp-site-header-primary-text);
  --tp-site-header-line: rgba(26, 43, 73, 0.08);
  --tp-site-header-accent: var(--tp-site-header-primary-text);
  --tp-site-header-shadow: 0 10px 30px rgba(26, 43, 73, 0.07);

  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: block;
  height: var(--tp-site-header-height);
  background: var(--tp-site-header-bg);
  color: var(--tp-site-header-text);
  border-bottom: 1px solid var(--tp-site-header-line);
  box-shadow: var(--tp-site-header-shadow);
  font-family: var(--tp-body-font, "Poppins", sans-serif);
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.tp-site-header--has-filter {
  height: calc(var(--tp-site-header-height) + var(--tp-site-header-filter-height));
}

.tp-site-header--has-filter .tp-site-header__inner {
  height: var(--tp-site-header-height);
}

.tp-site-header *,
.tp-site-header *::before,
.tp-site-header *::after {
  box-sizing: border-box;
}

.tp-site-header a {
  color: inherit;
  text-decoration: none;
}

.tp-site-header__inner {
  width: min(100%, var(--tp-site-header-max-width));
  height: 100%;
  margin: 0 auto;
  padding: var(--tp-site-header-pad-y) var(--tp-site-header-pad-x);
  display: grid;
  grid-template-columns: var(--tp-site-header-logo-column) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 2.4vw, 46px);
}

.tp-site-header__brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: start;
  width: var(--tp-site-header-logo-width);
  height: var(--tp-site-header-logo-height);
}

.tp-site-header .tp-site-header__logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.tp-site-header__logo--white {
  opacity: 0;
}

.tp-site-header__filter-slot {
  position: relative;
  z-index: 1;
  height: var(--tp-site-header-filter-height);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6px var(--tp-site-header-pad-x) 8px;
}

.tp-site-header__nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(17px, 1.35vw, 26px);
  min-width: 0;
}

.tp-site-header .tp-site-header__nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--tp-site-header-text);
  font-family: var(--tp-body-font, "Inter", sans-serif);
  font-size: clamp(15px, 1vw, 17px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.tp-site-header__nav-link-icon {
  margin-left: 6px;
  font-size: 10px;
  opacity: 0.72;
}

.tp-site-header .tp-site-header__nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tp-site-header .tp-site-header__nav-link:hover,
.tp-site-header .tp-site-header__nav-link:focus {
  color: var(--tp-site-header-accent);
  opacity: 0.92;
  transform: translateY(-1px);
}

.tp-site-header .tp-site-header__nav-link:hover::after,
.tp-site-header .tp-site-header__nav-link:focus::after {
  transform: scaleX(1);
}

.tp-site-header__actions {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(15px, 1.35vw, 26px);
}

.tp-site-header .tp-site-header__action {
  position: relative;
  min-width: 52px;
  min-height: 56px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 2px;
  color: var(--tp-site-header-text);
  transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.tp-site-header .tp-site-header__action::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 240ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.tp-site-header .tp-site-header__action:hover,
.tp-site-header .tp-site-header__action:focus {
  color: var(--tp-site-header-accent);
  opacity: 0.92;
  transform: translateY(-1px);
}

.tp-site-header .tp-site-header__action:hover::after,
.tp-site-header .tp-site-header__action:focus::after {
  transform: scaleX(1);
}

.tp-site-header__action-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 22px;
  line-height: 1;
}

.tp-site-header__action-icon i {
  display: block;
  line-height: 1;
}

.tp-site-header .tp-site-header__action-label {
  display: block;
  color: var(--tp-site-header-text);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0;
  transition: color 180ms ease;
}

.tp-site-header .tp-site-header__action:hover .tp-site-header__action-label,
.tp-site-header .tp-site-header__action:focus .tp-site-header__action-label {
  color: currentColor;
}

.tp-site-header__badge {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--tp-cyan);
  color: var(--tp-midnight);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(27, 186, 202, 0.32);
}

.tp-site-header__nav-link:focus-visible,
.tp-site-header__action:focus-visible,
.tp-site-header__brand:focus-visible {
  outline: 3px solid rgba(27, 186, 202, 0.72);
  outline-offset: 5px;
  border-radius: 8px;
}

.tp-site-header.is-transparent {
  --tp-site-header-bg: rgba(255, 255, 255, 0);
  --tp-site-header-text: #fff;
  --tp-site-header-muted: #fff;
  --tp-site-header-line: rgba(255, 255, 255, 0);
  --tp-site-header-accent: #fff;
  --tp-site-header-shadow: none;
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

.tp-site-header.is-transparent .tp-site-header__logo--color {
  opacity: 0;
}

.tp-site-header.is-transparent .tp-site-header__logo--white {
  opacity: 1;
}

.tp-site-header.is-transparent .tp-site-header__nav-link,
.tp-site-header.is-transparent .tp-site-header__action {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.3);
}

.tp-site-header-spacer {
  height: var(--tp-site-header-height);
}

@media (max-width: 1320px) {
  .tp-site-header {
    --tp-site-header-pad-x: 30px;
    --tp-site-header-logo-column: 116px;
    --tp-site-header-logo-width: 98px;
  }

  .tp-site-header__inner {
    gap: 20px;
  }

  .tp-site-header__nav {
    gap: 14px;
  }

  .tp-site-header__actions {
    gap: 14px;
  }
}

@media (max-width: 1100px) {
  .tp-site-header,
  .tp-site-header-spacer {
    display: none;
  }
}

/* Action item wrapper (needed for profile hover dropdown) */
.tp-site-header__action-item {
  position: relative;
  display: inline-flex;
}

/* Profile hover dropdown */
.tp-site-header__profile-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 10001;
  width: 478px;
  max-width: calc(100vw - 24px);
  padding: 0;
  background: #fff;
  color: var(--tp-text, #1A2B49);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(15, 32, 39, 0.18), 0 4px 12px rgba(15, 32, 39, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  pointer-events: none;
}

.tp-site-header__profile-menu::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 18px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
  border-top-left-radius: 4px;
  box-shadow: -2px -2px 6px rgba(15, 32, 39, 0.05);
}

.tp-site-header__action-item--profile:hover .tp-site-header__profile-menu,
.tp-site-header__action-item--profile:focus-within .tp-site-header__profile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.tp-site-header__profile-menu-inner {
  position: relative;
  padding: 18px 16px 14px;
  background: #fff;
  border-radius: 16px;
}

.tp-site-header__profile-menu-title {
  margin: 0 6px 12px;
  font-family: var(--tp-heading-font, "Poppins", sans-serif);
  font-size: 22px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--tp-secondary, #29525D);
  letter-spacing: -0.01em;
}

.tp-site-header__profile-menu-group {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tp-site-header__profile-menu-group--bordered {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(26, 43, 73, 0.08);
}

.tp-site-header .tp-site-header__profile-menu-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--tp-text, #1A2B49);
  font-family: var(--tp-body-font, "Poppins", sans-serif);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.tp-site-header .tp-site-header__profile-menu-row:hover,
.tp-site-header .tp-site-header__profile-menu-row:focus-visible {
  background: rgba(27, 186, 202, 0.10);
  color: var(--tp-secondary, #29525D);
}

.tp-site-header .tp-site-header__profile-menu-row.is-active {
  background: rgba(26, 43, 73, 0.06);
}

.tp-site-header .tp-site-header__profile-menu-row--danger {
  color: #ef4444;
}

.tp-site-header .tp-site-header__profile-menu-row--danger:hover,
.tp-site-header .tp-site-header__profile-menu-row--danger:focus-visible {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.tp-site-header__profile-menu-icon {
  width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  color: currentColor;
}

.tp-site-header__profile-menu-label {
  flex: 1;
}

/* Transparent state: keep dropdown readable */
.tp-site-header.is-transparent .tp-site-header__profile-menu,
.tp-site-header.is-transparent .tp-site-header__profile-menu-inner {
  color: var(--tp-text, #1A2B49);
}

.tp-site-header.is-transparent .tp-site-header__profile-menu .tp-site-header__profile-menu-row {
  text-shadow: none;
}
