/* ============================================================
   低熵财富 书籍站 Landing Page 样式
   色调参照 deanwang.ca 主站：琥珀主色 #D97706、深色排版、浅灰页面背景
   布局：纯 CSS flexbox（不依赖 Bootstrap .row/.col-*）
   ============================================================ */

/* ── 1. 隐藏 Quarto 自动渲染的 frontmatter 标题块
        title: 保留在 <title> 标签里供 SEO 使用，页面上不显示 ── */
#title-block-header,
.quarto-title-block {
  display: none !important;
}

/* ── 2. 页面背景 ── */
body {
  background-color: #F5F5F5 !important;
  -webkit-font-smoothing: antialiased;
}

/* ── 3. 导航栏 ── */
.navbar {
  background-color: #fff !important;
  border-bottom: 1px solid #EBEBEB;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.navbar-brand, .nav-link {
  color: #111 !important;
  font-weight: 500;
}
.nav-link:hover { color: #D97706 !important; }

/* ════════════════════════════════════════
   HERO 区块
   ════════════════════════════════════════ */
.lp-hero {
  background: #fff;
  padding: 3.5rem 0 3rem;
  overflow-x: hidden;
}

/* Hero 内层：flex 两列 */
.lp-hero-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* 左列：文字 */
.lp-hero-text {
  flex: 1 1 0;
  min-width: 0;
}

/* 右列：封面图 */
.lp-hero-covers {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

/* 大标题 */
.lp-hero-title {
  font-size: clamp(1.9rem, 5vw, 2.9rem);
  font-weight: 800;
  line-height: 1.25;
  color: #111;
  letter-spacing: -.02em;
  margin-bottom: 0;
}
.lp-hero-title p {
  margin: 0 !important;
}

.lp-accent { color: #D97706; }

/* 副标题 */
.lp-hero-sub {
  color: #555;
  font-size: .95rem;
  line-height: 1.75;
  margin: .9rem 0 1.75rem;
}
.lp-hero-sub p { margin: 0 !important; }

/* 按钮组 */
.lp-btns {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

/* ════════════════════════════════════════
   按钮
   ════════════════════════════════════════ */
a.btn-lp-primary {
  display: inline-block;
  background: #D97706;
  color: #fff !important;
  font-weight: 700;
  font-size: .92rem;
  padding: .65rem 1.35rem;
  border-radius: 8px;
  text-decoration: none !important;
  transition: background .18s;
  white-space: nowrap;
}
a.btn-lp-primary:hover { background: #B45309; }

a.btn-lp-ghost {
  display: inline-block;
  background: transparent;
  color: #111 !important;
  font-weight: 600;
  font-size: .92rem;
  padding: .63rem 1.35rem;
  border-radius: 8px;
  border: 1.5px solid #CCC;
  text-decoration: none !important;
  transition: border-color .18s, color .18s;
  white-space: nowrap;
}
a.btn-lp-ghost:hover { border-color: #D97706; color: #D97706 !important; }

/* ════════════════════════════════════════
   封面图片组（Hero 右侧）
   ════════════════════════════════════════ */
.lp-cover-wrap {
  display: flex;
  gap: 1.1rem;
  align-items: flex-end;
}

/* 覆盖 lianxhcn.css 的 img[width]{width:auto!important} */
.lp-cover-wrap img,
.lp-cover-wrap p img,
.lp-cover-wrap a img,
.lp-cover-wrap figure img {
  width: 145px !important;
  max-width: 145px !important;
  height: auto !important;
  display: inline-block !important;
  margin: 0 !important;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
  transition: transform .2s, box-shadow .2s;
}

/* <p> 或 <figure> 透明：让 <a> 直接参与 flex */
.lp-cover-wrap > p,
.lp-cover-wrap > figure {
  margin: 0 !important;
  padding: 0 !important;
  display: contents;
}

/* 旋转：按 <a> 顺序区分，避免 img:first-child 误选 */
.lp-cover-wrap a:first-of-type img {
  transform: rotate(-3deg) translateY(6px);
}
.lp-cover-wrap a:last-of-type img {
  transform: rotate(2deg);
}
.lp-cover-wrap a img:hover {
  transform: rotate(0deg) scale(1.04) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.22) !important;
}

/* ════════════════════════════════════════
   BOOKS 区块（灰底两卡片）
   ════════════════════════════════════════ */
.lp-books {
  padding: 3rem 0 2.5rem;
  overflow-x: hidden;
}

/* 卡片双列 flex 布局 */
.lp-books-inner {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 2rem;
}

.lp-card {
  flex: 1 1 300px;
  max-width: 440px;
  background: #fff;
  border-radius: 12px;
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 14px rgba(0,0,0,.07);
  transition: box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.lp-card:hover { box-shadow: 0 6px 28px rgba(0,0,0,.12); }

.lp-card-tag {
  display: inline-block;
  font-size: .76rem;
  font-weight: 700;
  color: #D97706;
  letter-spacing: .09em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}

.lp-card h3 {
  font-size: 1.08rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 .2rem !important;
  border: none !important;
  padding: 0 !important;
}

.lp-card-sub {
  display: block;
  font-size: .86rem;
  color: #666;
  margin-bottom: 1rem;
}

.lp-card ul {
  flex: 1;
  padding-left: 1.1rem !important;
  margin-bottom: 1.25rem !important;
  font-size: .88rem;
  color: #444;
  list-style: disc !important;
}
.lp-card ul li { margin-bottom: .3rem; }

/* 卡片按钮区 */
.lp-card-btns {
  display: flex;
  gap: .65rem;
  flex-wrap: wrap;
  margin-top: auto;
}

/* ════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════ */
.lp-footer {
  background: #fff;
  border-top: 1px solid #EBEBEB;
  padding: 2rem 1.5rem;
  margin-top: 1.5rem;
  text-align: center;
  color: #888;
  font-size: .83rem;
  line-height: 1.9;
}
.lp-footer p { margin: .15rem 0 !important; }
.lp-footer a { color: #666; text-decoration: none; }
.lp-footer a:hover { color: #D97706; }

/* ════════════════════════════════════════
   移动端（≤ 767px）
   ════════════════════════════════════════ */
@media (max-width: 767px) {
  .lp-hero { padding: 2.25rem 0 2rem; }

  .lp-hero-inner {
    flex-direction: column;
    gap: 2rem;
    padding: 0 1.25rem;
  }
  .lp-hero-covers {
    width: 100%;
    justify-content: center;
  }
  .lp-cover-wrap {
    justify-content: center;
  }
  .lp-hero-title { font-size: 1.85rem; }

  /* Hero 按钮：等宽平分一行 */
  .lp-btns {
    width: 100%;
  }
  .lp-btns a.btn-lp-primary,
  .lp-btns a.btn-lp-ghost {
    flex: 1 1 0;
    text-align: center;
    white-space: normal;  /* 允许换行，防止内容溢出 */
  }

  /* 卡片按钮：同样等宽 */
  .lp-card-btns a.btn-lp-primary,
  .lp-card-btns a.btn-lp-ghost {
    flex: 1 1 0;
    text-align: center;
  }

  .lp-books { padding: 2rem 0 1.5rem; }
  .lp-books-inner { padding: 0 1.25rem; }
  .lp-card { max-width: 100%; }

  .lp-cover-wrap a:first-of-type img { transform: rotate(-2deg) translateY(4px); }
  .lp-cover-wrap a:last-of-type img  { transform: rotate(1deg); }
}
