/*
Theme Name: 宁夏义工官网
Description: 保留旧站栏目和版式的响应式 WordPress 主题。
Version: 1.0.0
Requires PHP: 8.4
Text Domain: nxyg
*/

:root {
    --nxyg-brand: #174693;
    --nxyg-red: #c82837;
    --nxyg-ink: #232b36;
    --nxyg-muted: #626b77;
    --nxyg-outline: #e5e8ee;
}
body { font-size: 16px; color: var(--nxyg-ink); }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px solid #2664bf;
    outline-offset: 4px;
}
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}
.nxyg-header { border-radius: 0; }
.nxyg-header-inner { position: relative; }
.nxyg-brand {
    color: white;
    font-size: 19px;
    font-weight: 700;
    text-decoration: none;
}
.nxyg-brand img { display: block; max-height: 58px; max-width: min(300px, 76vw); }
.nxyg-header-tools { position: absolute; right: 16px; top: -272px; display: flex; align-items: center; gap: 12px; }
.nxyg-header-search, .nxyg-menu-toggle {
    background: #204b9e;
    border: 1px solid #85a4e0;
    color: white;
    border-radius: 6px;
    width: 42px;
    height: 42px;
}
.nxyg-header-search span {
    display: block;
    width: 14px;
    height: 14px;
    margin: auto;
    border: 2px solid white;
    border-radius: 50%;
    position: relative;
}
.nxyg-header-search span::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: -3px;
    width: 7px;
    height: 2px;
    background: white;
    transform: rotate(45deg);
}
.nxyg-menu-toggle { display: none; width: auto; padding: 0 12px; }
.nxyg-search-panel { position: absolute; right: 0; left: 0; top: 100%; z-index: 5; }
.nxyg-search-panel form {
    display: flex;
    background: white;
    padding: 12px;
    margin-left: auto;
    max-width: min(480px, 100%);
    box-shadow: 0 8px 25px #0b21422a;
}
.nxyg-search-panel input { min-width: 0; flex: 1; border: 1px solid #d2dce9; padding: 9px 12px; }
.nxyg-search-panel form button { color: white; background: var(--nxyg-brand); border: 0; padding: 0 15px; }
.nxyg-menu, .nxyg-menu .sub-menu { margin: 0; padding: 0; list-style: none; }
.nxyg-menu { display: flex; align-items: stretch; justify-content: center; }
.nxyg-menu li { position: relative; }
.nxyg-menu > li > a {
    display: block;
    padding: 33px 20px;
    color: white;
    text-decoration: none;
    line-height: 22px;
    white-space: nowrap;
}
.nxyg-menu > li > a:hover, .nxyg-menu > li.current-menu-item > a {
    text-decoration: underline;
    text-underline-offset: 5px;
}
.nxyg-menu .sub-menu {
    display: none;
    inset-inline-start: 0;
    position: absolute;
    top: 100%;
    z-index: 1;
    min-width: 170px;
    background: white;
    border-top: 2px solid var(--nxyg-red);
    box-shadow: 0 8px 22px #0b214230;
}
.nxyg-menu .sub-menu .sub-menu { left: 100%; top: 0; }
.nxyg-menu .sub-menu a {
    display: block;
    padding: 10px 13px;
    border-bottom: 1px dotted #d7dce5;
    text-align: center;
    color: #38404d;
    font-size: 14px;
}
.nxyg-menu .sub-menu a:hover { color: var(--nxyg-red); }
.nxyg-menu li:hover > .sub-menu, .nxyg-menu li:focus-within > .sub-menu { display: block; }
.nxyg-submenu-toggle { display: none; }
.nxyg-header .nxyg-brand:not(:has(img)) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}
@media (min-width: 992px) {
    .nxyg-header .nxyg-brand:has(img) { position: absolute; inset: -300px auto auto 15px; }
}

