/* ==========================================
   HeaderX (isolated)
   Only affects elements inside .headerx
   ========================================== */

.headerx{
  position: sticky;
  top: 0;
  z-index: 1040;
  background: linear-gradient(180deg, #fff 0%, #fff 65%, rgba(246,247,251,.85) 100%);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .22s ease, background .22s ease;
}

/* Slightly bigger base spacing */
.headerx__inner{
  padding: 14px 0;
  transition: padding .22s ease;
}

/* Brand */
.headerx__brand{
  display:flex;
  align-items:center;
  gap: 14px;
  text-decoration:none;
  color: inherit;
  min-width: 0;
}
.headerx__brand:hover .headerx__name{ color: var(--primary-dark); }

/* Bigger, visible logo */
.headerx__logoWrap{
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background:#fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 14px 26px rgba(0,0,0,.08);
  display:flex;
  align-items:center;
  justify-content:center;
  flex: 0 0 auto;
  overflow:hidden;
  transition: width .22s ease, height .22s ease, border-radius .22s ease, box-shadow .22s ease;
}

.headerx__logoImg{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  display:block;
  transition: padding .22s ease;
}

.headerx__logoFallback{
  width: 100%;
  height: 100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color: var(--primary);
  font-size: 28px;
}

.headerx__text{
  display:flex;
  flex-direction:column;
  gap: 2px;
  min-width: 0;
}

.headerx__name{
  font-size: 1.75rem;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: -0.25px;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: font-size .22s ease;
}

.headerx__tagline{
  font-size: .92rem;
  color: rgba(0,0,0,.55);
  line-height: 1.35;
  max-width: 60ch;
  transition: opacity .18s ease;
}

/* Search */
.headerx__search{
  display:flex;
  justify-content:flex-end;
}

.headerx__searchGroup{
  position: relative;
  width: 100%;
  max-width: 560px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  box-shadow: 0 14px 28px rgba(16,18,20,.06);
  overflow:hidden;
  display:flex;
  align-items:center;
  transition: box-shadow .18s ease, border-color .18s ease;
}

.headerx__searchIcon{
  position:absolute;
  left: 14px;
  color: rgba(0,0,0,.42);
  font-size: .95rem;
  pointer-events:none;
}

.headerx__input{
  width: 100%;
  border: none;
  outline: none;
  box-shadow: none;
  padding: .95rem 1rem .95rem 2.35rem;
  background: transparent;
  font-size: .95rem;
  transition: padding .22s ease, font-size .22s ease;
}

.headerx__btn{
  border: none;
  border-left: 1px solid rgba(0,0,0,.06);
  padding: .95rem 1.05rem;
  font-weight: 950;
  background: rgba(211,47,47,.10);
  color: var(--primary);
  transition: padding .22s ease, background .18s ease, color .18s ease;
}
.headerx__btn:hover{
  background: rgba(211,47,47,.14);
  color: var(--primary-dark);
}

.headerx__searchGroup:focus-within{
  border-color: rgba(211,47,47,.32);
  box-shadow: 0 18px 36px rgba(211,47,47,.10);
}

/* ==========================================
   Compact state (on scroll)
   ========================================== */
.headerx.is-compact{
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(16,18,20,.08);
}

.headerx.is-compact .headerx__inner{
  padding: 8px 0;
}

.headerx.is-compact .headerx__logoWrap{
  width: 54px;
  height: 54px;
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(0,0,0,.07);
}

.headerx.is-compact .headerx__logoImg{ padding: 6px; }

.headerx.is-compact .headerx__name{ font-size: 1.28rem; }

.headerx.is-compact .headerx__tagline{ opacity: 0; }

.headerx.is-compact .headerx__input{
  padding: .75rem 1rem .75rem 2.25rem;
  font-size: .92rem;
}

.headerx.is-compact .headerx__btn{ padding: .75rem 1rem; }

/* Responsive */
@media (max-width: 991.98px){
  .headerx__search{ justify-content: stretch; }
  .headerx__searchGroup{ max-width: 100%; }
  .headerx__tagline{ display:none; }
  .headerx__name{ font-size: 1.35rem; }
  .headerx__logoWrap{ width: 62px; height: 62px; }
}

@media (max-width: 575.98px){
  .headerx__logoWrap{ width: 56px; height: 56px; }
  .headerx__name{ font-size: 1.18rem; }
}



