/* ============================================================
   FixinityPro — Premium Header Styles
   Design: Linear / Vercel / Stripe inspired
   ============================================================ */

/* Skip link */
.fp-skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.fp-skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 8px 16px;
  border-radius: 8px;
  background: #1e3a8a;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  text-decoration: none;
}

/* ── Header shell ── */
.fp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  transition: background 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
  will-change: background, box-shadow;
}

.fp-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 1px 24px rgba(0, 0, 0, 0.07);
}

/* ── Inner grid: logo | nav | actions ── */
.fp-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 16px;
}

/* ── Logo ── */
.fp-logo-wrap {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  justify-content: flex-start;
}

.fp-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: opacity 0.18s;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
}

.fp-logo:hover { opacity: 0.85; }

.fp-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #1e3a8a;
  color: #fff;
  font-family: 'Courier New', Courier, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  user-select: none;
}

.fp-logo-text {
  font-size: 15.5px;
  font-weight: 650;
  color: #0f172a;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Desktop navigation ── */
.fp-nav-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.fp-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.fp-nav .menu-item a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.16s, background 0.16s;
}

.fp-nav .menu-item a:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

.fp-nav .menu-item.current-menu-item a,
.fp-nav .menu-item a[aria-current="page"] {
  color: #1e3a8a;
  background: #eff6ff;
}

/* Badge inside nav item (set via Menu item description) */
.fp-nav-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 650;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eff6ff;
  color: #1e40af;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

/* ── Right actions ── */
.fp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Search button */
.fp-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.04);
  color: #6b7280;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
  white-space: nowrap;
}

.fp-search-btn:hover {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.06);
  color: #374151;
}

.fp-kbd {
  display: inline-block;
  font-size: 10.5px;
  font-family: inherit;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  color: #9ca3af;
  line-height: 1.5;
}

/* CTA button */
.fp-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 9px;
  background: #1e3a8a;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 550;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: background 0.18s, transform 0.12s;
}

.fp-cta:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.fp-cta:active {
  transform: translateY(0);
  background: #1e3a8a;
}

/* ── Hamburger ── */
.fp-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4.5px;
  width: 36px;
  height: 36px;
  padding: 7px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.18s;
}

.fp-burger:hover { background: rgba(0, 0, 0, 0.06); }

.fp-burger-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 2px;
  background: #374151;
  transform-origin: center center;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s,
              width 0.2s;
}

.fp-burger.is-open .fp-burger-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.fp-burger.is-open .fp-burger-bar:nth-child(2) {
  opacity: 0;
  width: 10px;
}
.fp-burger.is-open .fp-burger-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ── Search bar (dropdown) ── */
.fp-search-bar {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  border-top: 1px solid transparent;
  transition: max-height 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.22s,
              border-color 0.22s;
}

.fp-search-bar.is-open {
  max-height: 80px;
  opacity: 1;
  pointer-events: all;
  border-top-color: rgba(0, 0, 0, 0.07);
}

.fp-search-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px;
  color: #9ca3af;
}

.fp-search-input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 15px;
  color: #0f172a;
  font-family: inherit;
  caret-color: #1e3a8a;
}

.fp-search-input::placeholder { color: #9ca3af; }

.fp-search-close {
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

/* ── Mobile overlay menu ── */
.fp-mobile-overlay {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: opacity 0.26s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.fp-mobile-overlay.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

.fp-mobile-inner {
  max-width: 540px;
  margin: 0 auto;
  padding: 16px 20px 32px;
}

.fp-mobile-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fp-mobile-nav .menu-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 11px;
  font-size: 15.5px;
  font-weight: 500;
  color: #0f172a;
  text-decoration: none;
  transition: background 0.15s;
}

.fp-mobile-nav .menu-item a:hover,
.fp-mobile-nav .menu-item.current-menu-item a {
  background: rgba(0, 0, 0, 0.05);
}

.fp-mobile-nav .menu-item a svg {
  color: #cbd5e1;
  flex-shrink: 0;
}

.fp-mobile-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.07);
  margin: 12px 0;
}

.fp-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fp-mobile-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.03);
  color: #9ca3af;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.18s;
}

.fp-mobile-search-btn:hover { border-color: rgba(0, 0, 0, 0.18); }

.fp-mobile-search-btn input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 14px;
  color: #0f172a;
  font-family: inherit;
}

.fp-mobile-search-btn input::placeholder { color: #9ca3af; }

.fp-mobile-cta {
  display: block;
  text-align: center;
  padding: 14px;
  border-radius: 11px;
  background: #1e3a8a;
  color: #fff !important;
  font-size: 15px;
  font-weight: 550;
  text-decoration: none;
  transition: background 0.18s;
}

.fp-mobile-cta:hover { background: #1d4ed8; }

/* ── Responsive breakpoints ── */
@media (max-width: 1100px) {
  .fp-search-label { display: none; }
  .fp-kbd { display: none; }
  .fp-nav .menu-item a { padding: 6px 9px; font-size: 13px; }
  .fp-nav { gap: 0; }
}

@media (max-width: 960px) {
  .fp-nav .menu-item a { padding: 6px 7px; font-size: 12.5px; }
  .fp-search-btn { display: none; }
}

@media (max-width: 900px) {
  .fp-nav-wrap { display: none; }
  .fp-burger { display: flex; }
  .fp-inner { grid-template-columns: minmax(0, 1fr) auto; }
  .fp-logo-text { font-size: 14px; }
}

@media (max-width: 640px) {
  .fp-inner { padding: 0 16px; }
  .fp-logo-text { font-size: 13.5px; }
}

@media (max-width: 500px) {
  .fp-inner { padding: 0 12px; }
  .fp-cta { padding: 7px 12px; font-size: 13px; }
}
