/* ============================================================
   首页专属样式 - 大理大学交叉科学中心
   严格对标参考示意图设计规范：
   导航栏：通栏#4A5957、首页#D4C8A8浅米色圆角高亮、无logo文字
   Banner：左7/12右5/12、方形"交"字图标、#f3efe0浅米色新闻面板
   相关机构：2行4列网格、rounded-sm、金色20%边框
   页面底色：纯白#FFFFFF
   ============================================================ */

/* ========== 一、导航栏（严格对标示意图规范） ========== */

/**
 * 导航栏强制规范（外层Layout必须实现，严格对标示意图）
 * 1. 通栏深灰墨绿色 #4A5957 背景，全局白色导航文字
 * 2. 导航菜单顺序：首页、团队概况、关于我们、新闻中心、联系我们
 * 3. 「首页」使用浅米色 #D4C8A8 圆角底色高亮，其余菜单无底色
 * 4. 导航最右侧放置放大镜搜索图标
 * 5. 导航栏禁止展示「大理大学交叉科学中心」文字、无左侧独立"交"小字标识
 */

#site-header {
  background: #4A5957;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

/* 导航列表 */
.header-nav .nav-list {
  display: flex;
  gap: 2px;
}
.nav-link {
  display: inline-block;
  padding: 7px 22px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 400;
  border-radius: 4px;
  transition: all 0.25s ease;
  letter-spacing: 1px;
}
.nav-link:hover {
  background: rgba(255,255,255,0.1);
}
/* 首页浅米色圆角高亮按钮 */
.nav-link.active {
  background: #D4C8A8;
  color: #4A5957;
  font-weight: 700;
}

/* 右侧搜索图标（绝对定位靠右上角） */
.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}
.btn-search {
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
}
.btn-search:hover {
  background: rgba(255,255,255,0.12);
}
.btn-hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.btn-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 1px;
}

/* 搜索弹窗 */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 140px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.search-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.search-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  background: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  display: flex;
  align-items: center;
}
.search-input {
  flex: 1;
  padding: 14px 18px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  outline: none;
  font-family: 'Microsoft YaHei','微软雅黑',sans-serif;
}
.search-close {
  background: none;
  border: none;
  font-size: 26px;
  color: #666666;
  cursor: pointer;
  padding: 10px 16px;
  line-height: 1;
}
.search-close:hover { color: #2C1810; }

/* ========== 二、Banner区域：左7/12右5/12分栏 ========== */
.banner-section {
  padding: 24px 0 32px;  /* mb-8 间距 */
  background: #FFFFFF;
}
.banner-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;  /* 左7/12右5/12，严格对标示意图 */
  gap: 16px;
  align-items: stretch;  /* 左右等高 */
}

/* ---------- 左侧：轮播Banner ---------- */
.banner-left {
  position: relative;
}
.banner-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background: #4A5957;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  display: flex;
  align-items: flex-end;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.banner-overlay {
  position: relative;
  z-index: 2;
  padding: 36px 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 70%);
  width: 100%;
}
.banner-slogan {
  font-size: 32px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 4px;
  margin-bottom: 6px;
}
.banner-sub {
  font-size: 17px;
  color: rgba(255,255,255,0.88);
  letter-spacing: 2px;
}

/* 轮播底部圆点指示器（在轮播容器内部绝对定位于底部） */
.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 5;
}
.indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(74,89,87,0.2);
  cursor: pointer;
  transition: all 0.25s ease;
}
.indicator.active {
  background: #4A5957;
  width: 26px;
  border-radius: 5px;
}

/* ---------- 右侧信息栏：方形"交"字图标 + 标题 + 浅米色新闻面板 ---------- */
.banner-right {
  display: flex;
  flex-direction: column;
  border: 1px solid #DDDDDD;
  border-radius: 6px;
  overflow: hidden;
  background: #FFFFFF;
}

/* 顶部：方形"交"字图标 + 中心名称 */
.banner-logo-area {
  text-align: center;
  padding: 16px 16px 8px;
  background: #FFFFFF;
}
.center-logo { margin-bottom: 12px; }

/* 方形"交"字图标：正方形96x96，深灰墨绿底色 */
.center-logo .logo-placeholder {
  width: 96px;
  height: 96px;
  background: #4A5957;
  border-radius: 0;  /* 正方形无圆角 */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: bold;
  color: #D4C8A8;  /* 浅米色文字 */
}
.logo-main {
  width: 96px;
  height: 96px;
  margin: 0 auto;
  object-fit: contain;
}
.center-title {
  font-size: 20px;
  font-weight: 700;
  color: #2C1810;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

/* 下半部：浅米色 #f3efe0 新闻面板 */
.banner-news {
  background: #f3efe0;
  padding: 16px;
  flex: 1;
}
.banner-news-header {
  margin-bottom: 8px;
}
.banner-news-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #2C1810;
}

