/* ========== 主页 Hero Section：左文字右六边形图片 ========== */

.hero-wrapper {
  width: 100vw;              /* 占满整个视口宽度 */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;        /* 从居中容器中“推出去” */
  margin-right: -50vw;
}

.hero-section {
  background: linear-gradient(120deg, #f9fbfd 0%, #edf1f5 100%);
  border-radius: 12px;
  margin-bottom: 50px;
  overflow: hidden;
}

.hero-inner {
  width: calc(100% - 40px);
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 60px 0;
  position: relative;
}

/* 左侧文字区 */
.hero-text {
  flex: 1;
  max-width: 45%;
  z-index: 2;
}

.hero-text h1 {
  font-size: 2.8em;
  color: #0a5771;
  margin-bottom: 0.4em;
  font-weight: 700;
}


.hero-text p {
  font-size: 1.1em;
  color: #333;
  line-height: 1.7;
}

/* 右侧单张六边形图片 */
.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image img {
  width: 500px;
  height: 500px;
  object-fit: cover;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* 响应式布局 */
@media (max-width: 1000px) {
  .hero-inner {
    width: calc(100% - 40px);
    flex-direction: column;
    text-align: left;
    padding: 40px 0;
  }
  .hero-text {
    max-width: 100%;
    margin-bottom: 30px;
  }
  .hero-image img {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 600px) {
  .hero-image img {
    width: 180px;
    height: 180px;
  }
}

/* ========== 原 index.md 中的 home-grid 栅格布局 ========== */

.home-body-wrapper {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(280px, 1fr);
  gap: 40px;
  align-items: start;
  width: calc(100% - 40px);
  margin-top: 30px;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== Home Contact Panel ========== */

.home-contact-panel {
  color: #999;
  font-size: .92rem;
  line-height: 1.55;
}

.contact-block {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 34px;
}

.contact-icon {
  color: #111;
  padding-top: 2px;
}

.contact-icon svg {
  width: 32px;
  height: 32px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-copy h2 {
  margin: 0 0 14px;
  color: #222;
  font-size: .92rem;
  font-weight: 500;
  letter-spacing: .28em;
  line-height: 1.2;
  text-transform: uppercase;
}

.contact-copy p {
  margin: 0 0 20px;
}

.contact-copy strong {
  color: #8c8c8c;
  font-weight: 700;
}

.contact-copy a {
  color: #222;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact-copy a:hover {
  color: #0a5771;
}

/* ========== 可复用 News 卡片样式 ========== */

.news-section .news-grid {
  display: flex;
  flex-direction: column; /* 垂直堆叠 */
  gap: 20px;              /* 卡片之间的垂直间距 */
  margin-top: 20px;
}

/* ========== 通用 News 卡片样式 (升级版) ========== */

.news-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  
  /* 关键修改：开启 Flex 布局，实现左文右图 */
  display: flex;
  justify-content: space-between; /* 两端对齐 */
  align-items: flex-start;        /* 顶部对齐 */
  gap: 24px;                      /* 文字和图片之间的间距 */
}

.news-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  border-color: #d0d0d0;
}

/* --- 左侧文字区域 --- */
.news-content {
  flex: 1; /* 占据剩余所有空间。如果没有图片，它会自动占满 */
  min-width: 0; /* 防止长文本撑破 Flex 容器 */
}

.news-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #0a5771;
  font-size: 1.25em;
  line-height: 1.3;
}

.news-content p {
  color: #444;
  font-size: 1em;
  line-height: 1.6;
  margin-bottom: 0;
}

.read-more {
  display: inline-block;
  margin-top: 12px;
  color: #0a5771;
  font-weight: 600;
  font-size: 0.9em;
  text-decoration: none;
}
.read-more:hover {
  text-decoration: underline;
}

/* --- 右侧缩略图区域 (可选) --- */
.news-thumb {
  flex-shrink: 0; /* 防止图片被挤压 */
  width: 140px;   /* 图片固定宽度，可按需调整 */
  height: 100px;  /* 图片固定高度 */
  border-radius: 6px;
  overflow: hidden;
  background-color: #f0f0f0; /* 图片加载前的占位色 */
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 保证图片填满方框且不变形 */
  display: block;
}

/* --- 移动端适配：手机上图片换行或缩小 --- */
@media (max-width: 600px) {
  .news-card {
    flex-direction: column-reverse; /* 手机上把图片放上面(column) 或 放下面(column-reverse) */
    gap: 16px;
  }
  .news-thumb {
    width: 100%; /* 手机上图片通栏 */
    height: 160px;
  }
}

/* ========== External Link 卡片 (升级版：支持多行) ========== */

.news-card.external-link {
  padding: 0; /* 移除 padding，由内部的 <a> 标签负责，为了让点击区域覆盖全卡片 */
  border: 1px solid #e8e8e8; /* 边框保留在卡片上 */
}

/* 让链接填满整个卡片 */
.news-card.external-link > a {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 20px 24px; /* Padding 移到这里 */
  text-decoration: none; /* 去掉下划线 */
  align-items: center;   /* 垂直居中 */
  justify-content: space-between;
  color: inherit;        /* 继承默认颜色 */
}

/* External Link 内部的文字容器 */
.ext-content {
  flex: 1;
  margin-right: 16px;
}

.ext-content h3 {
  margin: 0;
  font-size: 1.15em;
  color: #333;
  display: inline-block;
}

/* 支持 External Link 里的描述文字 */
.ext-content p {
  margin-top: 6px;
  font-size: 0.9em;
  color: #666;
  margin-bottom: 0;
}

.news-card.external-link:hover h3,
.news-card.external-link:hover .icon-arrow {
  color: #0a5771;
}

.icon-arrow {
  color: #999;
  font-size: 1.4em;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.news-card.external-link:hover .icon-arrow {
  transform: translate(4px, -4px);
}

/* ========== JHU blue homepage treatment ========== */

.hero-section {
  position: relative;
  background: linear-gradient(118deg, var(--jhu-pale) 0%, var(--jhu-sky) 62%, #b9dcf3 100%);
  border-top: 0;
  border-radius: 0;
}

.hero-section::after {
  content: "";
  position: absolute;
  right: -8vw;
  bottom: -170px;
  width: 430px;
  height: 430px;
  border: 70px solid rgba(0, 45, 114, .07);
  border-radius: 50%;
  pointer-events: none;
}

.hero-text h1,
.news-content h3,
.read-more,
.contact-copy a:hover,
.news-card.external-link:hover h3,
.news-card.external-link:hover .icon-arrow {
  color: var(--jhu-blue);
}

.hero-text p {
  color: var(--jhu-ink);
}

.contact-icon,
.contact-copy h2 {
  color: var(--jhu-blue);
}

.news-card {
  border-color: rgba(0, 45, 114, .14);
  border-left: 1px solid rgba(0, 45, 114, .14);
  box-shadow: 0 5px 16px rgba(0, 45, 114, .08);
}

.news-card:hover {
  border-color: rgba(0, 45, 114, .24);
  box-shadow: 0 10px 24px rgba(0, 45, 114, .14);
}

.news-section .news-card h3,
.news-section .news-card a,
.news-section .read-more,
.news-section .icon-arrow,
.news-section .news-card:hover h3,
.news-section .news-card:hover a,
.news-section .news-card:hover .icon-arrow {
  color: #111;
}

.news-section .news-card,
.news-section .news-card:hover {
  transform: none;
  border-color: rgba(0, 45, 114, .14);
  box-shadow: 0 5px 16px rgba(0, 45, 114, .08);
  transition: none;
}

.news-card.external-link:hover .icon-arrow {
  transform: none;
}
