﻿body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  word-break: break-word;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

#preloader {
  transition: opacity 0.28s ease, visibility 0.28s ease;
  animation: preloader-autohide 0s linear 10s forwards;
}

@keyframes preloader-autohide {
  to {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

/* Unify cover geometry to avoid uneven blank gaps when source images vary. */
.featured-post-item .featured-post-item-img,
.list-style-1 .list-style-1-img,
.grid-style-1 .grid-style-1-img,
.grid-style-2 .grid-style-2-img,
.listing-post .listing-post-thumbnail,
.listing-post-2 .listing-post-2-thumbnail,
.instagram-item .instagram-item-img,
.single-post-img {
  position: relative;
  overflow: hidden;
}

.featured-post-area .col-lg-8 .featured-post-item .featured-post-item-img {
  aspect-ratio: 16 / 9;
}

.featured-post-area .col-lg-4 .featured-post-item .featured-post-item-img {
  aspect-ratio: 2 / 1;
}

.list-style-1 .list-style-1-img,
.grid-style-1 .grid-style-1-img,
.grid-style-2 .grid-style-2-img {
  aspect-ratio: 16 / 10;
}

.listing-post .listing-post-thumbnail,
.listing-post-2 .listing-post-2-thumbnail {
  aspect-ratio: 4 / 3;
}

.instagram-item .instagram-item-img {
  aspect-ratio: 1 / 1;
}

.grid-style-2 {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid-style-2 .grid-style-2-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
  padding: 12px 14px 14px;
}

.grid-style-2 .grid-style-2-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.grid-style-2 .grid-style-2-content p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.header-upper-links .site-brand-tip {
  color: #d1d5db;
  font-size: 12px;
  letter-spacing: 0;
}

.header-middle .logo-brand img {
  max-height: 56px;
  width: auto;
}

.header-social .dropdown-menu {
  min-width: 300px;
}

.header-social .dropdown-menu form {
  min-width: 260px;
}

.header-social .dropdown-menu .form-control {
  min-height: 42px;
}

.featured-post-item-img img,
.grid-style-1-img img,
.grid-style-2-img img,
.list-style-1-img img,
.listing-post-thumbnail img,
.listing-post-2-thumbnail img,
.sidebar-top-news-box-img img,
.single-post-img img,
.instagram-item-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.featured-post-item-img,
.grid-style-1-img,
.grid-style-2-img,
.list-style-1-img,
.listing-post-thumbnail,
.listing-post-2-thumbnail,
.sidebar-top-news-box-img,
.single-post-img {
  background: #f3f4f6;
}

.inner-page-title .page-title {
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  margin: 0;
}

.pglist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pglist a,
.pglist span {
  display: inline-flex;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  color: #4b5563;
  font-size: 14px;
  background: #fff;
}

.pglist a:hover,
.pglist .thisclass,
.pglist .now-page {
  color: #fff;
  border-color: #dc3545;
  background: #dc3545;
}

.search-empty,
.list-empty,
.related-empty {
  color: #6b7280;
  background: #f8fafc;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 16px;
}

.trending-box.is-empty,
.category-widget.is-empty,
.tags-list.is-empty {
  color: #6b7280;
  background: #f8fafc;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 16px;
}

.trending-box.is-empty::before,
.category-widget.is-empty::before,
.tags-list.is-empty::before {
  content: "暂无内容，稍后更新";
}

.featured-post-carousel.is-empty,
.carousel-arrow-style-1.is-empty,
.instagram-carousel.is-empty {
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  background: #f8fafc;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.featured-post-carousel.is-empty::before,
.carousel-arrow-style-1.is-empty::before,
.instagram-carousel.is-empty::before {
  content: "暂无文章，发布内容后会自动展示";
  color: #6b7280;
}

.row > .col-lg-6.col-md-6:only-child,
.row > .col-lg-4.col-md-6:only-child {
  flex: 0 0 100%;
  max-width: 100%;
}

.single-post-content .post-content-body {
  line-height: 1.9;
  color: #374151;
}

.single-post-content .post-content-body h2,
.single-post-content .post-content-body h3,
.single-post-content .post-content-body h4 {
  margin-top: 1.3em;
  margin-bottom: 0.6em;
  color: #111827;
}

.single-post-content .post-content-body p {
  margin-bottom: 1em;
}

.single-post-content .post-content-body blockquote {
  border-left: 4px solid #dc3545;
  background: #fff5f5;
  padding: 14px 18px;
  margin: 18px 0;
  border-radius: 6px;
}

.single-post-content .post-content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1em 0;
}

.single-post-content .post-content-body table th,
.single-post-content .post-content-body table td {
  border: 1px solid #e5e7eb;
  padding: 8px 10px;
}

.single-post-content .post-content-body table th {
  background: #f9fafb;
}

.single-post-content .post-content-body ul,
.single-post-content .post-content-body ol {
  padding-left: 20px;
  margin: 0.8em 0;
}

.single-post-content .post-content-body a {
  color: #dc3545;
  text-decoration: underline;
}

.article-permalink {
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
  word-break: break-all;
}

.article-permalink strong {
  color: #111827;
}

.footer-sitemap-link {
  display: inline-flex;
  width: auto;
  min-width: 140px;
  height: 42px;
  padding: 0 18px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  background: #3c3c3c;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  word-break: keep-all;
}

.footer-sitemap-link:hover {
  background: #dc3545;
  color: #fff;
}

.footer-sitemap-link i,
.footer-sitemap-link span {
  display: inline-block;
  line-height: 1;
  white-space: nowrap;
  word-break: keep-all;
}

.footer-channel-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 22px;
}

.footer-channel-list li {
  min-width: 0;
}

.footer-channel-list li a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-fill-posts .listing-post-2 {
  align-items: stretch;
  background: #fff;
}

.sidebar-fill-posts .listing-post-2 .listing-post-2-thumbnail {
  flex: 0 0 34%;
  max-width: 34%;
  min-height: 92px;
}

.sidebar-fill-posts .listing-post-2 .listing-post-2-thumbnail a {
  display: block;
  height: 100%;
}

.sidebar-fill-posts .listing-post-2 .listing-post-2-content {
  min-width: 0;
  flex: 1;
  padding: 12px;
}

.sidebar-fill-posts .listing-post-2 .listing-post-2-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.sidebar-fill-posts .listing-post-2 .listing-post-2-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.45;
}

