/* ============================================================
   北京司直律师事务所 — style.css
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --red:        #8C1F1F;
  --white:      #F7F7F7;
  --gold-light: #D4AF37;
  --dark:       #1a1a1a;
  --gray-text:  #3a3a3a;
  --gray-light: #e8e8e8;
  --font-serif: 'Noto Serif SC', serif;
  --font-sans:  'Noto Sans SC', sans-serif;
  --transition: 0.3s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--dark); background: var(--white); overflow-x: hidden; }
img  { display: block; max-width: 100%; }
a    { text-decoration: none; color: inherit; }

/* ============================================================
   SCREEN 1 — 100vh : banner 70% / about 30%
   ============================================================ */
.screen-1 {
  height: 100vh;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Banner */
.banner {
  position: relative;
  height: 70%;
  flex-shrink: 0;
  overflow: hidden;
}
.banner-img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}

/* About（红底） */
.about-section {
  position: relative;
  flex: 1;
  background: var(--red);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.about-watermark-svg {
  position: absolute;
  bottom: 55%; left: 20%;
  width: 80%; height: auto; max-height: 100%;
  opacity: 0.28;
  pointer-events: none; user-select: none;
  display: block; object-fit: contain; object-position: bottom left;
}
.about-inner {
  position: relative; z-index: 1;
  width: 100%; max-width: 1920px;
  margin: 0 auto;
  padding: 0 clamp(24px,5vw,128px) 0 clamp(24px,5vw,96px);
  display: flex; align-items: center;
  gap: clamp(24px,4vw,96px);
}
.about-title-wrap { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.about-dash  { font-family: var(--font-serif); font-size: clamp(16px,3vw,42px); color: rgba(255,255,255,0.8); }
.about-title { font-family: var(--font-serif); font-size: clamp(18px,3vw,72px); font-weight:700; color:#f7f7f7; white-space:nowrap; }
.about-text  { font-size: clamp(10px,1.2vw,22px); line-height:2; color:rgba(255,255,255,0.85); flex:1; max-width:960px; }

.about-btn {
  display: inline-flex; align-items: center;
  gap: clamp(10px,2vw,40px);
  border: clamp(1px,0.12vw,3px) solid rgba(255,255,255,1);
  padding: clamp(8px,1.2vw,16px) clamp(16px,2.4vw,32px);
  flex-shrink: 0; cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.btn-text {
  font-size: clamp(12px,1.3vw,32px); color:#f7f7f7;
  letter-spacing: clamp(1px,0.2vw,2px);
  transition: color var(--transition); white-space: nowrap;
}
.about-btn .btn-arrow {
  position: relative;
  width: clamp(16px,2vw,40px); height: clamp(16px,2vw,40px);
  display: flex; align-items: center; justify-content: center;
}
.arrow-icon { position: absolute; width: clamp(14px,1.8vw,32px); height: auto; transition: opacity var(--transition); }
.arrow-white { opacity:1; }
.arrow-red   { opacity:0; }
.about-btn:hover { background: var(--white); border-color: var(--white); }
.about-btn:hover .btn-text    { color: var(--red); }
.about-btn:hover .arrow-white { opacity: 0; }
.about-btn:hover .arrow-red   { opacity: 1; }


/* ============================================================
   SCREEN 2 — 100vh
   team-header 20% / card-area 80%（member-card + tabs 各 50%）
   ============================================================ */
.screen-2 {
  height: 100vh;
  min-height: 640px;
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--white);
}

/* Team Header（金底，20%） */
.team-header {
  position: relative;
  height: 20%; flex-shrink: 0;
  background: var(--gold-light);
  display: flex; align-items: center; justify-content: flex-end;
  overflow: hidden;
}
.team-watermark-svg {
  position: absolute;
  top: 60%; left: 38%;
  transform: translate(-50%,-50%);
  width: 100%; height: auto; max-height: 80%;
  opacity: 0.28;
  pointer-events: none; user-select: none; object-fit: contain;
}
.team-title-wrap {
  position: relative; z-index: 1;
  display: flex; align-items: center;
  gap: clamp(8px,1vw,20px);
  padding-right: clamp(20px,10vw,240px);
}
.team-title { font-family:var(--font-serif); font-size:clamp(18px,3vw,72px); font-weight:700; color:#f7f7f7; }
.team-dash  { font-family:var(--font-serif); font-size:22px; color:rgba(255,255,255,0.9); }

/* card-area（剩余 80%，两等分） */
.card-area {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 3vw 0;
  gap: clamp(8px,1.2vw,20px);
  background: var(--white);
}

/* ---- Member Card（card-area 上半）---- */
.member-card {
  flex: 1; min-height: 0;
  display: flex; flex-direction: row;
  align-items: stretch;
  gap: 0;
  padding: clamp(8px,1vw,16px) clamp(8px,1vw,16px);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.16);
  overflow: hidden;
  width: 100%;
  max-width: 85%;
  margin: 0 auto;
  align-self: stretch;
}

/* 照片列 */
.member-photo-wrap {
  flex: 0 0 clamp(260px,28vw,680px);
  position: relative;
  overflow: hidden;
  border-radius: 0.25rem;
}
.member-photo {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* 信息列 */
.member-info {
  flex: 1;
  min-width: 0;
  min-height: 0;

  display: flex;
  flex-direction: column;

  padding-left: clamp(8px,1.2vw,24px);
  gap: clamp(6px,0.7vw,10px);

  overflow: hidden;
}
/* 姓名 + tag */
.member-header { display: flex; align-items: center; gap: clamp(8px,1vw,16px); flex-shrink: 0; }
.member-name {
  font-family: var(--font-serif);
  font-size: clamp(20px,3vw,48px);
  font-weight: 700; color: var(--dark);
}
.member-tag {
  background: var(--red); color: #fff;
  font-size: clamp(10px,1vw,18px);
  padding: clamp(2px,0.3vw,6px) clamp(8px,1vw,18px);
  border-radius: 30px; letter-spacing: 1px;
  white-space: nowrap; flex-shrink: 0;
  display: inline-block;
  max-width: fit-content;
}

/* 联系 */
.member-contacts {
  display: flex; gap: clamp(8px,2vw,24px);
  align-items: center; flex-wrap: wrap; flex-shrink: 0;
}
.contact-item {
  display: flex; align-items: center; gap: 6px;
  font-size: clamp(12px,1vw,20px); color: #555;
}
.contact-icon { width: clamp(11px,1.1vw,20px); height: clamp(11px,1.1vw,20px); }

/* 简介文字 */
/* .member-bio {
  font-size: clamp(10px,1vw,24px);
  line-height: 1.85; color: #4A4A4A;
  flex-shrink: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
} */
.member-bio {
  position: relative;

  font-size: clamp(10px,1vw,24px);
  line-height: 1.85;
  color: #4A4A4A;
  text-indent: 2em;
  flex: 0 0 auto;

  /* 精准 4 行 */
  height: calc(1em * 1.85 * 4);

  overflow-y: scroll;
  overflow-x: hidden;

  padding-right: 4px;

  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.18) transparent;

  /* 渐隐 */
/*  -webkit-mask-image: linear-gradient(
    to bottom,
    black 90%,
    transparent 100%
  );

  mask-image: linear-gradient(
    to bottom,
    black 90%,
    transparent 100%
  ); */
}
.member-bio::-webkit-scrollbar {
  width: 3px;
}

.member-bio::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}

.member-bio::-webkit-scrollbar-track {
  background: transparent;
}

/* 代表项目 & 学术成果 */
.mg-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 0 clamp(12px,2.5vw,48px);

  flex: 1;
  min-height: 0;

  overflow: hidden;
}
.mg-bottom-row.full-width { grid-template-columns: 1fr; }
.mg-section {
  display: flex; flex-direction: column;
  gap: clamp(4px,0.5vw,8px);
  min-height: 0;
}
.mg-title {
  font-size: clamp(16px,1.53vw,42px);
  font-weight: 500; color: var(--red);
  letter-spacing: 0.5px; flex-shrink: 0;
}
.mg-line {
  width: 100%; height: 2px;
  background: var(--red);
  flex-shrink: 0;
}

/* 滚动列表 */
.project-list,
.pub-list {
  display: flex; flex-direction: column;
  gap: 0;
  flex: 1; min-height: 0;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-light) transparent;
}
.project-list::-webkit-scrollbar,
.pub-list::-webkit-scrollbar { width: 3px; }
.project-list::-webkit-scrollbar-thumb,
.pub-list::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 4px; }

