/*
 * 教务处顶栏 —— 严格对齐设计稿 lncu-jwc-site/css/style.css
 * 作用域：body.jwc-site，并用更高优先级覆盖父主题 .site-header / .nav 规则
 */
body.jwc-site{
  --jwc-red:#cf202f;
  --jwc-red-dark:#a81520;
  --jwc-ink:#20232a;
}

body.jwc-site .site-header{
  color:#fff !important;
  background:#071022 !important;
  position:relative !important;
  overflow:hidden !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
  box-shadow:none !important;
  height:auto !important;
  min-height:0 !important;
}

/* 首页：header 包裹 hero，topline 绝对叠在 hero 上（设计稿原结构） */
body.jwc-site.jwc-home-page .site-header{
  background:#071022 !important;
}

body.jwc-site .site-header .topline{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:0 !important;
  z-index:5 !important;
  background:transparent !important;
}

/* 内页无 hero：topline 走正常文档流 */
body.jwc-site:not(.jwc-home-page) .site-header .topline{
  position:relative !important;
}

body.jwc-site .site-header .container{
  width:min(1050px,calc(100% - 60px)) !important;
  margin:0 auto !important;
  max-width:none !important;
  padding:0 !important;
}

body.jwc-site .site-header .top-inner{
  height:88px !important;
  display:flex !important;
  align-items:center !important;
  gap:36px !important;
  position:relative !important;
}

body.jwc-site .site-header .brand{
  display:block !important;
  flex:0 0 auto !important;
  margin:0 !important;
  padding:0 !important;
}

body.jwc-site .site-header .brand img{
  width:240px !important;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
  filter:brightness(1.06) !important;
  display:block !important;
}

body.jwc-site .site-header .right-top{
  position:absolute !important;
  right:4px !important;
  top:18px !important;
  font-size:13px !important;
  color:rgba(255,255,255,.88) !important;
  letter-spacing:.03em !important;
  display:block !important;
  line-height:1.4 !important;
  z-index:6 !important;
}

body.jwc-site .site-header .right-top a,
body.jwc-site .site-header .right-top span{
  color:rgba(255,255,255,.88) !important;
  text-decoration:none !important;
  font-size:13px !important;
  font-weight:400 !important;
}

body.jwc-site .site-header .right-top a:hover{
  color:#fff !important;
}

/* 设计稿导航：扁平 a，间距 42px，字号 15 / 字重 700，白底短下划线 */
body.jwc-site .site-header .nav{
  margin-left:auto !important;
  padding-top:22px !important;
  display:flex !important;
  gap:42px !important;
  align-items:center !important;
  font-weight:700 !important;
  font-size:15px !important;
  flex:0 0 auto !important;
  justify-content:flex-end !important;
  position:static !important;
  background:transparent !important;
  width:auto !important;
  height:auto !important;
  box-shadow:none !important;
}

body.jwc-site .site-header .nav a{
  position:relative !important;
  display:inline-block !important;
  padding:10px 0 !important;
  margin:0 !important;
  color:rgba(255,255,255,.92) !important;
  text-decoration:none !important;
  font-size:15px !important;
  font-weight:700 !important;
  letter-spacing:0 !important;
  line-height:1.2 !important;
  opacity:1 !important;
  transform:none !important;
  border:0 !important;
  background:transparent !important;
}

body.jwc-site .site-header .nav a::after,
body.jwc-site .site-header .nav a::before{
  content:"" !important;
  position:absolute !important;
  height:2px !important;
  width:auto !important;
  background:#fff !important;
  left:50% !important;
  right:50% !important;
  bottom:2px !important;
  top:auto !important;
  transition:.25s !important;
  transform:none !important;
  border:0 !important;
  opacity:1 !important;
}

body.jwc-site .site-header .nav a:hover::after,
body.jwc-site .site-header .nav a.active::after{
  left:0 !important;
  right:0 !important;
}

body.jwc-site .site-header .menu-toggle{
  display:none !important;
  margin-left:auto !important;
  border:0 !important;
  background:rgba(255,255,255,.1) !important;
  border-radius:6px !important;
  width:42px !important;
  height:38px !important;
  padding:8px !important;
  cursor:pointer !important;
  flex:0 0 auto !important;
}

body.jwc-site .site-header .menu-toggle span{
  display:block !important;
  height:2px !important;
  width:100% !important;
  background:#fff !important;
  margin:5px 0 !important;
  border-radius:2px !important;
}

/* 内页：顶栏占位后接父主题 list-hero / article-hero */
body.jwc-site:not(.jwc-home-page) .list-hero,
body.jwc-site:not(.jwc-home-page) .article-hero{
  padding-top:calc(44px + 20px) !important;
}

/* 盖过 secondary-page 对 header 的红底 */
body.jwc-site.secondary-page .site-header,
body.jwc-site.secondary-page header.site-header{
  background:#071022 !important;
  box-shadow:none !important;
}

body.jwc-site.secondary-page .site-header a{
  color:rgba(255,255,255,.92) !important;
}

@media (max-width:960px){
  body.jwc-site .site-header .container{
    width:min(100% - 32px,760px) !important;
  }
  body.jwc-site .site-header .top-inner{
    height:76px !important;
  }
  body.jwc-site .site-header .brand img{
    width:210px !important;
  }
  body.jwc-site .site-header .right-top{
    display:none !important;
  }
  body.jwc-site .site-header .menu-toggle{
    display:block !important;
    z-index:20 !important;
  }
  body.jwc-site .site-header .nav{
    position:absolute !important;
    right:0 !important;
    top:76px !important;
    width:210px !important;
    background:rgba(8,15,31,.96) !important;
    border-radius:8px !important;
    padding:12px !important;
    display:none !important;
    flex-direction:column !important;
    gap:0 !important;
    align-items:stretch !important;
    box-shadow:0 18px 40px rgba(0,0,0,.25) !important;
    margin-left:0 !important;
    padding-top:12px !important;
  }
  body.jwc-site .site-header .nav.show{
    display:flex !important;
  }
  body.jwc-site .site-header .nav a{
    padding:12px 16px !important;
  }
}

@media (max-width:560px){
  body.jwc-site .site-header .container{
    width:calc(100% - 24px) !important;
  }
  body.jwc-site .site-header .brand img{
    width:188px !important;
  }
}

/* б棺вü */
body.jwc-site .news-row-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
}
