/* CoffeeHunters EN - NewsXpress adaptation layer
   (marquee ticker, CMS pagination, search overlay, misc fixes) */

/* ---- Ticker marquee (theme CSS hides .marquee-content-right until JS ready) ---- */
body .marquee-content-right {
    opacity: 1 !important;
    visibility: visible !important;
}
.nx-marquee-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: nxMarquee 45s linear infinite;
}
.marquee-content-right:hover .nx-marquee-track {
    animation-play-state: paused;
}
@keyframes nxMarquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.nx-marquee-track .theme-marquee-item {
    min-width: 24rem;
}

/* ---- CMS pagination ---- */
.nx-pagination {
    margin-top: 2rem;
    font-size: var(--theme-font-size-small, 1.4rem);
}
.nx-pagination-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.nx-pagination-inner a,
.nx-pagination-inner span,
.nx-pagination-inner li,
.nx-pagination-inner strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.6rem;
    min-height: 3.6rem;
    padding: 0 1rem;
    border-radius: 0.4rem;
    background-color: var(--theme-component-color, #1b1b1b);
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(128, 128, 128, 0.25);
}
.nx-pagination-inner .active,
.nx-pagination-inner strong,
.nx-pagination-inner span:not(:has(a)):not(:empty) {
    background-color: var(--theme-accent-color, #d13131);
    color: #fff;
    border-color: transparent;
}
.nx-pagination-inner ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---- Search overlay ---- */
.nx-search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.nx-search-overlay.is-open {
    display: flex;
}
.nx-search-box {
    width: min(92vw, 64rem);
}
.nx-search-form {
    display: flex;
    gap: 0.6rem;
}
.nx-search-form input {
    flex: 1;
    font-size: 1.8rem;
    padding: 1.2rem 1.6rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(128, 128, 128, 0.4);
    background: #141414;
    color: #eee;
}
.nx-search-form button[type="submit"] {
    font-size: 1.6rem;
    padding: 1.2rem 2.4rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--theme-accent-color, #d13131);
    color: #fff;
    cursor: pointer;
}
.nx-search-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 3.2rem;
    line-height: 1;
    cursor: pointer;
}

/* ---- Scroll to top ---- */
.nx-scroll-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 4.4rem;
    height: 4.4rem;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: var(--theme-accent-color, #d13131);
    color: #fff;
    cursor: pointer;
    z-index: 999;
}
.nx-scroll-top.is-visible {
    display: flex;
}
.nx-scroll-top .svg-icon {
    width: 2.2rem;
    height: 2.2rem;
}

/* ---- Single post ---- */
.entry-header.has-box-shadow {
    padding: 2rem;
    border-radius: 0.5rem;
    background-color: var(--theme-component-color, #1b1b1b);
}
.entry-header.has-box-shadow .newsxpress-meta {
    margin-top: 0.6rem;
}
.entry-content {
    font-size: 1.7rem;
    line-height: 1.75;
}
.entry-content img {
    max-width: 100%;
    height: auto;
}
.entry-content h1,
.entry-content h2,
.entry-content h3 {
    line-height: 1.3;
}
.nx-source-note {
    margin-top: 2.5rem;
    opacity: 0.65;
}
.nx-tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}
.nx-tag {
    padding: 0.4rem 1.2rem;
    border-radius: 10rem;
    border: 1px solid rgba(128, 128, 128, 0.35);
    font-size: var(--theme-font-size-small, 1.4rem);
    text-decoration: none;
}

/* ---- Related posts grid fallback (theme grid needs 3 items) ---- */
.nx-related-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 64rem) {
    .nx-related-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}
.nx-related-grid .entry-image-small img {
    width: 100%;
    height: auto;
}

/* ---- Misc ---- */
.nx-no-results {
    padding: 4rem 0;
    text-align: center;
    opacity: 0.75;
    font-size: 1.7rem;
}
.nx-error-box {
    padding: 8rem 0;
    text-align: center;
}
.nx-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 0 0 1rem;
    font-size: var(--theme-font-size-small, 1.4rem);
}
.theme-display-clock {
    display: inline;
    font-variant-numeric: tabular-nums;
}
/* Entry images fill width like WP theme */
.article-block-wrapper .featured-media img,
.entry-image .featured-media img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.single .entry-image .featured-media img {
    max-height: 52rem;
}
/* Screen reader helper (theme provides, but ensure present) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    word-wrap: normal !important;
}

/* ---- Fix oversized inline SVG icons in topbar ---- */
.site-topbar .svg-icon {
    width: 1.6rem !important;
    height: 1.6rem !important;
    flex-shrink: 0;
}
.site-topbar-component {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}
/* Ticker tiny images sizing */
.marquee-content-right .entry-image-tiny img {
    width: 7rem;
    height: 4.6rem;
    object-fit: cover;
}

