/* ============================================================
   济外新闻 · 红色主题样式
   主色：中国红  /  金色点缀  /  中学生校园氛围
   ============================================================ */

:root {
  --red: #c8102e;          /* 中国红 */
  --red-bright: #e0203a;   /* 亮红 */
  --red-dark: #9e0b23;     /* 深红 */
  --red-deeper: #6e0719;   /* 更深红（渐变底） */
  --gold: #f0c24b;         /* 金 */
  --gold-light: #f8dfa0;
  --ink: #26221f;          /* 正文深色 */
  --muted: #7a726a;        /* 次要文字 */
  --bg: #faf6f1;           /* 米白背景 */
  --card: #ffffff;
  --line: #f0e7dc;

  --shadow-sm: 0 2px 10px rgba(110, 7, 25, .08);
  --shadow-md: 0 10px 30px rgba(110, 7, 25, .16);
  --shadow-lg: 0 20px 50px rgba(110, 7, 25, .22);

  --radius: 16px;
  --maxw: 1120px;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---------- 顶部阅读进度条 ---------- */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--red-bright), var(--gold));
  z-index: 999;
  transition: width .1s linear;
}

/* ============================================================
   导航栏
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background .35s ease, box-shadow .35s ease, height .35s ease;
  background: transparent;
}

.nav.scrolled {
  background: linear-gradient(90deg, var(--red-deeper), var(--red-dark) 55%, var(--red));
  box-shadow: var(--shadow-md);
}

.nav-inner {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
  color: #fff;
}

.brand .logo-flag {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--red-bright), var(--red-deeper));
  display: grid;
  place-items: center;
  font-size: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

.brand .logo-flag::after {
  content: "济外";
  font-weight: 800;
  font-size: 13px;
  color: #fff;
}

.nav-links { display: flex; gap: 6px; list-style: none; }

.nav-links a {
  display: block;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .5px;
  transition: background .25s ease, transform .25s ease;
}

.nav-links a:hover { background: rgba(255,255,255,.18); }
.nav-links a.active { background: rgba(255,255,255,.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }

/* 首页导航透明时文字用深色，滚动后用白色 */
.nav:not(.scrolled) .brand,
.nav:not(.scrolled) .nav-links a { color: #fff; }

/* ============================================================
   Hero 横幅
   ============================================================ */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--nav-h) + 40px) 24px 72px;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(160deg,
      rgba(110,7,25,.55) 0%, rgba(158,11,35,.35) 45%, rgba(110,7,25,.72) 100%),
      url("../images/hero.jpg");
  color: #fff;
  overflow: hidden;
}

/* 扫光动画 */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: sweep 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes sweep {
  0%   { background-position: 150% 0; }
  55%  { background-position: -80% 0; }
  100% { background-position: -80% 0; }
}

.hero-inner { max-width: var(--maxw); margin: 0 auto; width: 100%; }

.hero .kicker {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--red-deeper);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 18px;
  animation: fadeUp .8s .1s both;
}

.hero h1 {
  font-size: clamp(30px, 5.5vw, 56px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 3px 20px rgba(0,0,0,.35);
  animation: fadeUp .8s .25s both;
}

.hero .sub {
  margin-top: 18px;
  max-width: 620px;
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,.92);
  animation: fadeUp .8s .4s both;
}

.hero .date-chip {
  margin-top: 28px;
  display: flex; gap: 12px; flex-wrap: wrap;
  animation: fadeUp .8s .55s both;
}

.hero .date-chip span {
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  font-size: 13.5px;
  border: 1px solid rgba(255,255,255,.28);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   特色专访区块（首页置顶突出）
   ============================================================ */
.featured {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 56px 24px 0;
  position: relative;
  z-index: 5;
}

.featured-link {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 52px 56px;
  color: #fff;
  background: linear-gradient(120deg, #6e0719 0%, #9e0b23 42%, #c8102e 100%);
  box-shadow: var(--shadow-lg);
  transition: transform .35s ease, box-shadow .35s ease;
  isolation: isolate;
}

.featured-link:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(110, 7, 25, .35);
}

/* 右侧大字「师」水印 */
.featured-link::before {
  content: "师";
  position: absolute;
  right: 34px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 230px;
  font-weight: 900;
  line-height: 1;
  color: rgba(255, 255, 255, .08);
  pointer-events: none;
}

/* 扫光动画 */
.featured-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.16) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: sweep 6s ease-in-out infinite;
}

.featured-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--red-deeper);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 2px;
  margin-bottom: 18px;
}

.featured h2 {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 900;
  letter-spacing: 2px;
  line-height: 1.2;
}

.featured-sub {
  margin-top: 10px;
  font-size: 16px;
  color: var(--gold-light);
  letter-spacing: 1px;
}

.featured-quote {
  margin-top: 24px;
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  border-left: 3px solid var(--gold);
  padding-left: 16px;
}

.featured-desc {
  margin-top: 16px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .86);
}

.featured-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 12px 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--red-deeper);
  font-weight: 800;
  letter-spacing: 1px;
  transition: gap .3s ease, transform .3s ease, background .3s ease;
}

.featured-link:hover .featured-btn { gap: 12px; }
.featured-btn:hover { background: var(--gold-light); }

