/*
Theme Name: tgchild
Theme URI: https://telegramemn.com/
Description: Child theme
Author: TelegramEMN
Template: generatepress
Version: 1.0.0
Text Domain: generatepress-child
*/

/* CSS 内容 */


:root {
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --surface: #ffffff;
  --bg-soft: #f3f4f6;
  --footer-bg: #1f2937;
  --footer-text: #e5e7eb;
  --radius: 16px;
  --shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
  --max-width: 1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.65;
}

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

.tgzh-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.tgzh-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(220, 234, 243, .85);
}

body.admin-bar .tgzh-site-header {
  top: 32px;
}

.tgzh-nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.tgzh-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #142033;
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.tgzh-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #35b6f2, #1688c7);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 26px rgba(34, 158, 217, .32);
  flex: 0 0 auto;
}

.tgzh-logo svg {
  width: 24px;
  height: 24px;
  fill: #fff;
  display: block;
}

.tgzh-links {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #5d6b82;
  font-size: 14px;
}

.tgzh-links a {
  color: inherit;
  text-decoration: none;
  transition: color .22s ease;
}

.tgzh-links a:hover,
.tgzh-links a:focus-visible {
  color: #1677aa;
  outline: none;
}

.tgzh-nav-cta {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  background: #229ed9;
  color: #fff;
  box-shadow: 0 12px 28px rgba(34, 158, 217, .28);
  font-weight: 800;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.tgzh-nav-cta:hover,
.tgzh-nav-cta:focus-visible {
  transform: translateY(-4px);
  background: #1677aa;
  box-shadow: 0 18px 36px rgba(34, 158, 217, .32);
  color: #fff;
  outline: none;
}

.tgzh-nav-cta:active {
  transform: translateY(-1px);
}

.tgzh-site-footer {
  background: #101b2a;
  color: rgba(255,255,255,.76);
  padding: 36px 0;
}

.tgzh-foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.tgzh-footer-main {
  max-width: 560px;
}

.tgzh-foot strong {
  color: #fff;
}

.tgzh-footer-address {
  margin-top: 12px;
  color: rgba(255,255,255,.62);
  font-size: 14px;
  line-height: 1.75;
}

.tgzh-footer-address a {
  color: rgba(255,255,255,.78);
  text-decoration: none;
}

.tgzh-footer-menu a {
  color: rgba(255,255,255,.86);
  margin-right: 16px;
  text-decoration: none;
}

.tgzh-footer-menu a:hover,
.tgzh-footer-menu a:focus-visible {
  color: #fff;
  outline: none;
}

.tgzh-footer-bottom {
  width: 100%;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: 13px;
}

.tgzh-footer-bottom a,
.tgzh-footer-bottom a:hover,
.tgzh-footer-bottom a:focus {
  color: transparent;
  text-decoration: none;
}

.container {
  width: min(var(--max-width), 92%);
  margin: 0 auto;
}

header.site-header-custom {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.nav-wrap {
  height: 78px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}

nav.site-nav-custom ul {
  margin: 0;
  padding: 8px;
  list-style: none;
  display: flex;
  gap: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
}

nav.site-nav-custom a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  color: #374151;
}

nav.site-nav-custom a:hover { background: #fff; }

.soft-cta {
  text-align: center;
  padding: 56px 24px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.soft-cta p {
  margin: 0 0 18px;
  font-size: 1.15rem;
  color: var(--text);
}

.soft-cta-btn {
  display: inline-block;
  padding: 12px 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  transition: .2s ease;
}

.soft-cta-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }

footer.site-footer-custom {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 48px 0 18px;
}

.footer-wrap {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
}

.footer-brand {
  display: flex;
  gap: 18px;
}

.footer-brand img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  flex-shrink: 0;
}

.footer-brand p {
  margin: 0;
  color: #cbd5e1;
  max-width: 560px;
}

.contact {
  margin-top: 12px;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.footer-nav h4 { margin: 0 0 12px; }
.footer-nav ul { margin: 0; padding: 0; list-style: none; }
.footer-nav li { margin-bottom: 9px; }

.footer-nav a {
  color: #e2e8f0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.copyright {
  text-align: center;
  color: #94a3b8;
  font-size: 0.82rem;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.copyright a {
  color: #94a3b8;
}

.copyright a:hover { color: #93c5fd; }

@media (max-width: 980px) {
  .footer-wrap { grid-template-columns: 1fr; }

  .nav-wrap {
    grid-template-columns: 1fr;
    height: auto;
    padding: 10px 0 14px;
  }

  .brand { margin: 0 auto; }
  nav.site-nav-custom ul { justify-content: center; flex-wrap: wrap; }
}

/* =========================
   文章汇总页 /post/
========================= */
.post-index-page {
  padding: 40px 0 72px;
  background: #fff;
}

.post-index-container {
  width: min(1280px, 94%);
  margin: 0 auto;
}

.breadcrumb {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #6b7280;
  text-decoration: none;
}

.post-index-title {
  text-align: center;
  font-size: 42px;
  line-height: 1.2;
  margin: 0 0 32px;
  color: #111827;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.post-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(255, 155, 180, 0.16);
  border: 1px solid #f7e9ee;
  transition: transform .2s ease, box-shadow .2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(255, 155, 180, 0.22);
}

.post-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.post-card-thumb {
  background: #f7f7f8;
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-thumb img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.post-card-thumb-placeholder {
  width: 100%;
  height: 210px;
  display: grid;
  place-items: center;
  color: #1677aa;
  background: linear-gradient(135deg, #eef7fc, #ffffff);
  font-weight: 800;
}

.post-card-body {
  padding: 22px 20px 20px;
}

.post-card-title {
  margin: 0 0 12px;
  font-size: 22px;
  line-height: 1.4;
  color: #111827;
}

.post-card-excerpt {
  margin: 0;
  color: #6b7280;
  line-height: 1.75;
  font-size: 15px;
}

.no-posts {
  text-align: center;
  color: #6b7280;
  font-size: 16px;
  margin-top: 40px;
}

.pagination-wrap {
  margin-top: 40px;
  text-align: center;
}

.pagination-wrap .nav-links {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.pagination-wrap .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  text-decoration: none;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
}

.pagination-wrap .page-numbers.current {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.pagination-wrap .page-numbers.dots {
  border: none;
  background: transparent;
  min-width: auto;
  padding: 0 4px;
}

/* 隐藏默认侧边栏/小工具，避免干扰文章汇总页 */
.blog #right-sidebar,
.blog #left-sidebar,
.blog .sidebar,
.blog .widget-area,
.home.blog #right-sidebar,
.home.blog #left-sidebar,
.home.blog .sidebar,
.home.blog .widget-area {
  display: none !important;
}

@media (max-width: 1100px) {
  .tgzh-links {
    display: none;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  body.admin-bar .tgzh-site-header {
    top: 46px;
  }

  .tgzh-wrap {
    width: min(100% - 28px, 1180px);
  }

  .tgzh-nav {
    min-height: 64px;
  }

  .tgzh-brand {
    font-size: 17px;
  }

  .tgzh-nav-cta {
    display: none;
  }

  .post-index-title {
    font-size: 34px;
  }

  .post-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .post-index-container {
    width: min(92%, 92%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tgzh-nav-cta,
  .tgzh-links a {
    transition: none;
  }

  .tgzh-nav-cta:hover,
  .tgzh-nav-cta:focus-visible,
  .tgzh-nav-cta:active {
    transform: none;
  }
}

/* =========================
   单篇文章阅读页
========================= */
.tgzh-single-page {
  background: #fff;
  padding: 38px 0 76px;
}

.tgzh-single-container {
  width: min(860px, calc(100% - 48px));
  margin: 0 auto;
}

.tgzh-single-article {
  color: #253245;
}

.tgzh-single-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 24px;
  color: #6b7280;
  font-size: 14px;
}

.tgzh-single-breadcrumb a {
  color: #1677aa;
  text-decoration: none;
}

.tgzh-single-breadcrumb a:hover,
.tgzh-single-breadcrumb a:focus-visible {
  color: #0f5f88;
  outline: none;
}

.tgzh-single-cover {
  margin: 0 0 34px;
  border: 1px solid #dbeaf4;
  border-radius: 8px;
  overflow: hidden;
  background: #eef8fd;
}

.tgzh-single-cover img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.tgzh-single-header {
  margin: 0 0 32px;
  padding-bottom: 22px;
  border-bottom: 1px solid #e4edf4;
}

.tgzh-single-title {
  margin: 0 0 12px;
  color: #142033;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: 0;
  font-weight: 800;
}

.tgzh-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #6b7280;
  font-size: 14px;
}

.tgzh-single-content {
  font-size: 18px;
  line-height: 1.9;
  color: #253245;
}

.tgzh-single-content > *:first-child {
  margin-top: 0;
}

.tgzh-single-content p {
  margin: 0 0 20px;
}

.tgzh-single-content h2 {
  margin: 46px 0 18px;
  padding-left: 16px;
  border-left: 5px solid #229ed9;
  color: #142033;
  font-size: 30px;
  line-height: 1.32;
  letter-spacing: 0;
}

.tgzh-single-content h3 {
  margin: 34px 0 14px;
  color: #142033;
  font-size: 24px;
  line-height: 1.36;
}

.tgzh-single-content ul,
.tgzh-single-content ol {
  margin: 0 0 22px;
  padding-left: 1.45em;
}

.tgzh-single-content li {
  margin: 8px 0;
}

.tgzh-single-content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 5px solid #229ed9;
  background: #f2f9fd;
  color: #3d4b5f;
  border-radius: 0 8px 8px 0;
}

.tgzh-single-content img,
.tgzh-single-content .wp-block-image img {
  border-radius: 8px;
}

.tgzh-single-content .wp-block-image,
.tgzh-single-content figure {
  margin: 30px 0;
}

.tgzh-single-content a {
  color: #1677aa;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tgzh-single-footer {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid #e4edf4;
}

.tgzh-single-back {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  background: #229ed9;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

.tgzh-single-back:hover,
.tgzh-single-back:focus-visible {
  transform: translateY(-3px);
  background: #1677aa;
  box-shadow: 0 14px 28px rgba(34, 158, 217, .24);
  color: #fff;
  outline: none;
}

@media (max-width: 768px) {
  .tgzh-single-page {
    padding: 28px 0 58px;
  }

  .tgzh-single-container {
    width: min(100% - 30px, 860px);
  }

  .tgzh-single-title {
    font-size: 30px;
  }

  .tgzh-single-content {
    font-size: 16.5px;
    line-height: 1.82;
  }

  .tgzh-single-content h2 {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tgzh-single-back,
  .tgzh-single-back:hover,
  .tgzh-single-back:focus-visible {
    transition: none;
    transform: none;
  }
}