/* ---- Light-mode component overrides (match www.coffeehunters.net) ---- */
body .entry-header.has-box-shadow {
    background-color: #fff;
    color: var(--theme-accent-hover-color, #404040);
    border: 1px solid var(--theme-accent-color, #4db2ec);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.07);
}
body .entry-header.has-box-shadow .entry-title {
    color: #546e7a;
}
body .entry-header.has-box-shadow .newsxpress-meta {
    color: #969fa4;
}
body .site-footer {
    background-color: #f7f7f7;
    color: #444;
}
body .site-footer a {
    color: #444;
}
body .theme-footer-bottom {
    border-top: 1px solid #e5e5e5;
}
body .nx-pagination-inner a,
body .nx-pagination-inner span,
body .nx-pagination-inner li,
body .nx-pagination-inner strong {
    background-color: #fff;
    color: #444;
}
body .nx-pagination-inner .active,
body .nx-pagination-inner strong {
    background-color: var(--theme-accent-color, #4db2ec);
    color: #fff;
}
body .nx-search-form input {
    background: #fff;
    color: #333;
}
body .nx-tag {
    background: #fff;
}
body .widget-content {
    background: transparent;
}

/* ===== v1.1 additions: slider / swiper buttons / dark toggle / trending tags ===== */

.nx-slider .swiper-wrapper {
    display: grid;
    overflow: hidden;
}
.nx-slider .swiper-slide {
    grid-area: 1 / 1;
    min-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease, visibility .5s ease;
    pointer-events: none;
}
.nx-slider .swiper-slide:first-child {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.nx-slider .swiper-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-section-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-swiper-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e3e6ea;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}
.theme-swiper-button:hover {
    background: #f2f5f8;
    color: #000;
}
.theme-swiper-button .svg-icon {
    width: 16px;
    height: 16px;
}

.nx-dark-toggle {
    cursor: pointer;
}

.trending-tags-panel .trending-tags-link {
    white-space: nowrap;
}

[data-theme="dark"] .theme-swiper-button {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #fff;
}
[data-theme="dark"] .nx-slider .swiper-wrapper {
    background: transparent;
}

/* ===== v1.2 additions: sidebar blocks / tabs / fullwidth widget / more-to-read ===== */

/* Sidebar block headings (WP block widgets style) */
.widget-area .wp-block-heading {
    position: relative;
    margin: 0 0 16px;
    padding-bottom: 12px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #111;
    border-bottom: 1px solid #e6e9ec;
}
.widget-area .wp-block-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 46px;
    height: 2px;
    background: #d8232a;
}
.widget-area .widget {
    margin-bottom: 34px;
}
.widget-area .wp-block-latest-posts__list,
.widget-area .wp-block-categories-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.widget-area .wp-block-latest-posts__list li,
.widget-area .wp-block-categories-list li {
    padding: 9px 0;
    border-bottom: 1px dashed #e9ecef;
    font-size: 14px;
    line-height: 1.5;
}
.widget-area .wp-block-latest-posts__list li:last-child,
.widget-area .wp-block-categories-list li:last-child {
    border-bottom: 0;
}
.widget-area .wp-block-latest-posts__post-title,
.widget-area .wp-block-categories-list a {
    color: #1a1a1a;
    text-decoration: none;
}
.widget-area .wp-block-latest-posts__post-title:hover,
.widget-area .wp-block-categories-list a:hover {
    color: #d8232a;
}

/* Sidebar search form */
.widget_search .wp-block-search__inside-wrapper {
    display: flex;
    gap: 6px;
}
.widget_search .wp-block-search__label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
}
.widget_search .wp-block-search__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dfe3e8;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}
.widget_search .wp-block-search__button {
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 4px;
    background: #d8232a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.widget_search .wp-block-search__button:hover {
    background: #b91c22;
}

