/* 森途学苑 V3 · 头部/底部/子库卡片样式 */
:root {
  --ink: #1d3154;
  --text: #596b85;
  --muted: #8a99af;
  --orange: #ff8b40;
  --line: #e8eef7;
  --blue: #6eacf0;
  --page: #f4f9ff;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(79, 126, 177, 0.035);
}

/* SVG 图标源 */
.icon-source {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* 图标基类 */
.designed-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  vertical-align: middle;
}
.asset-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  flex-shrink: 0;
}

/* 顶部品牌条 */
.brand-header {
  width: 90%;
  max-width: 1280px;
  margin: auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
  position: relative;
  z-index: 1001;
}
.brand-header a.brand,
.brand-header a.brand:visited {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}
.brand > .designed-icon {
  width: 36px;
  height: 36px;
}
.brand strong {
  font-size: 26px;
  line-height: 1.2;
  color: #fa873e;
  font-weight: 750;
  letter-spacing: 1px;
}
.brand-header > span {
  font-size: 12px;
  color: #8d9bb0;
  letter-spacing: 0.3px;
  padding-left: 20px;
  border-left: 1px solid #dae5f0;
}
.brand-header > .v3-search-box {
  margin-left: auto;
}
.v3-search-box {
  width: 270px;
  border: 1px solid #e7eef6;
  border-radius: 22px;
  background: #ffffffc9;
  color: #536b90;
  height: 36px;
  padding: 0 17px;
  font-size: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  box-shadow: inset 0 1px 3px #6c8dab02;
  box-sizing: border-box;
}
.v3-search-box::placeholder {
  color: #a3b0c2;
}
.v3-brand-actions {
  margin-left: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #75849a;
  font-size: 12px;
  white-space: nowrap;
}
.v3-brand-actions a,
.v3-brand-actions span {
  color: #75849a;
  cursor: pointer;
  text-decoration: none;
}
.v3-brand-actions a:hover,
.v3-brand-actions span:hover {
  color: #ff8b40;
}
.v3-brand-actions i {
  height: 12px;
  border-left: 1px solid #dce4ed;
  display: inline-block;
}
/* 登录后用户区域 */
.v3-user-area {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #596b85;
  position: relative;
  cursor: pointer;
}
.v3-user-area img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}
.v3-user-name {
  color: #3d5478;
  font-weight: 500;
}
.v3-user-dropdown {
  position: absolute;
  top: 42px;
  right: 0;
  background: #fff;
  border: 1px solid #e2ebf5;
  border-radius: 10px;
  box-shadow: 0 12px 40px #2f527421;
  min-width: 130px;
  display: none;
  z-index: 200;
  overflow: hidden;
}
.v3-user-area:hover .v3-user-dropdown {
  display: block;
}
/* 透明“桥”填补触发区与下拉菜单之间的间隙。
   注意：下拉设了 overflow:hidden，会裁掉它自身的伪元素，所以桥放在触发区(.v3-user-area)上；
   仅在 hover 时开启 pointer-events，避免菜单关闭时挡住下方导航的点击。 */
.v3-user-area::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 150px;
  height: 18px;
  pointer-events: none;
}
.v3-user-area:hover::after {
  pointer-events: auto;
}
.v3-user-dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 13px;
  color: #4b6282;
  text-decoration: none;
}
.v3-user-dropdown a:hover {
  background: #fff4eb;
  color: #ef8846;
}