/* ============================================================
   主体布局
   ============================================================ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.section { padding: 64px 0; }

.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 900;
  color: var(--red-deeper);
  letter-spacing: 1px;
}

.section-head .bar {
  width: 56px; height: 4px;
  margin: 14px auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
}

.section-head p { margin-top: 12px; color: var(--muted); font-size: 15px; }

/* ============================================================
   新闻卡片网格
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .35s ease, box-shadow .35s ease;
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.card .thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eee;
}

.card .thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}

.card:hover .thumb img { transform: scale(1.07); }

.card .thumb.no-img {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--red), var(--red-deeper));
  color: #fff;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 2px;
}

.card .tag {
  position: absolute;
  top: 14px; left: 14px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}

.card .tag.gold { background: var(--gold); color: var(--red-deeper); }

.card-body { padding: 22px 24px 24px; flex: 1; display: flex; flex-direction: column; }

.card-body h3 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 10px;
  transition: color .25s ease;
}

.card:hover .card-body h3 { color: var(--red); }

.card-body .excerpt {
  color: var(--muted);
  font-size: 14.5px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
}

.card-foot .more {
  color: var(--red);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .25s ease;
}

.card:hover .card-foot .more { gap: 9px; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
  margin-top: 20px;
  background: linear-gradient(135deg, var(--red-deeper), var(--red-dark));
  color: rgba(255,255,255,.85);
  padding: 48px 24px 32px;
  text-align: center;
}

.footer .foot-brand { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: 2px; }
.footer .foot-line { margin-top: 10px; font-size: 13.5px; }
.footer .foot-gold { color: var(--gold-light); }
.footer .foot-beian { margin-top: 14px; }
.footer .foot-beian a {
  color: rgba(255, 255, 255, .68);
  font-size: 13px;
  letter-spacing: .5px;
  transition: color .25s ease;
}
.footer .foot-beian a:hover { color: var(--gold-light); }

/* ============================================================
   详情页
   ============================================================ */
.article {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: 80px;
}

.article-hero {
  position: relative;
  min-height: 46vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  background-image: linear-gradient(180deg, rgba(110,7,25,.25), rgba(110,7,25,.82)),
    var(--article-img, none);
  color: #fff;
  padding: 48px 24px 56px;
}

.article-hero .article-inner { max-width: 820px; margin: 0 auto; width: 100%; }

.article-hero .tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--red-deeper);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.article-hero h1 {
  font-size: clamp(24px, 4vw, 40px);
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 3px 16px rgba(0,0,0,.4);
}

.article-hero .meta { margin-top: 18px; font-size: 14px; color: rgba(255,255,255,.85); display: flex; gap: 18px; flex-wrap: wrap; }

.article-body {
  max-width: 820px;
  margin: 0 auto;
  padding: 44px 24px 0;
}

.article-body .lead {
  font-size: 18px;
  color: var(--red-dark);
  font-weight: 600;
  border-left: 4px solid var(--red);
  padding-left: 16px;
  margin-bottom: 28px;
}

.article-body p {
  font-size: 16.5px;
  line-height: 2;
  color: #3a3430;
  margin-bottom: 22px;
  text-align: justify;
}

.article-body figure { margin: 28px 0; }
.article-body figure img { border-radius: 12px; box-shadow: var(--shadow-md); cursor: zoom-in; }
.article-body figcaption { margin-top: 10px; font-size: 13.5px; color: var(--muted); text-align: center; }

/* ---------- 人物专访：问答样式 ---------- */
.interview-h {
  margin: 36px 0 16px;
  font-size: 20px;
  font-weight: 800;
  color: var(--red-deeper);
  letter-spacing: .5px;
}
.interview-q {
  font-size: 16.5px;
  line-height: 2;
  font-weight: 700;
  color: var(--red-dark);
  margin-bottom: 12px;
}
.interview-a {
  font-size: 16.5px;
  line-height: 2;
  color: #3a3430;
  text-align: justify;
  margin-bottom: 30px;
}
.interview-a .highlight { color: var(--red); font-weight: 700; }

.back-top-link { display: flex; justify-content: center; margin: 40px 0 0; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}

.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ============================================================
   Lightbox 图片放大
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 5, 8, .92);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  padding: 40px;
}

.lightbox.show { opacity: 1; pointer-events: auto; }

.lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  transform: scale(.9);
  transition: transform .3s ease;
}

.lightbox.show img { transform: scale(1); }

.lightbox .close {
  position: absolute;
  top: 24px; right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  line-height: 1;
  opacity: .85;
  transition: opacity .2s ease, transform .2s ease;
}

.lightbox .close:hover { opacity: 1; transform: rotate(90deg); }

/* ============================================================
   返回顶部按钮
   ============================================================ */
.to-top {
  position: fixed;
  right: 26px; bottom: 30px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, var(--red-bright), var(--red-deeper));
  color: #fff;
  font-size: 20px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 200;
}

.to-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.to-top:hover { transform: translateY(-4px); }

/* ============================================================
   滚动淡入动画
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .7s ease, transform .7s ease;
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 7px 10px; font-size: 13.5px; }
  .section { padding: 44px 0; }
  .hero { min-height: 62vh; }
  .featured { padding-top: 40px; }
  .featured-link { padding: 36px 26px; }
  .featured-link::before { font-size: 140px; right: -10px; opacity: .7; }
}