/* Tab widget (Popular / Recent) */
.theme-widget-tab .widget-tab-header {
    margin-bottom: 16px;
    border-bottom: 1px solid #e6e9ec;
}
.theme-widget-tab .tab-header-list {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.theme-widget-tab .widget-tab-presentation button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 38px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: #8a9099;
    cursor: pointer;
}
.theme-widget-tab .widget-tab-presentation.active button {
    border-bottom-color: #d8232a;
    color: #d8232a;
}
.theme-widget-tab .tab-content-panel {
    display: none;
}
.theme-widget-tab .tab-content-panel.active {
    display: block;
}
.theme-widget-tab .theme-widget-list .theme-list-post {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px dashed #e9ecef;
}
.theme-widget-tab .entry-image-thumbnail img,
.theme-recent-widget .entry-image-thumbnail img {
    width: 78px;
    height: 62px;
    object-fit: cover;
    border-radius: 3px;
}

/* Fullwidth widget area (Coffee Origins spotlight) */
.fullwidth-widgetarea-top {
    padding: 30px 0;
}
.fullwidth-widgetarea-top .theme-widgetarea-full {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.fullwidth-widgetarea-top .theme-widget-title {
    position: relative;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e6e9ec;
}
.fullwidth-widgetarea-top .theme-widget-title .widget-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}
.fullwidth-widgetarea-top .theme-widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 56px;
    height: 3px;
    background: #d8232a;
}
@media (max-width: 991px) {
.fullwidth-widget-content {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}
.fullwidth-widget-content .widget-panel-1 {
    flex: 0 0 46%;
    max-width: 46%;
}
.fullwidth-widget-content .widget-panel-2 {
    flex: 1 1 auto;
    min-width: 0;
}
.fullwidth-widget-content .widget-story-list {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px dashed #e9ecef;
}
.fullwidth-widget-content .widget-story-list:last-child {
    border-bottom: 0;
    margin-bottom: 0;
}
.fullwidth-widget-content .entry-image-thumbnail img {
    width: 130px;
    height: 96px;
    object-fit: cover;
    border-radius: 3px;
}
}

/* More To Read */
.site-read-more-section {
    padding: 34px 0;
}
.site-read-more-section .theme-default-post .entry-image-small img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}
.site-read-more-section .theme-default-post .entry-title {
    margin: 10px 0 6px;
}

/* You May Also Like */
.site-you-may-like-section {
    padding: 10px 0 40px;
}

/* Hot Topics slider inside sidebar */
.widget-area .theme-widget-slider .swiper-wrapper {
    display: block;
}
.widget-area .theme-widget-slider .swiper-slide + .swiper-slide {
    margin-top: 18px;
}
.widget-area .theme-widget-slider .entry-image-big img {
    width: 100%;
    height: auto;
    border-radius: 3px;
}
.widget-area .theme-widget-slider .entry-title {
    margin: 10px 0 6px;
}

/* Dark mode adjustments for new blocks */
[data-theme="dark"] .widget-area .wp-block-heading,
[data-theme="dark"] .fullwidth-widgetarea-top .theme-widget-title .widget-title {
    color: #f2f2f2;
    border-bottom-color: #333;
}
[data-theme="dark"] .widget-area .wp-block-latest-posts__post-title,
[data-theme="dark"] .widget-area .wp-block-categories-list a {
    color: #e8e8e8;
}
[data-theme="dark"] .widget-area .wp-block-latest-posts__list li,
[data-theme="dark"] .widget-area .wp-block-categories-list li,
[data-theme="dark"] .theme-widget-tab .theme-widget-list .theme-list-post,
[data-theme="dark"] .fullwidth-widget-content .widget-story-list {
    border-bottom-color: #333;
}
[data-theme="dark"] .widget_search .wp-block-search__input {
    background: #1e1e1e;
    border-color: #3a3a3a;
    color: #eee;
}

/* Responsive */
@media (max-width: 900px) {
    .fullwidth-widget-content {
        flex-direction: column;
    }
    .fullwidth-widget-content .widget-panel-1 {
        flex: 1 1 auto;
        max-width: 100%;
    }
}

/* ===== v1.2.2: banner slider height floor (avoid collapse while images load) ===== */
@media (min-width: 992px) {
    .main-banner-slider .swiper-slide {
        min-height: 400px;
    }
}