.top-news-card .sidebar-top-news-box-img {
  min-height: 220px;
}

.single-post-meta-box .single-post-meta {
  flex-wrap: wrap;
  row-gap: 8px;
}

.featured-post-content .featured-post-title,
.list-style-1-content .list-style-1-title,
.grid-style-1-content .grid-style-1-title,
.grid-style-2-content .grid-style-2-title {
  line-height: 1.38;
}

.post-meta {
  flex-wrap: wrap;
  row-gap: 6px;
}

@media (max-width: 1199px) {
  .featured-post-area {
    padding-top: 46px !important;
    padding-bottom: 28px !important;
  }

  .header-newsletter-link {
    display: none;
  }
}

@media (max-width: 991px) {
  .pt-50 {
    padding-top: 40px !important;
  }

  .pb-50 {
    padding-bottom: 40px !important;
  }

  .mb-50 {
    margin-bottom: 32px !important;
  }

  .featured-post-area {
    padding-top: 36px !important;
  }

  .header-middle .advertisement-banner {
    margin-top: 14px;
  }

  .header-middle .advertisement-banner img {
    width: 100%;
    height: auto;
  }

  .featured-post-item-img,
  .list-style-1-img,
  .single-post-img {
    min-height: 240px;
  }

  .sidebar {
    margin-top: 34px;
  }
}

@media (max-width: 767px) {
  .pt-50 {
    padding-top: 34px !important;
  }

  .pb-50 {
    padding-bottom: 34px !important;
  }

  .mb-50 {
    margin-bottom: 26px !important;
  }

  .mb-30 {
    margin-bottom: 20px !important;
  }

  .header-upper-links,
  .header-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .header-middle .logo-brand {
    text-align: center;
  }

  .header-middle .advertisement-banner {
    margin-top: 16px;
  }

  .navbar-nav .dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    border-radius: 8px;
    margin-top: 8px;
  }

  .header-social .dropdown-menu {
    min-width: 240px;
  }

  .header-social .dropdown-menu form {
    min-width: 0;
  }

  .featured-post-item-img,
  .list-style-1-img,
  .single-post-img {
    min-height: 210px;
  }

  .featured-post-area .col-lg-4 .featured-post-item .featured-post-item-img {
    aspect-ratio: 16 / 9;
  }

  .single-post-content .post-single-title {
    font-size: 26px;
    line-height: 1.35;
  }

  .featured-post-content .font-size-32 {
    font-size: 24px !important;
  }

  .featured-post-content .font-size-20 {
    font-size: 19px !important;
  }

  .list-style-1-content p,
  .grid-style-2-content p {
    font-size: 14px;
    line-height: 1.75;
  }

  .single-post-content .post-content-body {
    font-size: 16px;
    line-height: 1.85;
  }

  .guestbook-shell {
    padding: 20px !important;
  }

  .sidebar {
    margin-top: 36px;
  }

  .footer-channel-list {
    grid-template-columns: 1fr;
  }

  .inner-page-title .page-title {
    font-size: 24px;
  }
}