/* 粘性导航栏 */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffffeb;
  backdrop-filter: blur(14px);
  border-top: 1px solid #edf3fa;
  border-bottom: 1px solid #e5edf7;
  min-height: 48px;
  padding: 0 5%;
  box-shadow: 0 3px 10px #8ca9c002;
}
.nav-left {
  max-width: 1280px;
  margin: auto;
  min-height: 48px;
  display: flex;
  align-items: center;
}
.nav-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.nav-links > a,
.nav-menu > summary {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: #52617a;
  text-decoration: none;
}
.nav-links > a.active {
  color: #f78b46;
  position: relative;
  font-weight: 650;
  padding: 13px 0;
}
.nav-links > a.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: #ff9b55;
}
.nav-links > a:hover,
.nav-menu > summary:hover,
.nav-menu[open] > summary {
  color: #f78b46;
}
.nav-links > .sentu-link {
  color: #f88942;
  border: 1px solid #ffd9b8;
  border-radius: 20px;
  padding: 5px 14px;
  background: #fffefa;
  box-shadow: 0 2px 8px #ffb36a0a;
}
.nav-menu {
  position: relative;
}
.nav-menu > summary {
  padding: 13px 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.nav-menu > summary::-webkit-details-marker {
  display: none;
}
.nav-menu > summary::after {
  content: "";
  width: 4px;
  height: 4px;
  border-right: 1px solid #a4b0c1;
  border-bottom: 1px solid #a4b0c1;
  transform: rotate(45deg);
  margin-top: -3px;
  opacity: 0.8;
  display: inline-block;
}
.dropdown {
  position: absolute;
  top: 44px;
  left: -18px;
  display: grid;
  grid-template-columns: 1fr;
  min-width: 205px;
  max-height: 65vh;
  overflow: auto;
  background: #fff;
  padding: 12px;
  border: 1px solid #e2ebf5;
  border-radius: 12px;
  box-shadow: 0 12px 40px #2f527421;
  gap: 2px;
  z-index: 110;
}
.dropdown a {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 6px;
  color: #4b6282;
  white-space: nowrap;
  text-decoration: none;
  display: block;
}
.dropdown a:hover {
  color: #ef8846;
  background: #fff4eb;
}
.dropdown b {
  grid-column: 1/-1;
  padding: 10px 12px 4px;
  font-size: 11px;
  letter-spacing: 1px;
  font-weight: 600;
  color: #9aa8ba;
  border-top: 1px solid #f0f4f9;
  display: block;
}
.dropdown b:first-child {
  border: 0;
}
.nav-menu:nth-of-type(1) .dropdown,
.nav-menu:nth-of-type(2) .dropdown {
  grid-template-columns: 1fr 1fr;
  min-width: 355px;
}

/* 子库卡片区（8个图书馆入口） */
.legacy-libraries {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.library-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid #e6eef9;
  border-radius: 12px;
  background: #fff;
  padding: 13px 13px 15px;
  min-height: 108px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.library-card > .asset-icon {
  width: 66px;
  height: 66px;
  flex-shrink: 0;
}
.library-card > div {
  min-width: 0;
}
.library-card h3 {
  font-size: 13px;
  font-weight: 650;
  color: #475d7f;
  line-height: 1.55;
  margin: 0 0 6px;
}
.library-card p {
  font-size: 10px;
  line-height: 1.75;
  color: #a1b0c4;
  padding-right: 1px;
  max-width: 210px;
  margin: 0;
}
.lib-num {
  position: absolute;
  bottom: 6px;
  right: 10px;
  color: #bed1e3;
  font-size: 9px;
  line-height: 1.5;
}
.library-card:hover {
  transform: translateY(-3px);
  border-color: #c9e0f6;
  box-shadow: 0 7px 18px #5f8fb810;
}

/* 底部 */
.v3-footer {
  text-align: center;
  padding: 18px 5% 28px;
  background: transparent;
  border-top: 1px solid #edf4fa;
}
.v3-footer-logo {
  font-size: 22px;
  line-height: 1.5;
  font-weight: 700;
  color: #fa8c43;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.v3-footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-bottom: 8px;
}
.v3-footer-links a {
  font-size: 11px;
  color: #a5b3c5;
  line-height: 1.8;
  text-decoration: none;
}
.v3-footer-links a:hover {
  color: #f5a067;
}
.v3-footer-copy {
  font-size: 10px;
  color: #b3bfd0;
  line-height: 1.8;
}

/* 头部搜索功能 */
.v3-search-wrap {
  display: flex;
  margin-left: auto;
  position: relative;
}
.v3-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #a3b0c2;
  font-size: 14px;
  padding: 0;
}

/* 响应式：1120px 以下 */
@media (max-width: 1120px) {
  .brand-header > span {
    font-size: 10px;
    padding-left: 15px;
  }
  .brand-header {
    gap: 15px;
  }
  .v3-search-box {
    width: 210px;
  }
  .v3-brand-actions {
    margin-left: 12px;
    gap: 12px;
  }
  .nav-links {
    gap: 12px;
  }
  .nav-links > a,
  .nav-menu > summary {
    font-size: 11px;
  }
  .legacy-libraries {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 响应式：760px 以下 */
@media (max-width: 760px) {
  .brand-header {
    height: auto;
    padding: 12px 5%;
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand-header > span {
    display: none;
  }
  .v3-search-box {
    width: 100%;
    order: 3;
  }
  .top-nav {
    position: static;
    overflow-x: auto;
    padding: 0 3%;
  }
  .nav-links {
    gap: 8px;
    width: max-content;
  }
  .nav-links > a,
  .nav-menu > summary {
    font-size: 12px;
  }
  .legacy-libraries {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .v3-footer-links {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* IP 范围外提示条 */
.ip-notice-bar {
  width: 100%;
  background: #fff8f0;
  border-bottom: 1px solid #ffd9b8;
  text-align: center;
  padding: 7px 5%;
  font-size: 12px;
  color: #b85c00;
  line-height: 1.6;
  box-sizing: border-box;
}
.ip-notice-bar strong {
  color: #ff6c00;
  font-weight: 600;
}
