/* 首页修正样式：集中覆盖部分模块细节，用于微调间距、层级、响应式和视觉一致性。 */
.home-page {
  --home-page-max-width: 1180px;
  --home-page-gutter: 16px;
}

.home-page .container,
.home-page .home-section > .container {
  width: min(var(--home-page-max-width), calc(100% - (var(--home-page-gutter) * 2)));
}

.home-page .home-news-layout,
.home-page .home-dual-grid,
.home-page .home-links-groups,
.home-page .home-student-list,
.home-page .home-news-side,
.home-page .home-notice-section,
.home-page .home-academic-section,
.home-page .home-student-shell,
.home-page .home-links-group,
.home-page .home-links-internal-row,
.home-page .home-links-external-grid {
  min-width: 0;
}

.home-page .home-news-layout > *,
.home-page .home-dual-grid > *,
.home-page .home-student-list > * {
  min-width: 0;
}

.home-page .home-news-layout {
  grid-template-columns: minmax(0, 1.52fr) minmax(0, 0.92fr);
}

.home-page .home-student-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-page .home-student-list a,
.home-page .home-student-list time {
  min-width: 0;
}

.home-links-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(240, 247, 252, 0.96)),
    linear-gradient(135deg, rgba(0, 104, 183, 0.04), transparent 42%);
}

.home-links-groups {
  display: grid;
  gap: 0.88rem;
}

.home-links-group-internal,
.home-links-group-external {
  min-width: 0;
}

.home-links-group {
  padding: 1.05rem 1.2rem 1.15rem;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 104, 183, 0.08);
  border-radius: 22px;
  box-shadow: 0 14px 28px rgba(0, 63, 115, 0.06);
}

.home-links-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.72rem;
}

.home-links-group-head h3 {
  margin: 0;
  color: var(--color-primary-dark);
  font: 700 1.02rem/1.2 var(--font-title);
  letter-spacing: 0.04em;
}

.home-links-group-head h3::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), rgba(0, 104, 183, 0.2));
  vertical-align: middle;
}

.home-links-internal-row,
.home-links-external-grid {
  display: grid;
  gap: 0.68rem;
  min-width: 0;
}

.home-links-internal-row {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.home-links-external-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-links-section .side-link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon line";
  justify-items: stretch;
  column-gap: 0.72rem;
  row-gap: 0.2rem;
  align-items: center;
  min-width: 0;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(0, 104, 183, 0.09);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 250, 255, 0.94));
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    background-color 0.24s ease;
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  transform: none;
}

.home-links-section .side-link .icon-box {
  grid-area: icon;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(0, 104, 183, 0.1);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 16px rgba(0, 63, 115, 0.06);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.home-links-section .side-link img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.home-links-section .side-link h3 {
  grid-area: title;
  position: static;
  margin: 0;
  width: 100%;
  min-width: 0;
  color: #4b6479;
  font-size: var(--home-link-title-size, 0.9rem);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0;
  overflow: hidden;
  pointer-events: auto;
  transition: color 0.24s ease, font-size 0.16s ease;
  align-self: end;
}

.home-links-section .side-link .line {
  grid-area: line;
  width: min(100%, 5.8rem);
  justify-self: center;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 104, 183, 0.1), rgba(0, 104, 183, 0.56), rgba(0, 104, 183, 0.1));
  transition: background 0.24s ease;
  align-self: start;
}

.home-links-section .side-link-internal {
  min-height: 72px;
}

.home-links-group-external .side-link {
  min-height: 72px;
  padding-block: 0.62rem;
}

.home-links-group-external .side-link .line {
  background: linear-gradient(90deg, rgba(0, 104, 183, 0.08), rgba(0, 104, 183, 0.56), rgba(0, 104, 183, 0.08));
}

.home-links-section .side-link:hover,
.home-links-section .side-link:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(0, 104, 183, 0.2);
  box-shadow: 0 18px 28px rgba(0, 63, 115, 0.1);
}

.home-links-section .side-link:hover .icon-box,
.home-links-section .side-link:focus-visible .icon-box {
  transform: scale(1.06);
  border-color: rgba(0, 104, 183, 0.24);
  box-shadow: 0 12px 22px rgba(0, 63, 115, 0.1);
}

.home-links-section .side-link:hover h3,
.home-links-section .side-link:focus-visible h3 {
  color: var(--color-primary);
}

.home-links-section .side-link:hover .line,
.home-links-section .side-link:focus-visible .line {
  background: linear-gradient(90deg, rgba(0, 104, 183, 0.16), rgba(0, 104, 183, 0.9), rgba(0, 104, 183, 0.16));
}

.home-links-group-external .side-link:hover .line,
.home-links-group-external .side-link:focus-visible .line {
  background: linear-gradient(90deg, rgba(0, 104, 183, 0.16), rgba(0, 104, 183, 0.92), rgba(0, 104, 183, 0.16));
}

@media (max-width: 1199.98px) {
  .home-page .home-news-layout {
    grid-template-columns: 1fr;
  }

  .home-links-external-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .home-page {
    --home-page-gutter: 14px;
  }

  .home-page .home-student-list {
    column-gap: 1.5rem;
  }

  .home-links-group {
    padding: 1rem 1rem 1.05rem;
    border-radius: 20px;
  }

  .home-links-internal-row {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }

  .home-links-external-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .home-links-section .side-link {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    transform: none !important;
  }

  .home-links-section .side-link h3,
  .home-links-section .side-link .line {
    display: block !important;
  }
}

@media (max-width: 767.98px) {
  .home-page {
    --home-page-gutter: 12px;
  }

  .home-page .home-student-list {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-flow: row;
    column-gap: 0;
  }

  .home-page .home-student-list li {
    min-width: 0;
  }

  .home-page .home-student-list a {
    flex: 1 1 auto;
    max-width: none;
  }

  .home-page .home-student-list time {
    flex: 0 0 auto;
    padding-left: 0.75rem;
  }

  .home-links-group {
    padding: 0.92rem 0.92rem 0.96rem;
    border-radius: 18px;
  }

  .home-links-group-head {
    margin-bottom: 0.64rem;
  }

  .home-links-internal-row,
  .home-links-external-grid {
    grid-template-columns: repeat(auto-fit, minmax(100%, 1fr));
  }

  .home-links-section .side-link {
    padding: 0.7rem 0.76rem;
  }

  .home-links-section .side-link .icon-box {
    width: 38px;
    height: 38px;
  }

  .home-links-section .side-link img {
    width: 18px;
    height: 18px;
  }

  .home-links-section .side-link h3 {
    font-size: 0.88rem;
    line-height: 1.2;
  }
}
