/* ===========================================================
   云学习网 · 设计系统 (Cloud Learning Network Design System)
   主题：云 + 学习 —— 轻盈、通透、蓝青渐变、卡片化
   =========================================================== */

:root {
  /* 主色 —— 云蓝 / 青 */
  --c-primary: #2f6df6;
  --c-primary-600: #2457d6;
  --c-primary-700: #1d49b8;
  --c-cyan: #38bdf8;
  --c-cyan-soft: #7dd3fc;

  /* 强调色 —— 暖橙（用于高亮、CTA 点缀） */
  --c-accent: #ff9f43;
  --c-accent-soft: #ffe1c2;

  /* 中性色 */
  --c-ink: #16203a;
  --c-ink-2: #3a4762;
  --c-body: #44506b;
  --c-muted: #8a96ad;
  --c-line: #e8eefb;
  --c-bg: #f5f8ff;
  --c-bg-soft: #eef4ff;
  --c-white: #ffffff;

  /* 渐变 */
  --grad-brand: linear-gradient(135deg, #4f8dfd 0%, #38bdf8 100%);
  --grad-brand-soft: linear-gradient(135deg, #e8f1ff 0%, #e6f9ff 100%);
  --grad-sky: radial-gradient(1200px 600px at 80% -10%, #dbeafe 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 10%, #e0f2fe 0%, transparent 55%);

  /* 阴影 */
  --sh-sm: 0 2px 8px rgba(35, 71, 150, 0.06);
  --sh-md: 0 10px 30px rgba(35, 71, 150, 0.10);
  --sh-lg: 0 20px 50px rgba(35, 71, 150, 0.14);
  --sh-glow: 0 14px 40px rgba(56, 189, 248, 0.30);

  /* 圆角 */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-pill: 999px;

  /* 字体 */
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--c-body);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 { color: var(--c-ink); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.5px; }
h2 { font-size: clamp(22px, 3vw, 32px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }

/* ===========================================================
   布局工具
   =========================================================== */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .8px;
  color: var(--c-primary); text-transform: uppercase;
  background: var(--c-bg-soft); padding: 6px 14px; border-radius: var(--r-pill);
}
.section-head { text-align: center; max-width: 680px; margin: 0 auto 40px; }
.section-head p { color: var(--c-muted); }

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ===========================================================
   按钮
   =========================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-pill); border: 1px solid transparent;
  font-size: 15px; font-weight: 600; transition: all .2s ease; white-space: nowrap;
}
.btn--primary { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-glow); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 46px rgba(56,189,248,.42); }
.btn--ghost { background: #fff; color: var(--c-primary); border-color: var(--c-line); box-shadow: var(--sh-sm); }
.btn--ghost:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.btn--lg { padding: 15px 30px; font-size: 16px; }
.btn--block { width: 100%; }

/* ===========================================================
   导航栏
   =========================================================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--c-line);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--c-ink); }
.brand__logo {
  width: 38px; height: 38px; border-radius: 11px; background: var(--grad-brand);
  display: grid; place-items: center; color: #fff; font-size: 20px; box-shadow: var(--sh-glow);
}
.brand b { color: var(--c-primary); }
.nav__links { display: flex; gap: 6px; margin-left: 12px; }
.nav__links a {
  padding: 8px 14px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; color: var(--c-body);
  transition: all .18s ease;
}
.nav__links a:hover { color: var(--c-primary); background: var(--c-bg-soft); }
.nav__links a.active { color: var(--c-primary); background: var(--c-bg-soft); font-weight: 600; }
.nav__spacer { flex: 1; }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__search-mini {
  display: flex; align-items: center; gap: 8px; background: var(--c-bg-soft);
  border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 8px 14px; color: var(--c-muted);
}
.nav__search-mini input { border: 0; background: transparent; outline: none; font-size: 14px; width: 150px; color: var(--c-ink); }
.nav__burger { display: none; background: none; border: 0; font-size: 24px; color: var(--c-ink); }

/* ===========================================================
   Hero
   =========================================================== */
.hero { position: relative; overflow: hidden; background: var(--grad-sky); }
.hero__inner { padding: 92px 0 80px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero h1 .hl { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lead { font-size: 18px; color: var(--c-body); max-width: 520px; margin-bottom: 28px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__search {
  margin-top: 26px; display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 8px 8px 8px 18px;
  box-shadow: var(--sh-md); max-width: 480px;
}
.hero__search input { flex: 1; border: 0; outline: none; font-size: 15px; color: var(--c-ink); background: transparent; }
.hero__stats { display: flex; gap: 30px; margin-top: 38px; }
.hero__stats .num { font-size: 26px; font-weight: 800; color: var(--c-ink); }
.hero__stats .lbl { font-size: 13px; color: var(--c-muted); }

/* Hero 装饰插画（纯 CSS 云朵卡片堆叠） */
.hero__art { position: relative; height: 380px; }
.float-card {
  position: absolute; background: #fff; border-radius: var(--r-md); box-shadow: var(--sh-lg);
  padding: 16px; display: flex; align-items: center; gap: 12px; animation: floaty 6s ease-in-out infinite;
}
.float-card .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.float-card .t { font-size: 14px; font-weight: 700; color: var(--c-ink); }
.float-card .s { font-size: 12px; color: var(--c-muted); }
.fc1 { top: 10px; left: 6%; animation-delay: 0s; }
.fc2 { top: 130px; right: 4%; animation-delay: 1.2s; }
.fc3 { bottom: 30px; left: 18%; animation-delay: 2.4s; }
@keyframes floaty { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(-14px);} }

/* ===========================================================
   分类
   =========================================================== */
.cat-card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  padding: 26px 22px; text-align: center; transition: all .22s ease; box-shadow: var(--sh-sm);
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); border-color: var(--c-cyan-soft); }
.cat-card .emoji { font-size: 34px; }
.cat-card h3 { margin: 12px 0 4px; font-size: 17px; }
.cat-card p { font-size: 13px; color: var(--c-muted); margin: 0; }
.cat-card .count { display: inline-block; margin-top: 12px; font-size: 12px; color: var(--c-primary); background: var(--c-bg-soft); padding: 3px 10px; border-radius: var(--r-pill); }

/* ===========================================================
   资源 / 心得 卡片
   =========================================================== */
.card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--sh-sm); transition: all .22s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-md); }
.card__cover { height: 130px; background: var(--grad-brand-soft); position: relative; display: grid; place-items: center; font-size: 44px; }
.card__body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--c-primary);
  background: var(--c-bg-soft); padding: 3px 11px; border-radius: var(--r-pill);
}
.card h3 { font-size: 17px; margin: 0; }
.card__desc { font-size: 14px; color: var(--c-muted); margin: 0; flex: 1; }
.card__meta { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--c-muted); border-top: 1px dashed var(--c-line); padding-top: 12px; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--grad-brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.like-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; color: var(--c-muted); font-size: 13px; transition: color .15s; }
.like-btn.liked { color: #ef4d6b; }
.like-btn:hover { color: #ef4d6b; }

/* 公安备案临时态：隐藏交互式入口（投稿 / 点赞），使站点呈"非交互式" */
.no-interactive a[href="share.html"],
.no-interactive .like-btn { display: none !important; }

/* ===========================================================
   心得列表（横向 / 带摘要）
   =========================================================== */
.post {
  display: grid; grid-template-columns: 130px 1fr; gap: 18px; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-sm);
  transition: all .2s ease;
}
.post:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.post__thumb { border-radius: var(--r-md); background: var(--grad-brand-soft); display: grid; place-items: center; font-size: 40px; }
.post__title { font-size: 18px; margin: 0 0 6px; }
.post__excerpt { font-size: 14px; color: var(--c-muted); margin: 0 0 10px; }
.post__foot { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--c-muted); }
.post__foot .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--c-muted); }

