/* ========== Reset & Base ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: #333; background: #fff; line-height: 1.6; font-size: 15px;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Top bar frosted glass (source of truth: this file under templates/assets for Halo) */
:root {
  --glass-bg: rgba(255, 255, 255, 0.78);
  --glass-border: rgba(255, 255, 255, 0.45);
}

/* 顶栏毛玻璃在 modules/header.html 内联 .sticky-nav-backdrop */

/* ========== Header ========== */
.site-header {
  background: #fff; border-bottom: 1px solid #e8e8e8;
  position: sticky; top: 0; z-index: 1000;
}
.header-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 50px; }
.logo-text h1 { font-size: 22px; color: #0a6e3f; font-weight: 700; letter-spacing: 2px; }
.logo-text p { font-size: 12px; color: #888; letter-spacing: 1px; }

.header-actions { display: flex; align-items: center; gap: 16px; font-size: 14px; color: #666; }
.header-actions a:hover { color: #0d7dc4; }
.search-box {
  display: flex; align-items: center; border: 1px solid #ddd;
  border-radius: 20px; padding: 4px 12px; gap: 6px;
}
.search-box input {
  border: none; outline: none; font-size: 13px; width: 120px;
  background: transparent;
}
.search-box button {
  border: none; background: none; cursor: pointer; color: #999; font-size: 14px;
}

/* ========== Navigation ========== */
.main-nav { background: #0d7dc4; }
.main-nav .container { display: flex; align-items: stretch; }
.nav-list { display: flex; width: 100%; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 14px 24px; color: #fff; font-size: 15px;
  font-weight: 500; transition: background .2s;
}
.nav-item > a:hover, .nav-item:hover > a { background: #0a6aab; }
.nav-item.active > a { background: #095d96; }

/* Dropdown */
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  background: #fff; min-width: 180px; box-shadow: 0 4px 16px rgba(0,0,0,.12);
  border-radius: 0 0 4px 4px; z-index: 100; padding: 8px 0;
}
.nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: block; padding: 10px 20px; color: #444; font-size: 14px;
  transition: all .15s;
}
.nav-dropdown a:hover { background: #f0f7fc; color: #0d7dc4; }

/* ========== Hero Banner ========== */
.hero {
  position: relative; height: 480px; overflow: hidden;
  background: linear-gradient(135deg, #e8f4fd 0%, #cde9f7 50%, #b0d8f0 100%);
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover;
  background-position: center; opacity: .85;
}
.hero-content {
  position: relative; z-index: 2; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.hero-text { max-width: 500px; }
.hero-text h2 {
  font-size: 38px; color: #c41a1a; font-weight: 700;
  line-height: 1.3; margin-bottom: 20px; text-shadow: 0 1px 4px rgba(255,255,255,.8);
}
.hero-text p { font-size: 16px; color: #555; margin-bottom: 28px; }
.hero-btn {
  display: inline-block; padding: 12px 36px; background: #0d7dc4;
  color: #fff; border-radius: 4px; font-size: 15px; font-weight: 500;
  transition: background .2s;
}
.hero-btn:hover { background: #095d96; }

.hero-video {
  width: 420px; height: 260px; background: rgba(0,0,0,.06);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(4px);
}
.hero-video .play-btn {
  width: 64px; height: 64px; border-radius: 50%; background: rgba(13,125,196,.85);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .2s;
}
.hero-video .play-btn:hover { transform: scale(1.1); }
.hero-video .play-btn::after {
  content: ""; border-style: solid; border-width: 12px 0 12px 22px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}

/* ========== Section Common ========== */
.section { padding: 60px 0; }
.section-title {
  text-align: center; margin-bottom: 40px;
}
.section-title h2 {
  font-size: 28px; color: #222; font-weight: 700; margin-bottom: 8px;
}
.section-title p { font-size: 14px; color: #999; }
.section-title::after {
  content: ""; display: block; width: 50px; height: 3px;
  background: #0d7dc4; margin: 12px auto 0;
}
.section-alt { background: #f7fafe; }

/* ========== Home Grid: 3 columns ========== */
.home-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.home-card {
  background: #fff; border-radius: 8px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.06); transition: transform .2s, box-shadow .2s;
}
.home-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.home-card-img {
  height: 200px; background: #e8f0f5; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.home-card-img img { width: 100%; height: 100%; object-fit: cover; }
.home-card-body { padding: 20px; }
.home-card-body h3 { font-size: 18px; color: #222; margin-bottom: 8px; }
.home-card-body p { font-size: 14px; color: #777; line-height: 1.7; }

/* ========== Article List ========== */
.article-list { display: flex; flex-direction: column; gap: 20px; }
.article-item {
  display: flex; gap: 20px; padding: 20px;
  background: #fff; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.05);
  transition: box-shadow .2s;
}
.article-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.article-thumb { width: 200px; height: 130px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-info { flex: 1; }
.article-info h3 { font-size: 18px; color: #222; margin-bottom: 8px; }
.article-info h3 a:hover { color: #0d7dc4; }
.article-info p { font-size: 14px; color: #888; line-height: 1.7; }
.article-meta { margin-top: 10px; font-size: 12px; color: #aaa; }

/* ========== Post Detail ========== */
.post-detail { max-width: 860px; margin: 0 auto; padding: 40px 20px; }
.post-header { margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.post-header h1 { font-size: 28px; color: #222; margin-bottom: 12px; }
.post-header .meta { font-size: 13px; color: #999; }
.post-content { line-height: 1.9; font-size: 16px; color: #444; }
.post-content > :first-child { margin-top: 0; }
.post-content h2 { font-size: 22px; margin: 28px 0 12px; color: #222; }
.post-content h3 { font-size: 18px; margin: 24px 0 10px; color: #333; }
.post-content p { margin-bottom: 16px; }
.post-content img { border-radius: 4px; margin: 16px 0; }
.post-content blockquote {
  border-left: 4px solid #0d7dc4; padding: 12px 20px;
  background: #f7fafe; margin: 16px 0; color: #555;
}

/* ========== Page ========== */
.page-content { max-width: 960px; margin: 0 auto; padding: 40px 20px; }
.page-content h1 { font-size: 28px; color: #222; margin-bottom: 24px; text-align: center; }

/* ========== Footer ========== */
.site-footer { background: #1a2a3a; color: #ccc; padding: 40px 0 20px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 30px;
}
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.footer-col p, .footer-col a { font-size: 14px; color: #aaa; line-height: 2; }
.footer-col a:hover { color: #5bb8f5; }
.footer-bottom {
  border-top: 1px solid #2a3a4a; padding-top: 16px;
  text-align: center; font-size: 13px; color: #777;
}

/* ========== Language Toggle ========== */
.lang-toggle button.active { background: var(--primary-blue, #0056b3); color: #fff; }
.lang-toggle button:not(.active) { color: #6b7280; background: transparent; }
.lang-toggle button:not(.active):hover { color: var(--primary-blue, #0056b3); }

@media (max-width: 768px) {
    .desktop-lang-toggle { display: none !important; }
}

/* ========== Responsive ========== */
/* DNA helix fade overlays — desktop width handled by Tailwind w-[min(100%,52rem)] */

@media (max-width: 1024px) {
  .dna-fade-left  { width: 65% !important; }
  .dna-fade-right { width: 45% !important; }
}
@media (max-width: 640px) {
  .dna-fade-left  { width: 55% !important; }
  .dna-fade-right { width: 25% !important; }
}

@media (max-width: 768px) {
  .header-top { flex-wrap: wrap; gap: 10px; }
  .nav-list { flex-wrap: wrap; }
  .nav-item > a { padding: 10px 16px; font-size: 14px; }
  .hero { height: auto; padding: 40px 0; }
  .hero-content { flex-direction: column; gap: 24px; text-align: center; }
  .hero-text h2 { font-size: 26px; }
  .hero-video { width: 100%; max-width: 360px; height: 220px; }
  .home-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-item { flex-direction: column; }
  .article-thumb { width: 100%; height: 180px; }
}
