/* Header layout is isolated from the legacy Bootstrap navigation styles. */
#header.optec-header {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  width: calc(100% - 32px);
  max-width: 1140px;
  margin: 0 auto;
  padding: 12px 20px;
  border-radius: 10px;
  background: #f1f2f5;
  background: rgba(241, 242, 245, 0.65);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #414175;
  z-index: 5000;
  box-sizing: border-box;
  font-family: var(--optec-font-body);
}
#header.optec-header *, #header.optec-header *::before, #header.optec-header *::after { box-sizing: border-box; }
#header.optec-header .optec-header-inner {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}
#header.optec-header .optec-header-logo { display: inline-flex; align-items: center; width: fit-content; }
#header.optec-header .optec-header-logo img { display: block; width: 104px; max-width: 100%; height: auto; }
#header.optec-header .optec-main-nav { min-width: 0; background: #da2127; border-radius: 8px; }
#header.optec-header .optec-main-nav ul {
  display: flex;
  align-items: stretch;
  justify-content: space-evenly;
  gap: 4px;
  list-style: none;
  padding: 4px;
  margin: 0;
}
#header.optec-header .optec-main-nav li { display: flex; margin: 0; padding: 0; }
#header.optec-header .optec-main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 24px;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  border-radius: 6px;
  background: transparent;
  transition: background-color 180ms ease;
}
#header.optec-header .optec-main-nav a::after {
  content: "";
  position: absolute;
  bottom: 8px;
  left: 50%;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  background: #3c3e85;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}
#header.optec-header .optec-main-nav a:hover { background: rgba(0, 0, 0, 0.08); color: #fff; }
#header.optec-header .optec-main-nav a:hover::after,
#header.optec-header .optec-main-nav a:focus-visible::after,
#header.optec-header .optec-main-nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  #header.optec-header .optec-main-nav a,
  #header.optec-header .optec-main-nav a::after { transition: none; }
}
#header.optec-header a:focus-visible, #header.optec-header button:focus-visible { outline: 2px solid #414175; outline-offset: 4px; }
#header.optec-header .optec-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  margin: 0;
  border: 0;
  border-radius: 6px;
  background: #da2127;
  color: #fff;
  font: 600 14px/24px var(--optec-font-body);
  cursor: pointer;
}
#header.optec-header .optec-menu-icon { display: flex; flex-direction: column; gap: 4px; width: 18px; }
#header.optec-header .optec-menu-icon span { display: block; height: 2px; width: 18px; background: currentColor; }
#header.optec-header [hidden] { display: none !important; }
@media (min-width: 992px) and (max-width: 1199px) {
  #header.optec-header { max-width: 940px; }
  #header.optec-header .optec-main-nav a { padding: 12px 12px; }
}
@media (min-width: 768px) and (max-width: 991px) { #header.optec-header { max-width: 720px; } }
@media (max-width: 991px) {
  #header.optec-header { top: 12px; padding: 10px 16px; }
  #header.optec-header .optec-header-inner { grid-template-columns: 1fr auto; gap: 12px; }
  #header.optec-header .optec-header-logo img { width: 84px; }
  #header.optec-header .optec-menu-toggle { grid-column: 2; justify-self: end; }
  #header.optec-header .optec-main-nav { grid-column: 1 / -1; }
  #header.optec-header .optec-main-nav ul { flex-direction: column; }
  #header.optec-header .optec-main-nav li { width: 100%; }
  #header.optec-header .optec-main-nav a { justify-content: flex-start; width: 100%; min-height: 48px; padding: 12px 18px; }
}

@media (max-width: 991px) {
  #header.optec-header .optec-main-nav a::after { left: 18px; margin-left: 0; }
}