@media (max-width: 575px) {
  .inner-page-title {
    padding-top: 34px !important;
    padding-bottom: 22px !important;
  }

  .inner-page-title .page-title {
    font-size: 22px;
    line-height: 1.3;
  }

  .breadcrumb {
    font-size: 13px;
  }

  .post-meta,
  .single-post-meta {
    font-size: 12px;
  }

  .single-post-content .post-single-title {
    font-size: 22px;
  }

  .single-post-content .post-content-body {
    font-size: 15px;
  }

  .pglist a,
  .pglist span {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* Codex: compact article list pages and avoid long-sidebar blank gap */
.codex-list-page {
  padding-bottom: 34px;
}
.codex-list-page > .row {
  align-items: flex-start;
}
.codex-list-page .pglist {
  margin-bottom: 12px;
}
.codex-list-page .sidebar {
  position: sticky;
  top: 16px;
}
.codex-list-page .sidebar-block-featured-title,
.codex-list-page .sidebar-fill-posts,
.codex-list-page .sidebar-block-rank-title,
.codex-list-page .sidebar-rank-list {
  display: none !important;
}
.codex-list-page .sidebar .block-title.mb-30 {
  margin-bottom: 16px !important;
}
.codex-list-page .sidebar .mb-50 {
  margin-bottom: 26px !important;
}
.grid-style-2,
.listing-post-2,
.sidebar .trending-box li,
.sidebar .category-widget li,
.sidebar .tags-list li {
  content-visibility: auto;
  contain-intrinsic-size: 1px 120px;
}
@media (max-width: 991px) {
  .codex-list-page .sidebar {
    position: static;
  }
}
/* Codex: water topic banner replacements */
.codex-water-banner {
  border-radius: 12px;
  overflow: hidden;
}
.codex-water-banner a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 92px;
  padding: 18px 28px;
  color: #fff;
  background:
    radial-gradient(circle at 16% 20%, rgba(55, 183, 255, .26), transparent 28%),
    linear-gradient(135deg, #05364a 0%, #0b7285 52%, #18a999 100%);
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(5, 54, 74, .2);
}
.codex-water-banner a:after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -44px;
  width: 190px;
  height: 190px;
  border: 34px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}
.codex-water-mark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  flex: 0 0 58px;
  color: #0b7285;
  background: rgba(255, 255, 255, .94);
  border-radius: 16px;
  font-size: 26px;
}
.codex-water-copy {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  flex: 1;
}
.codex-water-copy strong {
  display: block;
  color: #fff;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.codex-water-copy em {
  display: block;
  color: rgba(255, 255, 255, .86);
  font-style: normal;
  font-size: 14px;
  line-height: 1.6;
}
.codex-water-action {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 42px;
  padding: 0 20px;
  color: #06384a;
  background: #fff;
  border-radius: 8px;
  font-weight: 700;
}
.codex-water-banner-wide a {
  min-height: 116px;
  padding: 24px 34px;
}
.codex-water-banner-wide .codex-water-copy strong {
  font-size: 28px;
}
.codex-water-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  max-width: 430px;
}
.codex-water-links b {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  color: #07384c;
  background: rgba(255, 255, 255, .92);
  border-radius: 999px;
  font-size: 13px;
}
@media (max-width: 991px) {
  .codex-water-banner a,
  .codex-water-banner-wide a {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 20px;
  }
  .codex-water-copy strong,
  .codex-water-banner-wide .codex-water-copy strong {
    font-size: 22px;
  }
  .codex-water-links {
    justify-content: flex-start;
  }
}