/* 新闻列表：左标题右日期 + 细分割线 */
.banner-news-list li {
  border-bottom: 1px solid #DDD;
}
.banner-news-list li:last-child { border-bottom: none; }
.banner-news-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  font-size: 13px;
  color: #333333;
  transition: all 0.2s ease;
  line-height: 1.45;
}
.banner-news-list a:hover { color: #4A5957; }
.news-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-date {
  font-size: 12px;
  color: #888888;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ========== 三、相关机构板块（2行4列网格） ========== */
.institutions-section {
  background: #FFFFFF;
  padding: 0 0 24px;  /* mb-6 间距 */
}
.institutions-header {
  margin-bottom: 16px;  /* mb-4 */
}
.institutions-title {
  font-size: 18px;
  font-weight: 700;
  color: #2C1810;
  letter-spacing: 1px;
}

/* 机构网格：固定4列 × 2行 = 8张卡片 */
.institutions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* 单个机构卡片：白底、rounded-sm小圆角、金色边框 */
.institution-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 14px;
  background: #FFFFFF;
  border: 1px solid rgba(212,175,55,0.2);  /* #D4AF37 20%透明 */
  border-radius: 2px;  /* rounded-sm */
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.institution-card:hover {
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  border-color: rgba(212,175,55,0.4);
}

/* 圆形标识图标 */
.inst-icon-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.inst-icon-placeholder {
  width: 48px;
  height: 48px;
  background: #4A5957;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 20px;
  font-weight: 700;
}
.inst-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
}

/* 文字信息区 */
.inst-info {
  flex: 1;
  min-width: 0;
}
.inst-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #2C1810;
  margin-bottom: 3px;
  line-height: 1.35;
}
.inst-desc {
  font-size: 12px;
  color: #777777;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* 联系我们卡片特殊样式 */
.inst-card-contact .inst-icon-placeholder {
  background: #f3efe0;
  border: 1.5px solid #4A5957;
  color: #4A5957;
  font-size: 14px;
  font-weight: 400;
}

/* 移除旧箭头指示器 */
.institution-card-link::after { content: none !important; }
.institution-card-link .inst-desc { padding-right: 0 !important; }

/* ========== 四、页脚 ========== */
#site-footer {
  background: #4A5957;
  color: rgba(255,255,255,0.85);
  padding: 36px 0 22px;
  font-size: 14px;
  line-height: 2;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
}
.footer-info h3 {
  font-size: 16px;
  color: #FFFFFF;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-links a {
  color: rgba(255,255,255,0.75);
  transition: all 0.25s ease;
}
.footer-links a:hover { color: #D4C8A8; }
.footer-bottom {
  width: 100%;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.15);
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* ========== 响应式 ========== */

@media (max-width: 1024px) {
  .institutions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .banner-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 768px) {
  .header-nav {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: #4A5957;
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 999;
  }
  .header-nav.open {
    max-height: 280px;
    padding: 12px 16px;
  }
  .header-nav .nav-list {
    flex-direction: column;
    gap: 2px;
  }
  .header-nav .nav-link {
    display: block;
    padding: 10px 12px;
  }
  .btn-hamburger { display: flex; }

  .banner-section { padding: 16px 0 24px; }
  .banner-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .banner-slogan { font-size: 24px; letter-spacing: 2px; }
  .banner-sub { font-size: 15px; }

  .institutions-section { padding: 0 0 16px; }
  .institutions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .institution-card { padding: 14px 12px; gap: 10px; }
  .inst-icon-wrap { width: 42px; height: 42px; }
  .inst-icon-placeholder { width: 42px; height: 42px; font-size: 18px; }
  .inst-name { font-size: 13px; }
  .inst-desc { font-size: 11px; -webkit-line-clamp: 1; }

  .banner-news-list a {
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
  }

  .footer-inner { flex-direction: column; gap: 20px; }
  .header-actions { right: 12px; }

  .center-logo .logo-placeholder {
    width: 72px;
    height: 72px;
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .institutions-grid { grid-template-columns: 1fr; }
  .banner-slogan { font-size: 20px; }
  .center-title { font-size: 17px; }
  .nav-link { padding: 7px 16px; font-size: 13px; }
  .center-logo .logo-placeholder {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
}
