/* ==========================================================================
   home.css — 首页专用样式
   前缀：opgdi-home-
   包含：Hero / Latest News / Research Clusters / Upcoming Events
   适配：WordPress + Blocksy + GreenShift
   
   浏览器支持：
   - Chrome 88+  ✅
   - Firefox 89+ ✅
   - Safari 15+  ✅ (Safari 14 不支持 aspect-ratio，但占用率极低)
   - Edge 88+    ✅
   - IE 11       ❌ (IE 已停止支持，忽略)
   
   每个区块独立运行，不依赖外层容器
   ========================================================================== */


/* ─────────────────────────────────────────────
   Hero 大图
   ───────────────────────────────────────────── */

.opgdi-home-hero {
  width: 100%;
  height: 680px;
  background-image: url('/wp-content/uploads/2026/04/dsc03498.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: block;
}

.opgdi-home-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 80px 80px;
  border-color: transparent transparent #000 transparent;
  pointer-events: none;
}

@media (max-width: 768px) {
  .opgdi-home-hero { height: 400px; }
}


/* ─────────────────────────────────────────────
   Latest News
   ───────────────────────────────────────────── */

.opgdi-home-news {
  padding: 60px 0;
  background: #f0f0ec;
  font-family: 'Lora', Georgia, serif;
}

.opgdi-home-news__wrap {
  padding: 0 95px;
  box-sizing: border-box;
}

.opgdi-home-news__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #002147;
  margin: 0 0 30px;
}

.opgdi-home-news__carousel {
  position: relative;
}

.opgdi-home-news__btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: #862433;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
  line-height: 1;
}

.opgdi-home-news__btn--prev { left: -40px; }
.opgdi-home-news__btn--next { right: -40px; }

.opgdi-home-news__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.opgdi-home-news__card {
  background: #fff;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.opgdi-home-news__img {
  width: 100%;
  aspect-ratio: 16 / 9;          /* Chrome 88+, FF 89+, Safari 15+ */
  object-fit: cover;
  object-position: center;
  display: block;
}

.opgdi-home-news__body {
  padding: 20px 24px 24px;
}

.opgdi-home-news__card-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: #002147;
  margin: 0 0 10px;
  line-height: 1.35;
}

.opgdi-home-news__card:hover .opgdi-home-news__card-title {
  color: #694002;
  text-decoration: underline;
}

.opgdi-home-news__date {
  font-size: 15px;
  color: #444;
  font-style: italic;
}

.opgdi-home-news__dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.opgdi-home-news__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.opgdi-home-news__dot--active { background: #862433; }

.opgdi-home-news__pause {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #555;
  border: none;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
}


/* ─────────────────────────────────────────────
   Research Clusters
   ───────────────────────────────────────────── */

.opgdi-home-research {
  padding: 60px 0;
  background: #fff;
  font-family: 'Lora', Georgia, serif;
}

.opgdi-home-research__wrap {
  padding: 0 95px;
  box-sizing: border-box;
}

.opgdi-home-research__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #002147;
  margin: 0 0 30px;
}

.opgdi-home-research__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 20px;
}

.opgdi-home-research__card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.opgdi-home-research__img {
  width: 100%;
  aspect-ratio: 16 / 9;          /* Chrome 88+, FF 89+, Safari 15+ */
  object-fit: cover;
  object-position: center;
  display: block;
  background: #f0f0ec;
}

.opgdi-home-research__card-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 18px;
  font-weight: 400;
  color: #002147;
  margin: 12px 0 0;
  line-height: 1.3;
}

.opgdi-home-research__card:hover .opgdi-home-research__card-title {
  color: #694002;
  text-decoration: underline;
}


/* ─────────────────────────────────────────────
   Upcoming Events
   ───────────────────────────────────────────── */

.opgdi-home-events {
  padding: 60px 0;
  background: #f0f0ec;
  font-family: 'Lora', Georgia, serif;
}

.opgdi-home-events__wrap {
  padding: 0 95px;
  box-sizing: border-box;
  position: relative;
}

.opgdi-home-events__title {
  font-family: 'Lora', Georgia, serif;
  font-size: 32px;
  font-weight: 400;
  color: #002147;
  margin: 0 0 30px;
}

.opgdi-home-events__btn {
  position: absolute;
  top: 55%;
  transform: translateY(-50%);
  width: 40px;
  height: 80px;
  background: #862433;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 0;
}

.opgdi-home-events__btn--prev { left: 50px; }
.opgdi-home-events__btn--next { right: 50px; }

.opgdi-home-events__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.opgdi-home-events__card {
  background: #fff;
  display: flex;
  flex-direction: column;
}

.opgdi-home-events__img-wrap {
  position: relative;
  overflow: hidden;
}

.opgdi-home-events__img {
  width: 100%;
  aspect-ratio: 16 / 10;         /* Chrome 88+, FF 89+, Safari 15+ */
  object-fit: cover;
  display: block;
  background: #f0f0ec;
}

.opgdi-home-events__badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #862433;
  color: #fff;
  padding: 10px 18px;
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  font-weight: bold;
  z-index: 2;
}

.opgdi-home-events__link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #ffe296;
  color: #694002;
  padding: 18px 28px;
  font-family: 'Lora', Georgia, serif;
  font-size: 22px;
  text-decoration: none;
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  min-width: 280px;
  transition: background 0.2s;
}

.opgdi-home-events__link:hover {
  background: #fcce51;
  color: #694002;
  text-decoration: none;
}

.opgdi-home-events__link-arrow {
  font-size: 28px;
  font-weight: bold;
  margin-left: 16px;
  line-height: 1;
}

.opgdi-home-events__body {
  padding: 16px 20px 24px;
}

.opgdi-home-events__type {
  font-size: 13px;
  color: #666;
  font-weight: bold;
  margin-bottom: 4px;
}

.opgdi-home-events__card-title {
  font-family: 'Lora', Georgia, serif;
  font-size: 20px;
  font-weight: 400;
  color: #002147;
  margin: 4px 0 8px;
  line-height: 1.3;
}

.opgdi-home-events__location {
  font-size: 15px;
  color: #444;
}


/* ─────────────────────────────────────────────
   响应式（所有首页区块）
   ───────────────────────────────────────────── */

@media (max-width: 1200px) {
  .opgdi-home-news__wrap,
  .opgdi-home-research__wrap,
  .opgdi-home-events__wrap { padding: 0 40px; }

  .opgdi-home-research__grid { grid-template-columns: repeat(2, 1fr); }
  .opgdi-home-events__grid   { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .opgdi-home-news__wrap,
  .opgdi-home-research__wrap,
  .opgdi-home-events__wrap { padding: 0 20px; }

  .opgdi-home-news__grid     { grid-template-columns: 1fr; }
  .opgdi-home-research__grid { grid-template-columns: 1fr; }
  .opgdi-home-events__grid   { grid-template-columns: 1fr; }

  .opgdi-home-news__btn--prev { left: 0; }
  .opgdi-home-news__btn--next { right: 0; }
}
