/*
 * 二级学院顶栏 —— 对齐主主题：fixed 透明悬于 Hero，滚动后红底
 * 仅做学院差异补充，不覆盖主主题 .site-header 定位/背景逻辑
 * 作用域：body.ejxy-site
 */
body.ejxy-site{
  --ejxy-primary:#e83521;
  --ejxy-accent:#e83521;
  --ejxy-text:#1f1f1f;
  --ejxy-muted:#777;
  --ejxy-wrap:1208px;
  --ejxy-content-width:1208px;
}

/* 顶栏内容区：PC 1200 居中；移动端与主体 92vw 对齐（勿用 calc(100%-48px) 盖掉） */
body.ejxy-site .site-header .header-inner{
  width:min(1200px,92vw);
  max-width:1200px;
  margin-left:auto;
  margin-right:auto;
  box-sizing:border-box;
}

/* 导航链接不加粗 */
body.ejxy-site .site-header .nav-item>a{
  font-weight:400 !important;
}

/* 学院名（主主题无此元素） */
body.ejxy-site .site-header .brand{
  gap:14px;
  min-width:0;
}

body.ejxy-site .site-header .brand img{
  height:41px !important;
  width:auto !important;
  max-height:41px !important;
}

/* 学院名：高对比徽章，更醒目 */
body.ejxy-site .site-header .brand-name{
  position:relative;
  display:inline-flex;
  align-items:center;
  max-width:min(420px,42vw);
  margin:0;
  padding:8px 18px;
  color:var(--ejxy-primary,#e83521);
  font-family:"Microsoft YaHei","PingFang SC",sans-serif;
  font-size:24px;
  font-weight:800;
  letter-spacing:.14em;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  background:#fff;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.95);
  box-shadow:
    0 6px 18px rgba(0,0,0,.22),
    0 0 0 1px rgba(185,20,18,.12);
  text-shadow:none;
}

/* 「学校官网」：四字紧凑聚在圆心；尺寸与 .search-btn 一致（42px） */
body.ejxy-site .site-header .lang-btn{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:42px !important;
  height:42px !important;
  min-width:42px !important;
  min-height:42px !important;
  padding:0 !important;
  font-size:10px !important;
  font-weight:600 !important;
  letter-spacing:0 !important;
  line-height:1 !important;
  text-align:center;
  box-sizing:border-box;
}
body.ejxy-site .site-header .lang-btn-grid{
  display:grid;
  grid-template-columns:max-content max-content;
  grid-template-rows:max-content max-content;
  gap:0;
  place-items:center;
  line-height:1;
}
body.ejxy-site .site-header .lang-btn-grid span{
  display:block;
  width:1em;
  height:1em;
  line-height:1em;
  text-align:center;
}

@media (max-width: 1080px){
  /* 移动端：header 参与文档流，与 hero 垂直排列（不悬浮覆盖） */
  body.ejxy-site .site-header{
    position:sticky !important;
    top:0 !important;
    left:auto !important;
    right:auto !important;
    background:rgba(232,53,34,.92) !important;
    backdrop-filter:blur(16px) !important;
    -webkit-backdrop-filter:blur(16px) !important;
    border-bottom:1px solid rgba(255,255,255,.14) !important;
    box-shadow:0 6px 20px rgba(0,0,0,.12) !important;
  }

  body.ejxy-site .site-header .header-inner{
    width:min(1180px,92vw);
    max-width:none;
    height:auto;
    min-height:70px;
    gap:12px;
    padding:8px 0;
    align-items:center;
  }

  /* 强制显示汉堡菜单（主主题默认 desktop:none / ≤1080:flex） */
  body.ejxy-site .site-header .menu-btn{
    display:flex !important;
    flex:0 0 auto !important;
    width:36px !important;
    height:36px !important;
    visibility:visible !important;
    opacity:1 !important;
  }

  body.ejxy-site .site-header .header-actions{
    flex:0 0 auto !important;
    z-index:5;
    min-width:0;
    align-self:center;
  }

  body.ejxy-site .site-header .lang-btn{
    width:38px !important;
    height:38px !important;
    min-width:38px !important;
    min-height:38px !important;
    font-size:9px !important;
  }

  /* Logo + 学院名上下两行 */
  body.ejxy-site .site-header .brand{
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    justify-content:center !important;
    gap:2px !important;
    flex:1 1 auto;
    min-width:0;
    max-width:calc(100% - 130px);
  }

  body.ejxy-site .site-header .brand img{
    height:28px !important;
    max-height:28px !important;
  }

  body.ejxy-site .site-header .brand-name{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:2;
    line-clamp:2;
    max-width:100%;
    padding:5px 12px;
    font-size:13px;
    font-weight:800;
    letter-spacing:.1em;
    line-height:1.3;
    white-space:normal;
    overflow:hidden;
    text-overflow:ellipsis;
    border-radius:999px;
    border-width:1.5px;
  }

  /* 汉堡：三线绕中心旋转成 X，交点居中 */
  body.ejxy-site .site-header .menu-btn{
    position:relative !important;
    gap:0 !important;
  }
  body.ejxy-site .site-header .menu-btn span{
    position:absolute !important;
    left:50% !important;
    top:50% !important;
    width:22px !important;
    height:2px !important;
    margin:0 !important;
    background:#fff !important;
    border-radius:2px !important;
    transform:translate(-50%,-50%);
    transition:transform .28s ease,opacity .2s ease !important;
  }
  body.ejxy-site .site-header .menu-btn span:nth-child(1){
    transform:translate(-50%,calc(-50% - 7px));
  }
  body.ejxy-site .site-header .menu-btn span:nth-child(2){
    transform:translate(-50%,-50%);
  }
  body.ejxy-site .site-header .menu-btn span:nth-child(3){
    transform:translate(-50%,calc(-50% + 7px));
  }
  body.ejxy-site .site-header .menu-btn.active span:nth-child(1){
    transform:translate(-50%,-50%) rotate(45deg) !important;
  }
  body.ejxy-site .site-header .menu-btn.active span:nth-child(2){
    opacity:0 !important;
  }
  body.ejxy-site .site-header .menu-btn.active span:nth-child(3){
    transform:translate(-50%,-50%) rotate(-45deg) !important;
  }

  /* 抽屉紧贴 header 底边（高度由 JS 写入 --ejxy-header-h） */
  body.ejxy-site .site-header .main-nav{
    top:var(--ejxy-header-h,70px) !important;
    height:calc(100dvh - var(--ejxy-header-h,70px)) !important;
    margin:0 !important;
  }
}

/* ≤1080：首页 Hero 随图高，与非悬浮 header 配套 */
@media (max-width: 1080px){
  body.ejxy-home-page .ejxy-hero{
    height:auto !important;
    min-height:0 !important;
    overflow:visible;
    background:#f0f0f0;
  }
  body.ejxy-home-page .ejxy-hero img{
    width:100%;
    height:auto !important;
    max-width:100%;
    object-fit:unset !important;
    object-position:center top;
  }
}

@media (max-width: 900px){
  body.ejxy-site .site-header .brand-name{
    font-size:13px;
    max-width:100%;
  }
}

@media (max-width: 640px){
  body.ejxy-site .site-header .lang-btn,
  body.ejxy-site .site-header .search-btn{
    width:36px !important;
    height:36px !important;
    min-width:36px !important;
    min-height:36px !important;
  }
  body.ejxy-site .site-header .lang-btn{
    font-size:8.5px !important;
  }
}

/* 列表页：只保留分类标题，隐藏主主题 kicker/tagline（若被父样式带入） */
body.ejxy-site.ejxy-list-page .list-hero > div > p,
body.ejxy-site.ejxy-list-page .list-hero > div > strong,
body.ejxy-site .list-tabs{
  display:none !important;
}

body.ejxy-site.ejxy-list-page .list-hero h1{
  margin-top:12px;
}

/* 详情页：不展示主主题 kicker / 侧栏多余说明 */
body.ejxy-site.ejxy-detail-page .article-kicker{
  display:none !important;
}
body.ejxy-site.ejxy-detail-page .article-side-card p{
  display:none !important;
}

/* 列表页封面：大图居中裁剪，小图标按实际尺寸居中（由 JS 切换 class） */
body.ejxy-site.ejxy-list-page .news-row-media{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
  min-height:230px;
  background:#f3f3f3;
}

body.ejxy-site.ejxy-list-page .news-row-media img,
body.ejxy-site.ejxy-list-page .news-row img{
  width:auto !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:unset !important;
  display:block;
}

body.ejxy-site.ejxy-list-page .news-row-media img.ejxy-thumb-cover{
  width:100% !important;
  height:100% !important;
  min-height:230px;
  object-fit:cover !important;
  object-position:center center !important;
}

body.ejxy-site.ejxy-list-page .news-row-media img.ejxy-thumb-natural{
  width:auto !important;
  height:auto !important;
  max-width:100% !important;
  max-height:100% !important;
  object-fit:none !important;
}