/* ===== v1.2.4: 修复详情页/列表页「右栏掉到文章底部」 =====
   1) flex 子项默认 min-width:auto，正文大图/宽表格会把主列撑破，右栏被挤出容器
   2) 正文内媒体与宽元素强制不溢出容器 */
#site-content #primary,
#site-content #secondary {
    min-width: 0;
}
#site-content #secondary {
    box-sizing: border-box;
}
.entry-content img,
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object,
.entry-content svg,
.entry-content .wp-block-image img,
.entry-content figure img {
    max-width: 100%;
    height: auto;
}
.entry-content table,
.entry-content pre {
    max-width: 100%;
    overflow-x: auto;
}
.entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}
/* 窄屏：恢复单列堆叠，右栏在文章下方（正常） */
@media (max-width: 991px) {
    #site-content #primary,
    #site-content #secondary {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
    #site-content #secondary {
        min-height: 0;
    }
}

/* ===== v1.2.5: 修复搜索/列表页标签被压成竖排 =====
   .newsxpress-meta-group 是 nowrap flex，标签一多每项被压缩到 1 字符宽 → 文字竖排 */
.newsxpress-meta-group {
    flex-wrap: wrap;
    row-gap: 0.6rem;
}
.newsxpress-meta-group .nx-tag,
.newsxpress-meta-group .post-date,
.newsxpress-meta-group .newsxpress-meta-author {
    white-space: nowrap;
    flex: 0 0 auto;
}

/* ww: 搜索按钮/标签禁竖排 */
.wp-block-search__button, .nx-search-form button[type=submit], .nx-tag, .post-date { white-space: nowrap; flex: 0 0 auto; }

/* ==========================================================================
   新版模板样式块（v1.4.x）—— 由 ModeZone 同源模板移植，2026-09-29
   已剔除 ModeZone 专有的 region（地区筛选）与 people（人物库）相关规则；
   强调色统一为本站既有配色：#d8232a（红）/ #4db2ec（蓝）。
   ========================================================================== */
/* Latest Updates: 图片在上，标题在下 */
.nx-latest-col .theme-list-post { display: block; }
.nx-latest-col .theme-list-post .entry-image { width: 100%; max-width: 100%; margin-bottom: 1rem; }
.nx-latest-col .theme-list-post .entry-details { width: 100%; }

/* Featured 大图：图片略小、标题略大 */
.banner-article-post .entry-image { flex: 0 0 50%; width: 50%; }
.banner-article-post .entry-image-big img { height: 360px; }
.site-banner-area .entry-title-big { font-size: 3rem; }
@media screen and (max-width: 767px) {
    .banner-article-post .entry-image-big img { height: 300px; }
}