/* 列表子项 — 底部细线，无 border box */
.project-item,
.pub-item {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: clamp(4px,0.5vw,9px) 0;
  /* border-bottom: 1px solid var(--gray-light); */
  font-size: clamp(10px,1vw,24px);
  color: #444; gap: 8px; flex-shrink: 0;
}
.project-item:last-child,
.pub-item:last-child { border-bottom: none; }
.project-name, .pub-name { flex: 1; line-height: 1.5; }
.dl-btn {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: clamp(20px,1.8vw,32px); height: clamp(20px,1.8vw,32px);
  cursor: pointer; opacity: 0.5;
  transition: opacity var(--transition);
}
.dl-btn:hover { opacity: 1; }
.dl-btn img { width: clamp(12px,1.2vw,22px); height: clamp(12px,1.2vw,22px); }
/* 隐藏下载按钮 — 需要时删除这段即可恢复 */
.dl-btn { display: none; }

/* ---- Team Tabs（card-area 下半）---- */
.team-tabs-wrap {
  flex: 0 0 auto;            /* 高度由内容决定 */
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
  gap: clamp(6px,1vw,16px);
  padding: 0 clamp(16px, 8vw, 12vw) 2px;  /* 与 member-card 85% 视觉对齐 */
}
.team-tabs-wrap::-webkit-scrollbar { display: none; }
.team-tabs {
  display: flex;
  gap: clamp(6px,1vw,16px);
  min-width: max-content;
}

