/* ==================================================
   PECB Header, "Header Light" layout (markup: includes/widgets/header/trait-header-light.php):
   utility bar (left / centre / right + language switcher), white bar with logo (+ word), plain links,
   outlined button and the red PECB button; burger panel up to 1024px. Script: header-light.js.

   Settings (the widget's Style > Header Light controls override these):
     --pecb-hl-max, --pecb-hl-pad, --pecb-hl-height, --pecb-hl-logo, --pecb-hl-gap, --pecb-hl-bg, --pecb-hl-link,
     --pecb-hl-active, --pecb-hl-utility-bg, --pecb-hl-utility-color, --pecb-hl-outline
================================================== */
.pecb-hl {
  --pecb-hl-max: 1440px;
  --pecb-hl-pad: 24px;
  --pecb-hl-height: 80px;
  --pecb-hl-logo: 112px;
  --pecb-hl-gap: 28px;
  --pecb-hl-bg: #fff;
  --pecb-hl-link: #0f172a;
  --pecb-hl-active: #a11e29;
  --pecb-hl-utility-bg: #5b6b82;
  --pecb-hl-utility-color: #fff;
  --pecb-hl-outline: #d5dbe4;
  --pecb-hl-ease: cubic-bezier(.2, .8, .2, 1);
  position: relative;
  z-index: 50;
  font-family: "Parabolica Text", "Parabolica", "Trebuchet MS", sans-serif;
}

/* ---- Utility bar ---- */
.pecb-hl__utility {
  background: var(--pecb-hl-utility-bg);
  color: var(--pecb-hl-utility-color);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.3;
}
.pecb-hl__utility-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
  max-width: var(--pecb-hl-max);
  min-height: 36px;
  margin: 0 auto;
  padding: 0 var(--pecb-hl-pad);
}
.pecb-hl__zone {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
}
.pecb-hl__zone--center { justify-content: center; }
.pecb-hl__zone--right { justify-content: flex-end; }
.pecb-hl .pecb-hl__utility-link {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  opacity: .92;
  transition: opacity 200ms var(--pecb-hl-ease);
}
.pecb-hl .pecb-hl__utility-link:hover,
.pecb-hl .pecb-hl__utility-link:focus-visible {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Language switcher */
.pecb-hl__lang {
  position: relative;
}
.pecb-hl__lang-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
}
.pecb-hl__lang-current::-webkit-details-marker { display: none; }
.pecb-hl__lang-current svg { color: #d71920; }
.pecb-hl__lang[open] .pecb-hl__lang-current svg { transform: rotate(180deg); }
.pecb-hl .pecb-hl__lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 160px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, .35);
}
.pecb-hl .pecb-hl__lang-link {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.pecb-hl .pecb-hl__lang-link:hover,
.pecb-hl .pecb-hl__lang-link.is-current {
  background: #f1f5f9;
}

/* ---- Main bar ---- */
.pecb-hl__bar {
  position: relative;
  background: var(--pecb-hl-bg);
}
.pecb-hl--shadow .pecb-hl__bar {
  box-shadow: 0 1px 0 rgba(15, 23, 42, .06), 0 10px 24px -18px rgba(15, 23, 42, .3);
}
.pecb-hl__inner {
  display: flex;
  align-items: center;
  gap: 48px;
  box-sizing: border-box;
  max-width: var(--pecb-hl-max);
  height: var(--pecb-hl-height);
  margin: 0 auto;
  padding: 0 var(--pecb-hl-pad);
}
.pecb-hl .pecb-hl__logo {
  display: inline-flex;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--pecb-hl-link);
  text-decoration: none;
}
.pecb-hl .pecb-hl__logo img {
  display: block;
  width: var(--pecb-hl-logo);
  height: auto;
}
.pecb-hl__suffix {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  margin-bottom: -2px;
  font-family: "Parabolica", "Trebuchet MS", sans-serif;
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.02em;
}
.pecb-hl__spark {
  width: 9px;
  height: 9px;
  margin: -4px 0 0 1px;
  color: #d71920;
}

