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;
}

/* Home section-specific cover standards:
   keep each block consistent even when source images differ. */
.cover-featured-main {
  aspect-ratio: 16 / 9 !important;
}

.cover-featured-side {
  aspect-ratio: 16 / 9 !important;
}

.cover-latest-main,
.cover-latest-grid,
.cover-channel-main {
  aspect-ratio: 16 / 10 !important;
}

.cover-thumb-card {
  aspect-ratio: 4 / 3 !important;
}

.cover-square {
  aspect-ratio: 1 / 1 !important;
}

.cover-sidebar-hot {
  aspect-ratio: 16 / 10 !important;
}

.cover-featured-main img,
.cover-featured-side img,
.cover-latest-main img,
.cover-latest-grid img,
.cover-channel-main img,
.cover-thumb-card img,
.cover-square img,
.cover-sidebar-hot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

.home-channel-row {
  align-items: stretch;
}

.home-channel-col {
  display: flex;
  flex-direction: column;
}

.home-channel-main {
  display: flex;
  flex-direction: column;
}

.home-channel-main .grid-style-1-content {
  display: block;
  min-height: 0;
}

.home-channel-main-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.45;
  min-height: 0;
}

.home-channel-main-meta {
  margin-top: 8px;
}

.home-channel-list-item {
  align-items: stretch;
}

.home-channel-list-item .listing-post-2-thumbnail {
  flex: 0 0 34%;
  max-width: 34%;
  min-width: 34%;
}

.home-channel-list-item .listing-post-2-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 6px;
  min-height: 94px;
}

.home-channel-list-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.45;
  min-height: 0;
}

.sidebar-hot-card {
  display: flex;
  flex-direction: column;
}

.sidebar-hot-card .grid-style-1-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 108px;
}

.sidebar-hot-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.45;
  min-height: 0;
}

.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;
}

.top-featured-fill .listing-post-2,
.index-left-fill .listing-post-2 {
  background: #fff;
}

.top-featured-fill .listing-post-2 .listing-post-2-thumbnail,
.index-left-fill .listing-post-2 .listing-post-2-thumbnail,
.container .row > .col-lg-4 .listing-post-2 .listing-post-2-thumbnail {
  flex: 0 0 34%;
  max-width: 34%;
  min-width: 34%;
}

.top-featured-fill .listing-post-2 .listing-post-2-content,
.index-left-fill .listing-post-2 .listing-post-2-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.top-featured-fill .listing-post-2 .listing-post-2-title a,
.index-left-fill .listing-post-2 .listing-post-2-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  line-height: 1.6;
}

.featured-side-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.featured-side-col .featured-side-item {
  margin-bottom: 0 !important;
}

.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;
}

.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;
  }

  .featured-side-col {
    display: block;
  }

  .featured-side-col .featured-side-item {
    margin-bottom: 20px !important;
  }

  .home-channel-col {
    display: block;
  }

  .home-channel-main .grid-style-1-content,
  .home-channel-list-item .listing-post-2-content,
  .sidebar-hot-card .grid-style-1-content {
    min-height: 0;
  }

  .home-channel-list-item .listing-post-2-thumbnail {
    flex: 0 0 32%;
    max-width: 32%;
    min-width: 32%;
  }
}

@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;
  }

  .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;
  }
}