/* ===========================================================
   筛选 / 工具栏
   =========================================================== */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: #fff;
  font-size: 14px; color: var(--c-body); transition: all .15s ease; font-weight: 500;
}
.chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.chip.active { background: var(--grad-brand); color: #fff; border-color: transparent; box-shadow: var(--sh-glow); }
.toolbar__search {
  margin-left: auto; display: flex; align-items: center; gap: 8px; background: #fff;
  border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 9px 16px; min-width: 240px;
}
.toolbar__search input { border: 0; outline: none; flex: 1; font-size: 14px; color: var(--c-ink); background: transparent; }

/* ===========================================================
   表单（发布分享）
   =========================================================== */
.form-wrap { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); padding: 34px; box-shadow: var(--sh-sm); }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; color: var(--c-ink); margin-bottom: 8px; font-size: 14px; }
.field .req { color: #ef4d6b; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--c-line); border-radius: var(--r-sm);
  font-size: 15px; font-family: inherit; color: var(--c-ink); background: var(--c-bg); outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(47,109,246,.12); background: #fff; }
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--c-muted); margin-top: 6px; }
.field .err { font-size: 12px; color: #ef4d6b; margin-top: 6px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid textarea { border-color: #ef4d6b; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ===========================================================
   关于 / 特色
   =========================================================== */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ic { flex: none; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--c-bg-soft); }
.feature h3 { font-size: 16px; margin: 0 0 4px; }
.feature p { font-size: 14px; color: var(--c-muted); margin: 0; }

.steps { counter-reset: step; }
.step { position: relative; padding: 22px 22px 22px 70px; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); box-shadow: var(--sh-sm); }
.step::before {
  counter-increment: step; content: counter(step); position: absolute; left: 18px; top: 20px;
  width: 38px; height: 38px; border-radius: 50%; background: var(--grad-brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; box-shadow: var(--sh-glow);
}
.step h3 { margin: 0 0 4px; }
.step p { margin: 0; font-size: 14px; color: var(--c-muted); }

/* CTA 横幅 */
.cta-band {
  background: var(--grad-brand); border-radius: var(--r-lg); padding: 48px; text-align: center; color: #fff;
  box-shadow: var(--sh-lg); position: relative; overflow: hidden;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); }
.cta-band .btn--ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.28); }

/* ===========================================================
   页脚
   =========================================================== */
.footer { background: #0e1830; color: #c7d2e8; padding: 56px 0 28px; margin-top: 20px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.footer .brand { color: #fff; margin-bottom: 14px; }
.footer__col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer__col a { display: block; color: #9fb0d0; font-size: 14px; padding: 5px 0; transition: color .15s; }
.footer__col a:hover { color: #fff; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.08); margin-top: 36px; padding-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: #8294b6; }

/* ===========================================================
   响应式
   =========================================================== */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav__links, .nav__search-mini { display: none; }
  .nav__burger { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero__stats { gap: 18px; }
  .post { grid-template-columns: 1fr; }
  .post__thumb { height: 120px; }
  .cta-band { padding: 32px 22px; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
  .hero__stats { flex-wrap: wrap; }
}
