/* BAIHANGDA V8 multilingual architecture — neutral in English, active when switcher exists. */
.bhd-v8-language-switcher{display:flex;align-items:center;justify-content:center;gap:7px;margin-left:14px;white-space:nowrap;font-size:12px;font-weight:700;line-height:1}
.bhd-v8-language-switcher span{opacity:.35}
.bhd-v8-language-switcher a{display:inline-block!important;padding:6px 2px!important;text-decoration:none!important;color:inherit!important;border:0!important;background:transparent!important;min-width:0!important}
.bhd-v8-language-switcher a.is-current{color:#0663c7!important}
.bhd-v8-language-switcher a:hover{color:#0663c7!important}
@media(max-width:980px){.bhd-v8-language-switcher{margin:10px 0 4px;justify-content:flex-start;flex-wrap:wrap}}

/* V8.0.1 translated core-page fallback for slug-specific English templates. */
.bhd-v8-core-page{padding:64px 0 80px;background:#fff;min-height:320px}
.bhd-v8-core-page .bhd-v7-container{width:min(1180px,calc(100% - 40px));margin:0 auto}
.bhd-v8-core-page h1{margin:0 0 28px;color:#0a5bb8;font-size:clamp(32px,4vw,48px);line-height:1.15}
.bhd-v8-core-page-content{font-size:16px;line-height:1.75;color:#334155}
@media(max-width:767px){.bhd-v8-core-page{padding:44px 0 60px}.bhd-v8-core-page .bhd-v7-container{width:min(100% - 28px,1180px)}}


/* V8.0.3: deterministic three-language header layout. */
body.bhd-lang-es .bd-header .bd-container,body.bhd-lang-en .bd-header .bd-container{direction:ltr}
body.bhd-lang-es .main-navigation,body.bhd-lang-en .main-navigation{direction:ltr}
.bd-header .bhd-v8-language-switcher{flex:0 0 auto;margin-left:0;margin-right:0}
@media(min-width:901px){
  body.bhd-lang-es .bd-header .bd-container,body.bhd-lang-en .bd-header .bd-container{display:flex;align-items:center}
  body.bhd-lang-es .main-navigation,body.bhd-lang-en .main-navigation{display:block}
}


/* V8.0.3: freeze brand geometry across EN / ES / AR; long translated menus may not shrink the logo. */
@media(min-width:901px){
  .bd-header .bd-logo{flex:0 0 190px!important;min-width:190px!important;width:190px!important}
  .bd-header .bd-logo>a{display:block!important;width:190px!important;min-width:190px!important}
  .bd-header .bd-logo img{display:block!important;width:190px!important;min-width:190px!important;max-width:190px!important;height:auto!important;flex:none!important}
  .bd-header .main-navigation{min-width:0}
}


/* V8.0.4: Spanish desktop header safe spacing.
 * Keep a deterministic visual buffer between the long "Sobre BAIHANGDA"
 * terminal nav label and the EN | ES | العربية preview switcher.
 * English and Arabic geometry are intentionally unchanged. */
@media(min-width:901px){
  body.bhd-lang-es .bd-header .main-navigation{flex:1 1 auto;min-width:0}
  body.bhd-lang-es .bd-header .bhd-v8-language-switcher{
    flex:0 0 auto!important;
    margin-left:24px!important;
    margin-right:0!important;
    padding-left:4px;
  }
}


/* V8.0.5: Spanish desktop header spacing balance.
 * V8.0.4 proved that a margin alone is insufficient because the translated
 * navigation can overflow its flex box. Compact the seven Spanish top-level
 * items predictably, then reserve a real no-overlap buffer around the
 * language switcher. English and Arabic remain untouched. */
@media(min-width:901px){
  body.bhd-lang-es .bd-header .main-navigation{
    flex:1 1 auto;
    min-width:0;
    margin-left:18px!important;
    margin-right:0!important;
  }
  body.bhd-lang-es .bd-header .main-navigation ul.mingda-menu{
    display:flex!important;
    align-items:stretch!important;
    justify-content:flex-start!important;
    gap:clamp(14px,1.15vw,22px)!important;
    width:100%!important;
  }
  body.bhd-lang-es .bd-header .main-navigation ul.mingda-menu > li{
    flex:0 0 auto!important;
    margin-left:0!important;
    margin-right:0!important;
  }
  body.bhd-lang-es .bd-header .main-navigation ul.mingda-menu > li > a{
    padding-left:0!important;
    padding-right:0!important;
    white-space:nowrap!important;
  }
  body.bhd-lang-es .bd-header .bhd-v8-language-switcher{
    flex:0 0 auto!important;
    margin-left:32px!important;
    margin-right:18px!important;
    padding-left:0!important;
    white-space:nowrap!important;
  }
}
@media(min-width:901px) and (max-width:1380px){
  body.bhd-lang-es .bd-header .main-navigation ul.mingda-menu{gap:12px!important}
  body.bhd-lang-es .bd-header .main-navigation ul.mingda-menu > li > a{font-size:13px!important}
  body.bhd-lang-es .bd-header .bhd-v8-language-switcher{margin-left:20px!important;margin-right:12px!important;font-size:11px}
}