/* 单个 tab 卡片 */
.team-tab {
  position: relative;
  display: flex; flex-direction: column;
  align-items: flex-start; justify-content: flex-end;
  gap: clamp(1px,0.3vw,4px);
  padding: clamp(8px,0.9vw,16px) clamp(12px,1.5vw,28px);
  background: #fff;
  border: 1px solid #E5E5E5;
  border-radius: 4px;
  cursor: pointer;
  min-width: clamp(80px,10vw,160px);
  transition: border-color var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.team-tab:hover { border-color: #ccc; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }

/* 顶部红色指示线 */
.tab-indicator {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
  opacity: 0;
}
.team-tab:not(.active):hover .tab-indicator { transform: scaleX(1); opacity: 1; }
.team-tab.active .tab-indicator             { transform: scaleX(1); opacity: 1; }
.team-tab.active { border-color: var(--red); }

.tab-name {
  font-family: var(--font-serif);
  font-size: clamp(16px,1.5vw,42px);
  font-weight: 500; color: var(--dark);
  white-space: nowrap;
  transition: color var(--transition);
}
.tab-role {
  font-size: clamp(8px,1vw,18px);
  color: #999; white-space: nowrap;
  transition: color var(--transition);
}
.team-tab.active .tab-name { color: var(--red); font-weight: 700; }
.team-tab.active .tab-role { color: var(--red); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--red);
  padding: clamp(24px,4vw,48px) clamp(20px,6vw,80px) clamp(16px,2vw,28px);
  color: rgba(255,255,255,0.85);
}
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: clamp(12px,1.5vw,28px);
  margin-bottom: clamp(12px,1.5vw,24px);
}
.footer-logo-wrap { display: flex; align-items: center; gap: 12px; }
.footer-logo-icon { width: clamp(180px,20vw,380px); height: auto; filter: brightness(10); }
.back-top-btn {
  background: none; border: none; outline: none;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.back-top-btn img { width: clamp(14px,1.6vw,32px); filter: brightness(10); }
.back-top-btn:hover { opacity: 0.75; }

.footer-info {
  display: flex; flex-direction: column;
  gap: 4px;
  font-size: clamp(11px,1.2vw,16px); line-height: 1.8;
  color: rgba(255,255,255,0.85);
  margin-bottom: clamp(8px,1.5vw,20px);
}
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: clamp(10px,1.2vw,20px);
  border-top: 1px solid rgba(255,255,255,0.3);
}
.footer-links { display: flex; align-items: center; gap: 8px; font-size: clamp(11px,1.2vw,16px); }
.footer-link  { color: rgba(255,255,255,0.85); transition: color var(--transition); }
.footer-link:hover { color: #fff; }
.footer-sep   { color: rgba(255,255,255,0.4); }
.footer-social { display: flex; gap: clamp(8px,1vw,16px); align-items: center; }
.social-icon-btn {
  width: clamp(22px,2vw,36px); height: clamp(22px,2vw,36px);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: opacity var(--transition);
}
.social-icon-btn:hover { opacity: 0.75; }
.social-icon-btn img { width: 100%; height: 100%; filter: brightness(10); }
.footer-icp {
  margin-top: clamp(8px,1vw,14px);
  font-size: clamp(10px,1vw,13px);
  color: rgba(255,255,255,0.5);
  line-height: 1.8;
}
.footer-icp a {
  display: inline-flex; align-items: center; gap: 4px;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}
.footer-icp a:hover { color: rgba(255,255,255,0.8); }
.footer-icp img { height: 14px; }

/* ============================================================
   RESPONSIVE ≤ 860px
   ============================================================ */
@media (max-width: 860px) {
  .screen-1, .screen-2 { height: auto; min-height: unset; overflow: visible; }

  /* Screen 1 */
  .banner { height: 52vw; min-height: 220px; max-height: 440px; }
  .about-section { min-height: 180px; padding: 24px 0; }
  .about-inner { flex-direction: column; align-items: flex-start; padding: 0 20px; gap: 12px; }
  .about-text { max-width: 100%; }

  /* Screen 2 */
  .team-header { height: auto; min-height: 100px; padding: 16px 20px; }
  .team-title-wrap { padding-right: 20px; }
  .card-area { padding: 16px 16px 12px; flex: none; overflow: visible; }

  /* card 竖排 */
  .member-card { flex-direction: column; overflow: visible; box-shadow: 0 2px 10px rgba(0,0,0,0.08); }
  .member-photo-wrap {
      width: 100%;
      height: 42vw;
  
      min-height: 220px;
      max-height: 340px;
  
      flex: none;
    }
  .member-info { overflow: visible; }
  .member-bio { -webkit-line-clamp: unset; overflow: visible;}
  .mg-bottom-row { flex: none; min-height: 160px; }
  .project-list, .pub-list { min-height: 80px; max-height: 140px; }

  /* tabs 横排 */
  .team-tabs-wrap { overflow-x: auto; flex: none; }
}

/* ≤ 580px */
@media (max-width: 580px) {
  .mg-bottom-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
}

/* @media (max-height: 900px) {
  .member-bio {
    -webkit-mask-image: none;
    mask-image: none;
  }
} */
@media (max-width: 1440px), (max-height: 900px) {

  .member-info {
    min-height: 0;
  }

  .member-bio {

    flex: 0 1 auto;

    height: auto;
    max-height: 96px;

    min-height: 0;

    overflow-y: auto;

    -webkit-mask-image: none;
    mask-image: none;
  }

}