/* Featured 大图改为覆盖式卡片（参考 2.png）：图占满，徽标+标题+日期压底部渐变 */
.site-banner-area .banner-article-post { display: block; position: relative; overflow: hidden; }
.site-banner-area .banner-article-post .entry-image { width: 100%; flex: none; order: 0; }
.site-banner-area .banner-article-post .entry-image-big img { height: 480px; width: 100%; object-fit: cover; }
.site-banner-area .banner-article-post .entry-details {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 70px 26px 22px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.85) 100%);
    color: #fff;
}
.site-banner-area .banner-article-post .entry-details a { color: #fff; }
.site-banner-area .banner-article-post .entry-title-big { font-size: 2.6rem; line-height: 1.35; margin: 8px 0 6px; }
.site-banner-area .banner-article-post .entry-title-big a { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.site-banner-area .banner-article-post .newsxpress-entry-categories a {
    display: inline-block; background: #d8232a; color: #fff;
    padding: 3px 10px; font-size: 1.3rem; font-weight: 600; line-height: 1.6;
}
.site-banner-area .banner-article-post .newsxpress-meta { color: #eee; }
.site-banner-area .banner-article-post .entry-summary,
.site-banner-area .banner-article-post .newsxpress-meta-author { display: none; }
@media screen and (max-width: 767px) {
    .site-banner-area .banner-article-post .entry-image-big img { height: 320px; }
}

/* 文章详情页头部：大图覆盖式卡片（图占满+底部渐变+红徽标+白标题） */
.nx-hero-overlay { position: relative; overflow: hidden; }
.nx-hero-overlay .featured-media img { width: 100%; height: 440px; object-fit: cover; display: block; }
.nx-hero-caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 80px 28px 22px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.85) 100%);
    color: #fff;
}
.nx-hero-caption a { color: #fff; }
.nx-hero-cat a {
    display: inline-block; background: #d8232a; color: #fff;
    padding: 3px 10px; font-size: 1.3rem; font-weight: 600; line-height: 1.6;
}
.nx-hero-title { font-size: 3rem; line-height: 1.3; margin: 8px 0 6px; }
.nx-hero-title a { text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.nx-hero-caption .newsxpress-meta { color: #eee; }
@media screen and (max-width: 767px) {
    .nx-hero-overlay .featured-media img { height: 300px; }
    .nx-hero-title { font-size: 2.2rem; }
}

/* Featured 下方大图堆叠区：改为一行三列覆盖式小卡片（2.png 风格） */
.site-banner-area.site-banner-lower { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.site-banner-lower .theme-list-post { position: relative; overflow: hidden; margin: 0 !important; }
.site-banner-lower .theme-list-post .entry-image,
.site-banner-lower .theme-list-post .entry-image-medium { margin: 0; width: 100%; flex: none; }
.site-banner-lower .entry-image-medium img { width: 100%; height: 230px; object-fit: cover; display: block; }
.site-banner-lower .entry-details {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 60px 18px 14px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.85) 100%);
    color: #fff;
}
.site-banner-lower .entry-details a { color: #fff; }
.site-banner-lower .entry-title-small { font-size: 1.9rem; line-height: 1.35; margin: 6px 0 4px; }
.site-banner-lower .entry-title-small a { text-shadow: 0 1px 3px rgba(0,0,0,.6); display: block; }
.site-banner-lower .newsxpress-entry-categories a {
    display: inline-block; background: #d8232a; color: #fff;
    padding: 3px 10px; font-size: 1.2rem; font-weight: 600; line-height: 1.6;
}
.site-banner-lower .newsxpress-meta.post-date { color: #eee; }
@media screen and (max-width: 991px) {
    .site-banner-area.site-banner-lower { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 767px) {
    .site-banner-area.site-banner-lower { grid-template-columns: 1fr; }
    .site-banner-lower .entry-image-medium img { height: 200px; }
}

/* 主文章列表（main#site-content）：堆叠大图 → 三列覆盖式小卡片（2.png 风格） */
.home #primary.content-area { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.home #primary > :not(article) { grid-column: 1 / -1; }
.home #primary .article-block-wrapper { position: relative; overflow: hidden; margin: 0 !important; }
.home #primary .entry-image { margin: 0; }
.home #primary .entry-image .featured-media img { width: 100%; height: 240px; object-fit: cover; display: block; }
.home #primary .entry-header {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 60px 18px 14px; margin: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.55) 40%, rgba(0,0,0,0.85) 100%);
    color: #fff;
}
.home #primary .entry-header a { color: #fff; }
.home #primary .entry-title-big { font-size: 1.9rem; line-height: 1.35; margin: 6px 0 4px; }
.home #primary .entry-title-big a { text-shadow: 0 1px 3px rgba(0,0,0,.6); display: block; }
.home #primary .newsxpress-entry-categories a {
    display: inline-block; background: #d8232a; color: #fff;
    padding: 3px 10px; font-size: 1.2rem; font-weight: 600; line-height: 1.6;
}
.home #primary .newsxpress-meta.post-date { color: #eee; }
.home #primary .newsxpress-meta-author,
.home #primary .entry-summary { display: none; }
@media screen and (max-width: 991px) {
    .home #primary.content-area { grid-template-columns: repeat(2, 1fr); }
}
@media screen and (max-width: 767px) {
    .home #primary.content-area { grid-template-columns: 1fr; }
    .home #primary .entry-image .featured-media img { height: 200px; }
}


/* === v1.4.0 主导航条：白底 + 顶部色条 + 加粗大写菜单 === */
.masthead-main-navigation { background:#fff; border-top:4px solid #4db2ec; box-shadow:0 1px 0 rgba(0,0,0,.06); }
.masthead-main-navigation .primary-menu > .menu-item > a { font-weight:800; text-transform:uppercase; letter-spacing:.02em; font-size:.95rem; color:#111; }
.masthead-main-navigation .primary-menu > .menu-item > a:hover { color:#d8232a; }
.primary-menu .menu-item-has-children > .nx-caret { font-size:.7em; margin-left:4px; display:inline-block; }
.primary-menu .sub-menu { background:#fff; border:1px solid #eee; box-shadow:0 8px 24px rgba(0,0,0,.12); min-width:220px; }
.primary-menu .sub-menu .menu-item a { font-weight:700; text-transform:uppercase; font-size:.85rem; color:#111; }
.primary-menu .sub-menu .menu-item a:hover { color:#d8232a; background:#f7f7f7; }


/* === v1.4.2 菜单字号微调 === */
.masthead-main-navigation .primary-menu > .menu-item > a { font-size:15px; }
.primary-menu .sub-menu .menu-item a { font-size:13px; }


/* === v1.4.6 one-row header: logo left + menu on the same line === */
.masthead-main-navigation .site-header-wrapper { min-height:62px; }
.masthead-main-navigation .site-branding { display:flex; align-items:center; }
.masthead-main-navigation .site-title { font-size:2.6rem; padding-right:1.2rem; white-space:nowrap; }
.masthead-main-navigation .main-navigation { display:flex; align-items:center; }
.masthead-main-navigation ul.primary-menu { flex-wrap:nowrap; align-items:center; }
.masthead-main-navigation .primary-menu > li > a { padding-top:.7rem; padding-bottom:.7rem; }
@media (max-width:1200px){
  .masthead-main-navigation .site-title { font-size:2.1rem; padding-right:.8rem; }
  .masthead-main-navigation .primary-menu > .menu-item > a { font-size:13px; }
}


/* === v1.4.7+fix inline header search box after menu === */
.nx-header-search { display:none; }
@media only screen and (min-width:1025px){
  .masthead-main-navigation .nx-header-search { display:flex; align-items:center; margin-left:.4rem; }
  .masthead-main-navigation .nx-search-toggle { display:none; }
}
.nx-header-search-form { display:flex; align-items:center; border:1px solid #ddd; border-radius:999px; background:#fff; height:36px; padding:0 4px 0 14px; }
.nx-header-search-form input { border:0; outline:0; background:transparent; font-size:13px; font-weight:600; color:#111; width:150px; min-height:0; height:auto; line-height:1.2; padding:0; margin:0; box-shadow:none; }
.nx-header-search-form input::placeholder { color:#999; text-transform:uppercase; letter-spacing:.03em; }
.nx-header-search-form button { border:0; background:#111; color:#fff; width:28px; min-height:0; height:28px; line-height:1; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; flex:none; padding:0; appearance:none; -webkit-appearance:none; }
.nx-header-search-form button:hover { background:#d8232a; }
.nx-header-search-form .svg-icon { width:14px; height:14px; }
@media (max-width:1240px){ .nx-header-search-form input { width:110px; } }

/* === v1.5.0 移动端（<1025px）页头：菜单改为可横向滑动的单行，修掉窄屏溢出裁切 ===
   背景：主题 style.css 中 .theme-primary-menu 在 <1025px 时是 display:none
   （原版窄屏本来不显示主导航）；v1.4.6 的 `.main-navigation{display:flex}`
   把它在所有宽度都强制显示了，于是手机端菜单会顶破容器、右侧被裁切。
   关键点：.site-header-left 在 style.css 里带 `justify-self:start`，
   grid 项会按内容宽度收缩（不会被列宽约束），必须改成 stretch 才能让
   内部的 overflow-x:auto 生效。这里保持「窄屏也能看到导航」，
   但让它变成可左右滑动的紧凑单行。 */
@media only screen and (max-width: 1024px) {
    .masthead-main-navigation .site-header-wrapper {
        grid-template-columns: minmax(0, 1fr) auto;
        overflow: hidden;
    }
    .masthead-main-navigation .site-header-left {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        justify-self: stretch;
        gap: .6rem;
        overflow: hidden;
    }
    .masthead-main-navigation .site-branding { flex: none; }
    .masthead-main-navigation .site-title { font-size: 1.9rem; padding-right: .4rem; }
    .masthead-main-navigation .main-navigation {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .masthead-main-navigation .main-navigation::-webkit-scrollbar { display: none; }
    .masthead-main-navigation ul.primary-menu { flex-wrap: nowrap; }
    .masthead-main-navigation .primary-menu > .menu-item > a {
        font-size: 12px;
        padding: .55rem .7rem;
        white-space: nowrap;
    }
    .masthead-main-navigation .site-header-right { flex: none; gap: .2rem; }
}
