/* FALCON HEADER FIX (wins last) */
/* Goal: stable header on desktop + mobile + RTL, regardless of old falcon_v2.css layers */

header.top{
  overflow: visible !important;
}

header.top .row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
  flex-wrap:wrap !important;
}

/* brand */
header.top .brand{
  display:flex !important;
  align-items:center !important;
  flex:0 0 auto !important;
  min-width: 160px !important;
}
header.top .brand img{
  display:block !important;
  width:auto !important;
  height:48px !important;
  object-fit:contain !important;
}

/* main menu */
header.top nav.nav,
header.top nav.menu{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  flex:1 1 auto !important;
  justify-content:center !important;
  flex-wrap:wrap !important;
  min-width: 240px !important;
}

/* buttons/links inside header menu */
header.top nav.nav a,
header.top nav.menu a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  white-space:nowrap !important;
  min-height:40px !important;
  padding:10px 12px !important;
  border-radius:12px !important;
}

/* language switch */
header.top .langs,
header.top .lang{
  display:flex !important;
  align-items:center !important;
  justify-content:flex-end !important;
  gap:8px !important;
  flex:0 0 auto !important;
  min-width: 140px !important;
}
header.top .langs a,
header.top .lang a{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  min-height:36px !important;
  padding:8px 10px !important;
  border-radius:10px !important;
}

/* RTL: keep layout readable */
html[dir="rtl"] header.top .row{
  direction: rtl !important;
}
html[dir="rtl"] header.top nav.nav,
html[dir="rtl"] header.top nav.menu{
  justify-content:center !important;
}
html[dir="rtl"] header.top .langs,
html[dir="rtl"] header.top .lang{
  justify-content:flex-start !important;
}

/* Mobile: stack cleanly */
@media (max-width: 640px){
  header.top .row{
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
  }
  header.top .brand{
    justify-content:center !important;
    min-width:0 !important;
  }
  header.top .brand img{
    height:42px !important;
  }

  header.top nav.nav,
  header.top nav.menu{
    width:100% !important;
    justify-content:center !important;
    display:grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap:8px !important;
  }
  header.top nav.nav a,
  header.top nav.menu a{
    width:100% !important;
    padding:12px 10px !important;
    min-height:42px !important;
    font-size:14px !important;
  }

  header.top .langs,
  header.top .lang{
    width:100% !important;
    justify-content:center !important;
    min-width:0 !important;
  }
}

/* Kill accidental horizontal scroll */
html, body{ overflow-x:hidden !important; max-width:100% !important; }