/* Links */
.pecb-hl__nav {
  min-width: 0;
}
.pecb-hl .pecb-hl__list {
  display: flex;
  align-items: center;
  gap: var(--pecb-hl-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pecb-hl .pecb-hl__list li { margin: 0; }
.pecb-hl .pecb-hl__link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  color: var(--pecb-hl-link);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: color 200ms var(--pecb-hl-ease);
}
.pecb-hl .pecb-hl__link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--pecb-hl-active);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--pecb-hl-ease);
}
.pecb-hl .pecb-hl__link:hover,
.pecb-hl .pecb-hl__link:focus-visible,
.pecb-hl .pecb-hl__link.is-current {
  color: var(--pecb-hl-active);
}
.pecb-hl .pecb-hl__link:hover::after,
.pecb-hl .pecb-hl__link.is-current::after {
  transform: scaleX(1);
}

/* Buttons */
.pecb-hl__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.pecb-hl .pecb-hl__secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 48px;
  padding: 0 26px;
  border: 1px solid var(--pecb-hl-outline);
  border-radius: 999px;
  background: #fff;
  color: var(--pecb-hl-link);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 200ms var(--pecb-hl-ease), color 200ms var(--pecb-hl-ease);
}
.pecb-hl .pecb-hl__secondary:hover,
.pecb-hl .pecb-hl__secondary:focus-visible {
  border-color: var(--pecb-hl-link);
}
.pecb-hl .pecb-hl__primary {
  flex: 0 0 auto;
}

/* Burger: tablets and phones */
.pecb-hl .pecb-hl__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--pecb-hl-outline);
  border-radius: 50%;
  background: #fff;
  color: var(--pecb-hl-link);
  cursor: pointer;
}
.pecb-hl__burger-lines,
.pecb-hl__burger-lines::before,
.pecb-hl__burger-lines::after {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 260ms var(--pecb-hl-ease), background-color 200ms;
}
.pecb-hl__burger-lines::before,
.pecb-hl__burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
}
.pecb-hl__burger-lines::before { top: -6px; }
.pecb-hl__burger-lines::after { top: 6px; }
.pecb-hl__burger[aria-expanded="true"] .pecb-hl__burger-lines { background: transparent; }
.pecb-hl__burger[aria-expanded="true"] .pecb-hl__burger-lines::before { transform: translateY(6px) rotate(45deg); }
.pecb-hl__burger[aria-expanded="true"] .pecb-hl__burger-lines::after { transform: translateY(-6px) rotate(-45deg); }

.pecb-hl__panel {
  border-top: 1px solid #e2e8f0;
  background: var(--pecb-hl-bg);
}
.pecb-hl__panel[hidden] { display: none; }
.pecb-hl .pecb-hl__panel-list {
  margin: 0;
  padding: 8px var(--pecb-hl-pad);
  list-style: none;
}
.pecb-hl .pecb-hl__panel-link {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #eef2f6;
  color: var(--pecb-hl-link);
  font-size: 17px;
  font-weight: 500;
  text-decoration: none;
}
.pecb-hl .pecb-hl__panel-link[aria-current="page"] { color: var(--pecb-hl-active); }
.pecb-hl__panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px var(--pecb-hl-pad) 22px;
}

@media (max-width: 1024px) {
  .pecb-hl {
    --pecb-hl-height: 68px;
  }
  .pecb-hl__nav,
  .pecb-hl__actions > .pecb-hl__secondary,
  .pecb-hl__actions > .pecb-hl__primary {
    display: none !important;
  }
  .pecb-hl .pecb-hl__burger { display: inline-flex; }
}
@media (max-width: 767px) {
  .pecb-hl {
    --pecb-hl-pad: 16px;
    --pecb-hl-logo: 96px;
  }
  .pecb-hl__utility-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .pecb-hl__zone--center { display: none; }
  .pecb-hl__suffix { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .pecb-hl .pecb-hl__link,
  .pecb-hl .pecb-hl__link::after,
  .pecb-hl .pecb-hl__secondary,
  .pecb-hl__burger-lines,
  .pecb-hl__burger-lines::before,
  .pecb-hl__burger-lines::after { transition: none; }
}