.nxyg-carousel { position: relative; min-width: 0; }
.nxyg-carousel--hero { margin: 55px 0 32px; }
.nxyg-track {
    --card-gap: 24px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    gap: var(--card-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.nxyg-track::-webkit-scrollbar { display: none; }
.nxyg-carousel--news .nxyg-track, .nxyg-carousel--programs .nxyg-track {
    --card-gap: 30px;
    grid-auto-columns: calc((100% - 2 * var(--card-gap)) / 3);
}
.nxyg-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.nxyg-slide { position: relative; min-width: 0; margin: 0; scroll-snap-align: start; }
.nxyg-carousel--news .nxyg-slide, .nxyg-carousel--programs .nxyg-slide { scroll-snap-stop: always; }
.nxyg-card-media { display: block; position: relative; overflow: hidden; }
.nxyg-card-media img { display: block; width: 100%; height: auto; }
.nxyg-carousel--focus .nxyg-card-media { aspect-ratio: 670 / 407; background: #e8eef8; }
.nxyg-carousel--focus .nxyg-card-media img,
.nxyg-carousel--news .nxyg-card-media img { width: 100%; height: 100%; object-fit: cover; }
.nxyg-carousel--news .nxyg-card-media { aspect-ratio: 16 / 9; background: #eff1f5; }
.nxyg-focus-title {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    display: block;
    padding: 12px 15px;
    background: #000a;
    line-height: 1.4;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.nxyg-card-copy { padding: 16px 0 5px; }
.nxyg-card-copy h3 { font-size: 19px; font-weight: 600; margin: 0 0 9px; line-height: 1.45; }
.nxyg-card-copy h3 a { color: var(--nxyg-ink); }
.nxyg-card-copy time { color: var(--nxyg-red); font-size: 14px; }
.nxyg-card-description { color: var(--nxyg-muted); margin-top: 9px; font-size: 15px; line-height: 1.65; }
.nxyg-carousel-dots {
    display: flex;
    min-height: 22px;
    justify-content: center;
    gap: 7px;
    padding-top: 12px;
}
.nxyg-carousel-dots button {
    width: 20px;
    min-height: 19px;
    border: 0;
    padding: 0;
    background: transparent;
}
.nxyg-carousel-dots button::before {
    display: block;
    content: "";
    height: 5px;
    border-radius: 3px;
    background: #aab9d0;
}
.nxyg-carousel-dots button[aria-current="true"]::before { background: #2962ad; }
.nxyg-carousel-dots .nxyg-carousel-pause {
    color: #244e87;
    line-height: 1;
    font-size: 11px;
}
.nxyg-carousel-dots .nxyg-carousel-pause::before { content: none; }
.nxyg-notices { min-width: 0; }
.nxyg-notices .index-newtit { display: flex; align-items: center; justify-content: space-between; }
.nxyg-notices .index-newtit img { max-width: 80%; }
.nxyg-notices .index-new-more { margin-left: auto; }
.nxyg-headlines li { display: flex; min-width: 0; align-items: baseline; gap: 10px; }
.nxyg-headlines li a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nxyg-headlines time { flex: 0 0 auto; color: #737d89; font-size: 14px; }
.nxyg-section-title { margin: 54px 0 38px; }
.nxyg-section-title h2 { margin: 0 0 5px; font-size: clamp(25px, 4vw, 32px); }
.nxyg-section-title p { margin: 0; font-size: 16px; color: #787f87; }
.adv-mid-box img { display: block; width: 100%; height: auto; }
.nxyg-banner-image { margin: 15px 0; }

.newsbg { font-size: 14px; }
.nxyg-project-news h2 {
    margin: 0;
    background: #456382 url(assets/legacy/statics/images/images-2020/title-bg.jpg) no-repeat left center;
    color: white;
    font-size: 20px;
    font-weight: 500;
    line-height: 76px;
    text-align: center;
}
.nxyg-project-list { display: flow-root; padding: 20px; background: white; }
.nxyg-project-list li { align-items: center; height: 46px; border-bottom: 1px dotted #ccc; }
.nxyg-project-list li a { color: #666; font-size: 16px; }
.nxyg-project-list li a:is(:hover, :focus-visible) { color: #0669d9; }
.nxyg-project-list time { color: #999; font-size: 14px; }
.nxyg-project-list .list-more {
    float: right;
    margin-top: 15px;
    padding: 4px 20px;
    color: white;
    background: #0669d9;
    font-size: 13px;
}
.news-index-box video { width: 100%; height: auto; }

.nxyg-home-programs .nxyg-section-title { margin: 60px 0; }
.nxyg-home-programs .nxyg-section-title h2 { margin: 0; color: #000; font-size: 32px; font-weight: 400; line-height: inherit; }
.nxyg-home-programs .nxyg-section-title p { color: #a0a0a0; font-size: 18px; }
.nxyg-program-card {
    position: relative;
    display: block;
    overflow: hidden;
    height: 600px;
    background: #333;
    text-align: center;
    font-size: 18px;
}
.nxyg-program-card:focus-visible { outline-offset: -4px; }
.nxyg-program-card img {
    display: block;
    width: 384px;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
}
.nxyg-program-copy {
    position: absolute;
    inset: 0;
    padding: 40% 70px 0;
    color: white;
    background: rgba(0, 0, 0, .5);
    transition: background-color .4s ease, transform .4s ease;
}
a.nxyg-program-card:focus-visible .nxyg-program-copy {
    background-color: rgba(0, 0, 0, .8);
    transform: translateY(-10px);
}
@media (hover: hover) {
    a.nxyg-program-card:hover .nxyg-program-copy {
        background-color: rgba(0, 0, 0, .8);
        transform: translateY(-10px);
    }
}
.nxyg-program-copy h3 { font-size: 24px; font-weight: 600; line-height: 90px; }
.nxyg-program-rule { display: inline-block; vertical-align: middle; width: 20%; border-bottom: 3px solid white; margin-bottom: 5px; }
.nxyg-program-description { margin-top: 20px; color: #d8d8d8; font-size: 14px; line-height: 24px; }

.nxyg-carousel--news { padding-bottom: 120px; }
.nxyg-carousel--programs { padding-bottom: 100px; }
.nxyg-carousel--news .nxyg-carousel-dots, .nxyg-carousel--programs .nxyg-carousel-dots {
    position: absolute;
    inset: auto 0 65px;
    gap: 8px;
    padding: 0;
    min-height: 0;
}
.nxyg-carousel--news .nxyg-carousel-dots { bottom: 60px; opacity: .7; }
.nxyg-carousel--news [data-carousel-page], .nxyg-carousel--programs [data-carousel-page] {
    display: grid;
    place-items: center;
    width: 15px;
    min-height: 15px;
}
.nxyg-carousel--news [data-carousel-page]::before, .nxyg-carousel--programs [data-carousel-page]::before {
    width: 100%;
    height: 15px;
    border-radius: 50%;
    background: #d0cfcf;
    opacity: .7;
}
.nxyg-carousel--news [data-carousel-page][aria-current="true"]::before,
.nxyg-carousel--programs [data-carousel-page][aria-current="true"]::before {
    background: #f42937;
    opacity: 1;
}
.nxyg-carousel--news .nxyg-carousel-pause, .nxyg-carousel--programs .nxyg-carousel-pause {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    pointer-events: none;
}
.nxyg-carousel--news .nxyg-carousel-pause:focus, .nxyg-carousel--programs .nxyg-carousel-pause:focus {
    opacity: 1;
    pointer-events: auto;
}

.nxyg-more { color: var(--nxyg-brand); }
.nxyg-footer-info { display: block; }
.nxyg-footer-links .link-text { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; padding: 0; list-style: none; }
.nxyg-footer .index-title-link h2 { color: white; font-size: 29px; margin: 0; }

.nxyg-crumbs ol { list-style: none; padding: 0; margin: 0; }
.nxyg-crumbs li { display: inline; }
.nxyg-crumbs li + li::before { content: " / "; color: #8a9099; margin: 0 .35em; }
.nxyg-content-wrap { min-height: 340px; padding-bottom: 36px; }
.nxyg-sidebar-desktop { border: 1px solid var(--nxyg-outline); }
.nxyg-sidebar h2 {
    background: var(--nxyg-brand);
    color: white;
    font-size: 20px;
    padding: 18px 14px;
    margin: 0;
    text-align: center;
}
.nxyg-sidebar ul { margin: 0; padding: 0; list-style: none; }
.nxyg-sidebar li a {
    display: block;
    padding: 13px 14px;
    text-align: center;
    color: var(--nxyg-ink);
    border-bottom: 1px solid var(--nxyg-outline);
}
.nxyg-sidebar li.active a { color: var(--nxyg-brand); background: #edf4ff; font-weight: 600; }
.nxyg-sidebar-mobile { display: none; }
.nxyg-article-list { padding: 0; margin: 0; }
.nxyg-article-list li { display: flex; gap: 18px; min-width: 0; }
.nxyg-article-list .nxyg-list-image { display: block; flex: 0 0 22%; max-width: 220px; }
.nxyg-list-image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.nxyg-article-list li .r_list { flex: 1; min-width: 0; float: none; width: auto; }
.nxyg-article-list h2 { font-size: 19px; font-weight: 600; margin: 0 0 8px; line-height: 1.5; }
.nxyg-article-list h2 a { color: var(--nxyg-ink); }
.nxyg-article-list p { color: var(--nxyg-muted); }
.nxyg-article-list time { font-size: 14px; color: var(--nxyg-muted); }
.nxyg-archive .nav-links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.nxyg-archive .page-numbers { padding: 5px 10px; border: 1px solid var(--nxyg-outline); }
.nxyg-archive .page-numbers.current { color: white; background: var(--nxyg-brand); }
.nxyg-single h1 { text-align: center; font-size: clamp(23px, 3.6vw, 31px); line-height: 1.45; overflow-wrap: anywhere; }
.nxyg-single .timefrom { display: flex; justify-content: center; gap: .3em 1em; flex-wrap: wrap; }
.nxyg-prose { line-height: 1.85; min-width: 0; overflow-wrap: anywhere; }
.nxyg-prose img, .nxyg-prose video, .nxyg-prose iframe { max-width: 100%; }
.nxyg-prose img { height: auto !important; object-fit: contain; }
.nxyg-prose table { display: block; max-width: 100%; overflow-x: auto; }
.nxyg-prose a { color: var(--nxyg-brand); text-decoration: underline; }
.nxyg-adjacent { margin-top: 28px; }
.nxyg-results-title { margin: 0 0 22px; font-size: 25px; }

@media (max-width: 1199px) {
    .nxyg-menu > li > a { padding-inline: 11px; font-size: 15px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .nxyg-program-copy { padding-inline: 40px; }
}
@media (max-width: 991px) {
    .nxyg-project-news h2 { background-repeat: repeat-x; }
    body {
        padding-top: clamp(126px, 26vw, 240px);
        background-size: max(540px, 150vw) auto;
    }
    .nxyg-header { margin-top: 0; border: 0; }
    .nxyg-header-inner { padding-top: 12px; }
    .nxyg-header .nxyg-brand { display: inline-block; max-width: calc(100% - 110px); padding-right: 5px; }
    .nxyg-header-tools { top: 9px; right: 15px; gap: 7px; }
    .nxyg-header-search, .nxyg-menu-toggle { height: 37px; }
    .nxyg-header-search { width: 37px; }
    .nxyg-menu-toggle { display: block; }
    .nxyg-navigation { display: none; max-height: 65vh; overflow-y: auto; background: white; margin-top: 12px; }
    .nxyg-navigation.is-open { display: block; }
    .nxyg-menu { display: block; box-shadow: 0 8px 20px #183b682b; }
    .nxyg-menu > li > a { padding: 13px 50px 13px 16px; color: var(--nxyg-ink); border-bottom: 1px solid var(--nxyg-outline); }
    .nxyg-menu .sub-menu { position: static; padding-left: 12px; width: auto; box-shadow: none; border-top: 0; }
    .nxyg-menu .sub-menu a { text-align: left; }
    .nxyg-menu li:hover > .sub-menu, .nxyg-menu li:focus-within > .sub-menu { display: none; }
    .nxyg-menu li.is-expanded > .sub-menu { display: block; }
    .nxyg-submenu-toggle { display: block; position: absolute; top: 4px; right: 7px;
        width: 37px; height: 36px; border: 1px solid #dce3ed; background: #f6f9ff; color: var(--nxyg-brand); }
    .nxyg-carousel--hero { margin: 23px 0 22px; }
    .nxyg-notices { padding-top: 19px; }
    .nxyg-carousel--news .nxyg-track, .nxyg-carousel--programs .nxyg-track {
        grid-auto-columns: calc((100% - var(--card-gap)) / 2);
    }
    .nxyg-section-title { margin: 35px 0 24px; }
    .nxyg-footer .foot-info { display: block; text-align: center; }
    .nxyg-footer .footinfo-left, .nxyg-footer .footinfo-right { text-align: center; }
    .nxyg-sidebar-desktop { display: none; }
    .nxyg-sidebar-mobile { display: block; margin-bottom: 20px; border: 1px solid var(--nxyg-outline); }
    .nxyg-sidebar-mobile summary { padding: 12px 14px; background: #edf4ff; color: #153d7e; cursor: pointer; }
}
@media (max-width: 767px) {
    .nxyg-carousel--news .nxyg-track, .nxyg-carousel--programs .nxyg-track { grid-auto-columns: 100%; }
    .nxyg-home-programs .nxyg-section-title { margin: 25px 0; }
    .nxyg-carousel--news { padding-bottom: 20px; }
    .nxyg-carousel--programs { padding-bottom: 30px; }
    .nxyg-carousel--news .nxyg-carousel-dots, .nxyg-carousel--programs .nxyg-carousel-dots {
        bottom: 0;
        gap: 4px;
        opacity: 1;
    }
    .nxyg-carousel--news [data-carousel-page], .nxyg-carousel--programs [data-carousel-page] {
        width: 12px;
        min-height: 14px;
    }
    .nxyg-carousel--news [data-carousel-page]::before, .nxyg-carousel--programs [data-carousel-page]::before {
        height: 4px;
        border-radius: 3px;
    }
}
@media (max-width: 560px) {
    .nxyg-focus-title { font-size: 14px; }
    .nxyg-article-list li { gap: 10px; }
    .nxyg-article-list .nxyg-list-image { flex-basis: 30%; width: 30%; padding-top: 4px; }
    .nxyg-article-list h2 { font-size: 16px; }
    .nxyg-headlines time { font-size: 12px; }
    .nxyg-project-list time { font-size: 14px; }
}

@media (max-width: 375px) {
    body { background-position: calc(50% + 13px) top; }
    .nxyg-program-copy { padding-inline: 35px; }
}
@media (prefers-reduced-motion: reduce) {
    .nxyg-program-copy { transition: none; }
}
