/* CMS template bridge styles for cifstyle theme */

.cif-pager .pagination > li > a,
.cif-pager .pagination > li > span {
    border-radius: 10px;
    margin: 0 4px;
    border-color: #e9ecf6;
}

.cif-pager .pagination > .active > a,
.cif-pager .pagination > .active > span {
    background: #e74c3c;
    border-color: #e74c3c;
}

.cif-loadmore {
    border-radius: 999px;
    padding-left: 18px;
    padding-right: 18px;
}

.cif-empty {
    padding: 14px 0;
    color: #7a8293;
}

#comment-container .news.cif-comment {
    margin-bottom: 12px;
    border-bottom: 1px solid #edf0f8;
    padding-bottom: 10px;
}

#postcomment textarea.form-control {
    border-radius: 10px;
    min-height: 110px;
}

.about-author .author-statistics {
    margin-left: 0;
    margin-right: 0;
}

.entry-meta .goods li {
    display: block;
}

.entry-meta .goods li span {
    float: right;
    max-width: 70%;
    text-align: right;
    word-break: break-all;
}

.entry-meta .article-tag .tag {
    margin-bottom: 6px;
    display: inline-block;
}

/* Master layout optimizations */
.user-info-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.user-avatar-small {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 6px;
}
.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 120px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    display: none;
    flex-direction: column;
    z-index: 100;
    padding: 8px 0;
}
.user-info-wrapper:hover .user-dropdown {
    display: flex;
}
.user-dropdown a {
    padding: 8px 16px;
    color: #555 !important;
    font-size: 13px;
}
.user-dropdown a:hover {
    background: #f5f5f5;
    color: var(--red) !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: end;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
}
.mobile-toggle i {
    width: 20px;
    height: 2px;
    background: #333;
    border-radius: 2px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}
.sub-nav {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 160px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 4px;
    display: none;
    flex-direction: column;
    z-index: 100;
    padding: 10px 0;
}
.nav-item:hover .sub-nav {
    display: flex;
}
.sub-nav a {
    padding: 10px 20px;
    color: #555 !important;
    font-size: 14px;
    font-weight: normal !important;
    height: auto !important;
}
.sub-nav a:hover {
    background: #f5f5f5;
    color: var(--red) !important;
}

@media (max-width: 760px) {
    .home-polish .topbar {
        display: none !important;
    }
    .mobile-toggle {
        display: flex;
    }
    .home-polish .site-header {
        position: relative !important;
        background: #fff !important;
        z-index: 100;
    }
    .home-polish .header-main {
        grid-template-columns: 1fr !important;
        gap: 10px;
        height: auto !important;
        padding: 10px 0;
    }
    .home-polish .brand img {
        width: 160px !important;
        height: auto !important;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
        display: flex;
        align-items: center;
        font-size: 0;
        overflow: hidden;
    }
    .header-actions > :not(.register):not(.mobile-toggle) {
        display: none !important;
    }
    .register {
        width: auto;
        min-width: 96px;
        height: 38px;
        padding: 0 14px;
        justify-self: start;
        white-space: nowrap;
        line-height: 1;
        font-size: 14px;
        flex: 0 0 auto;
    }
    .search {
        width: 100%;
        min-width: 0;
    }
    .search > input[name="q"],
    .search > input[type="search"],
    .search-field input {
        min-width: 0;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        height: auto !important;
        padding: 10px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        z-index: 90;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .main-nav.active {
        display: flex;
    }
    .main-nav a {
        width: 100%;
        padding: 12px 20px !important;
    }
    .nav-item {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .sub-nav {
        position: static;
        width: 100%;
        box-shadow: none;
        background: #fcfcfc;
        padding: 0;
        display: none;
    }
    .nav-item.active .sub-nav {
        display: flex;
    }
    .sub-nav a {
        padding-left: 40px !important;
    }
    .mobile-toggle {
        width: 38px;
        height: 38px;
        border-radius: 6px;
        border: 1px solid #e4e4e4;
        background: #fff;
        padding: 7px 8px;
        justify-content: center;
        flex: 0 0 38px;
        font-size: 0;
    }
    .mobile-toggle i {
        display: block;
        width: 20px;
        height: 2px;
        margin: 0;
        background: #333;
        border-radius: 999px;
        font-size: 0;
        line-height: 0;
    }

    /* Mentors page mobile optimizations */
    .mentor-grid-new {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 10px !important;
    }

    .mentor-card-new {
        display: flex !important;
        flex-direction: row !important;
        background: #fff;
        border-radius: 12px;
        overflow: hidden;
        border: 1px solid #f0f0f0;
        padding: 0 !important;
    }

    .mentor-photo {
        flex: 0 0 110px !important;
        height: 140px !important;
        background: #f9f9f9 !important;
    }

    .mentor-photo img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .mentor-card-new .info {
        flex: 1;
        padding: 12px 15px !important;
        display: flex;
        flex-direction: column;
    }

    .mentor-card-new h3 {
        font-size: 18px !important;
        margin-bottom: 2px !important;
    }

    .mentor-card-new .role {
        font-size: 13px !important;
        margin-top: 0 !important;
        color: #666 !important;
    }

    .mentor-card-new .pill {
        margin-top: 6px !important;
        font-size: 11px !important;
        padding: 2px 8px !important;
        align-self: flex-start;
    }

    .mentor-card-new p {
        margin: 8px 0 !important;
        font-size: 13px !important;
        line-height: 1.4 !important;
        min-height: 0 !important;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .mentor-card-new a {
        margin-top: auto;
        height: 32px !important;
        font-size: 13px !important;
        border-radius: 6px !important;
    }

    .filter-bar {
        padding: 10px !important;
    }

    .filter-tabs {
        display: flex !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        gap: 8px !important;
        padding-bottom: 5px !important;
        -webkit-overflow-scrolling: touch;
    }

    .filter-tabs a {
        padding: 6px 14px !important;
        font-size: 13px !important;
        border-radius: 20px !important;
        background: #f5f5f5;
        flex: 0 0 auto;
    }

    .filter-tabs a.active {
        background: var(--red) !important;
        color: #fff !important;
    }

    .mentor-hero-stats {
        gap: 15px !important;
        justify-content: space-between !important;
    }

    .mentor-hero-stats .box strong {
        font-size: 20px !important;
    }

    .mentor-hero-stats .box span {
        font-size: 12px !important;
    }
}

/* Cross-template compatibility baseline */
.home-polish {
    padding-top: 0 !important;
}

.home-polish .page > .container#content-container {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.home-polish #content-container > .row {
    margin-left: 0;
    margin-right: 0;
}

.home-polish #content-container > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.home-polish .panel.block,
.home-polish .panel.side-box {
    border: 1px solid #edf1fb;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.04);
}

.home-polish .panel.block > .panel-body,
.home-polish .panel.side-box > .panel-body {
    padding: 16px 18px;
}

.home-polish .pager:not(.cif-pager) .pagination > li > a,
.home-polish .pager:not(.cif-pager) .pagination > li > span {
    border-radius: 10px;
    margin: 0 4px;
    border: 1px solid #e9ecf6;
    color: #4a5568;
}

.home-polish .pager:not(.cif-pager) .pagination > .active > a,
.home-polish .pager:not(.cif-pager) .pagination > .active > span {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
}

/* Rich content compatibility */
.home-polish .article-text img,
.home-polish .intro-box img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.home-polish .article-text table {
    width: 100%;
    display: block;
    overflow-x: auto;
    border-collapse: collapse;
}

.home-polish .article-text table td,
.home-polish .article-text table th {
    border: 1px solid #eef1f7;
    padding: 8px 10px;
}

.home-polish .article-text pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    overflow-x: auto;
}

.home-polish .article-text blockquote {
    border-left: 3px solid #ef4444;
    background: #fff8f8;
    padding: 10px 12px;
    border-radius: 8px;
}

/* Search and xunsearch compatibility */
.home-polish .form-search .search-query {
    width: 100%;
    border: 1px solid #e5e9f4;
    border-radius: 12px;
    min-height: 44px;
    padding: 10px 12px;
    outline: none;
}

.home-polish .form-search .search-query:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.home-polish .result-list dt h4 {
    margin: 0 0 4px;
    line-height: 1.5;
}

.home-polish .result-list dd {
    border-bottom: 1px solid #eef1f7;
    padding-bottom: 10px;
}

.home-polish .result-list dd:last-child {
    border-bottom: none;
}

.home-polish .search-suggestion {
    border: 1px solid #ffe2de;
    border-radius: 10px;
    background: #fff7f5;
}

.home-polish .dropdown-menu.orderlist {
    border-radius: 10px;
    border: 1px solid #edf1fb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

/* Form page compatibility */
.home-polish #post-form .form-control {
    border-radius: 10px;
    border-color: #e5e9f4;
}

.home-polish #post-form .form-control:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.home-polish #post-form .control-label {
    color: #4b5563;
    font-weight: 600;
}

.home-polish #post-form .btn {
    border-radius: 999px;
    min-width: 110px;
}

/* Sidebar/menu small compatibility */
.home-polish .goods li.active > b > a,
.home-polish .goods li.active > a {
    color: #e74c3c;
}

.home-polish .author-card .author-head {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Disable Bootstrap clearfix pseudo-elements for grid containers to avoid them becoming grid items. */
.home-polish .topbar-inner::before,
.home-polish .topbar-inner::after,
.home-polish .header-main::before,
.home-polish .header-main::after,
.home-polish .footer-inner::before,
.home-polish .footer-inner::after {
    display: none !important;
}

.footer-links-wrapper {
    display: contents;
}

/* Stabilize homepage header layout to avoid misalignment. */
@media (min-width: 761px) {
    .home-polish .topbar-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 16px;
        align-items: center;
    }

    .home-polish .topbar-inner > span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-polish .topbar nav {
        display: flex;
        align-items: center;
        gap: 16px;
        flex-wrap: nowrap;
    }

    .home-polish .header-main {
        grid-template-columns: 210px minmax(460px, 1fr) auto;
        gap: 18px;
    }
}

@media (min-width: 761px) and (max-width: 1239px) {
    .home-polish .header-main {
        grid-template-columns: 210px 1fr auto;
    }
}

.home-polish .header-main .search {
    min-width: 0;
}

.home-polish .main-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
}

.home-polish .main-nav a {
    white-space: nowrap;
}

/* Fix homepage courses card text overflow. */
.home-polish #courses .course-row article {
    height: auto;
    min-height: 132px;
    overflow: hidden;
}

.home-polish #courses .course-row article h3 {
    margin-bottom: 6px;
}

.home-polish #courses .course-row article h3 a {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.home-polish #courses .course-row article p {
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

@media (max-width: 390px) {
    .home-polish .header-main {
        gap: 8px;
    }

    .home-polish .header-main .brand img {
        max-height: 32px;
    }

    .home-polish .header-main .search {
        min-width: 100%;
        order: 3;
    }

    .home-polish .header-main .register {
        padding: 8px 10px;
        font-size: 12px;
    }

    .home-polish .main-nav {
        overflow-x: auto;
        white-space: nowrap;
        scrollbar-width: thin;
    }

    .home-polish .main-nav a {
        display: inline-block;
        margin-right: 8px;
        font-size: 13px;
    }

    .home-polish .section-head h2 {
        font-size: 18px;
    }

    .home-polish .service-grid,
    .home-polish .topic-row {
        grid-template-columns: 1fr;
    }

    .home-polish .news {
        grid-template-columns: 1fr;
    }

    .home-polish .news .thumb {
        min-height: 120px;
    }

    .home-polish .content-layout {
        grid-template-columns: 1fr;
    }

    .home-polish .member {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .home-polish .page {
        padding-left: 12px;
        padding-right: 12px;
    }
    .home-polish .footer-pages .footer-inner {
        grid-template-columns: 1fr;
        padding: 32px 20px 24px;
        gap: 0;
    }
    .home-polish .footer-pages .footer-brand {
        text-align: center;
        margin-bottom: 24px;
        padding-bottom: 24px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    .home-polish .footer-pages .footer-brand p {
        max-width: none;
        font-size: 13px;
        line-height: 1.8;
    }
    .home-polish .footer-pages .footer-links-wrapper {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px 16px;
        margin-bottom: 32px;
    }
    .home-polish .footer-pages .footer-col {
        display: block;
        gap: 0;
    }
    .home-polish .footer-pages .footer-col h4,
    .home-polish .footer-pages .footer-col a {
        margin: 0;
    }
    .home-polish .footer-pages .footer-col h4 {
        font-size: 16px;
        margin-bottom: 16px;
        color: #333;
        font-weight: 700;
    }
    .home-polish .footer-pages .footer-col a {
        display: block;
        font-size: 14px;
        color: #666;
        margin-bottom: 12px;
        line-height: 1.5;
    }
    .home-polish .footer-pages .footer-col:last-of-type {
        grid-column: 1 / -1;
        margin-top: 8px;
        padding-top: 24px;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
    .home-polish .footer-pages .footer-social-list {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 20px;
    }
    .home-polish .footer-pages .footer-contact-item {
        flex: 1;
        min-width: 80px;
        justify-content: center;
        padding: 10px !important;
        background: #f8f8f8;
        border-radius: 8px;
        font-size: 13px;
        min-height: auto;
    }
    .home-polish .footer-pages .footer-contact-meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px;
        background: #fdfdfd;
        border: 1px solid #f2f2f2;
        border-radius: 10px;
        margin-top: 0;
    }
    .home-polish .footer-pages .footer-contact-meta p {
        white-space: normal;
        overflow-wrap: anywhere;
        font-size: 13px;
    }
    .home-polish .footer-pages .copy {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 8px;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        font-size: 12px;
    }

    .home-polish .focus-strip {
        height: auto !important;
        min-height: 32px;
        margin-top: 8px !important;
        padding: 4px 12px !important;
    }

    .home-polish .hero-banner {
        height: auto !important;
        min-height: 300px !important;
        margin-top: 10px !important;
    }

    .home-polish .hero-copy {
        padding: 24px 20px 40px !important;
    }

    .home-polish .hero-copy h1 {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    .home-polish .hero-copy h2 {
        font-size: 15px !important;
        margin-top: 8px !important;
    }

    .home-polish .hero-copy p {
        font-size: 13px !important;
        line-height: 1.5 !important;
        margin-top: 10px !important;
    }

    .home-polish .hero-copy .btn-group {
        margin-top: 15px !important;
        gap: 10px !important;
    }

    .home-polish .hero-copy .btn {
        height: 36px !important;
        padding: 0 16px !important;
        font-size: 13px !important;
    }

    .home-polish .panel.block,
    .home-polish .panel.side-box {
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .home-polish .panel.block > .panel-body,
    .home-polish .panel.side-box > .panel-body {
        padding: 12px;
    }

    .home-polish .result-list dd .description {
        line-height: 1.7;
        font-size: 14px;
    }

    .home-polish .form-search .search {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .home-polish #post-form .control-label {
        text-align: left;
        margin-bottom: 4px;
    }

    .home-polish .entry-meta .goods li span {
        float: none;
        display: block;
        max-width: none;
        text-align: left;
        margin-top: 4px;
    }
}

@media (max-width: 414px) {
    .home-polish .header-main {
        gap: 8px;
    }

    .home-polish .header-main .brand img {
        width: 150px !important;
        height: auto !important;
    }

    .home-polish .header-main .search {
        grid-template-columns: 1fr 64px;
    }

    .home-polish .header-main .search-field input {
        padding: 0 8px 0 12px;
        font-size: 13px;
    }

    .home-polish .header-main .search > button[type="submit"] {
        font-size: 13px;
    }

    .home-polish .header-actions {
        gap: 8px;
    }

    .home-polish .register {
        min-width: 88px;
        height: 36px;
        font-size: 13px;
    }

    .home-polish .mobile-toggle {
        width: 36px;
        height: 36px;
        padding: 6px 7px;
    }

    .home-polish .main-nav a {
        min-height: 42px;
        line-height: 1.35;
        font-size: 14px;
    }

    .home-polish .sub-nav a {
        min-height: 40px;
    }

    .home-polish .footer-pages .footer-col h4 {
        margin-bottom: 8px;
    }

    .home-polish .footer-pages .footer-col a {
        margin-bottom: 8px;
    }

    .home-polish .footer-pages .footer-contact-item {
        height: auto;
        min-height: 30px;
        padding: 5px 10px;
    }

    .home-polish .footer-pages .copy {
        gap: 4px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .home-polish .header-main .brand img {
        width: 140px !important;
    }

    .home-polish .header-main .search {
        grid-template-columns: 1fr 58px;
    }

    .home-polish .header-main .search-field input {
        font-size: 12px;
    }

    .home-polish .register {
        min-width: 82px;
        padding: 0 10px;
        font-size: 12px;
    }
}

/* 讲师顾问列表移动端修正：只覆盖 mentors 栏目列表，避免标题被压成竖排。 */
@media (max-width: 760px) {
    .home-polish .lecturer-list {
        display: grid;
        gap: 12px;
        padding: 0;
    }

    .home-polish .lecturer-list .article-card {
        display: grid !important;
        grid-template-columns: 104px minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: start !important;
        padding: 12px !important;
        border: 1px solid #edf1fb !important;
        border-radius: 14px !important;
        background: #fff;
        box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    }

    .home-polish .lecturer-list .article-card > img {
        width: 104px !important;
        height: 128px !important;
        grid-row: 1 / span 2;
        border-radius: 12px !important;
        object-fit: cover !important;
        background: #f8fafc !important;
    }

    .home-polish .lecturer-list .article-main {
        min-width: 0;
        display: grid;
        gap: 6px;
    }

    .home-polish .lecturer-list .article-main small {
        margin: 0 !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
        color: #8a93a3 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-polish .lecturer-list .article-main h3 {
        margin: 0 !important;
        font-size: 17px !important;
        line-height: 1.35 !important;
    }

    .home-polish .lecturer-list .article-main h3 a {
        display: -webkit-box;
        overflow: hidden;
        overflow-wrap: normal;
        word-break: normal;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .home-polish .lecturer-list .article-main p {
        margin: 0 !important;
        font-size: 13px !important;
        line-height: 1.55 !important;
        color: #667085 !important;
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .home-polish .lecturer-list .article-main > div {
        margin-top: 0 !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-polish .lecturer-list .tag-stack {
        grid-column: 2;
        display: flex !important;
        flex-wrap: wrap;
        gap: 8px !important;
        align-items: center;
        justify-content: flex-start;
        color: #98a2b3 !important;
        font-size: 12px !important;
    }

    .home-polish .lecturer-list .tag-stack .pill {
        height: 26px !important;
        padding: 0 10px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 360px) {
    .home-polish .lecturer-list .article-card {
        grid-template-columns: 92px minmax(0, 1fr) !important;
        gap: 10px !important;
        padding: 10px !important;
    }

    .home-polish .lecturer-list .article-card > img {
        width: 92px !important;
        height: 116px !important;
    }

    .home-polish .lecturer-list .article-main h3 {
        font-size: 16px !important;
    }
}

/* 首页移动端平台推荐卡片修正：使用后台 logo 后避免横条布局挤压内容。 */
@media (max-width: 760px) {
    .home-polish .promo {
        height: auto !important;
        min-height: 0 !important;
        margin-top: 14px !important;
        padding: 14px !important;
        display: grid !important;
        grid-template-columns: 1fr auto;
        gap: 12px;
        align-items: center;
        border: 1px solid #ffe1dc;
        border-radius: 10px !important;
        background-color: #fff;
        background-position: right center;
        overflow: visible;
    }

    .home-polish .promo-left {
        min-width: 0;
        display: grid !important;
        grid-template-columns: auto 1fr;
        gap: 6px 10px !important;
        align-items: center;
    }

    .home-polish .promo-logo-img {
        grid-column: 1 / 3;
        width: 118px !important;
        max-width: 60%;
        height: auto !important;
        max-height: 34px;
        margin: 0 !important;
        object-fit: contain;
        object-position: left center;
    }

    .home-polish .promo b {
        width: auto !important;
        min-width: 64px;
        height: 28px !important;
        padding: 0 10px;
        border-radius: 4px !important;
        font-size: 13px;
        line-height: 1;
        white-space: nowrap;
        justify-self: start;
    }

    .home-polish .promo strong {
        min-width: 0;
        font-size: 17px !important;
        line-height: 1.35;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .home-polish .promo p {
        grid-column: 1 / 3;
        margin: 0 !important;
        font-size: 13px;
        line-height: 1.55;
        color: #667085;
    }

    .home-polish .promo > a {
        width: auto !important;
        min-width: 86px;
        height: 34px !important;
        padding: 0 12px;
        border-radius: 6px !important;
        font-size: 13px;
        align-self: center;
    }

    .home-polish .entry-row {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin-top: 14px !important;
    }

    .home-polish .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .home-polish .stats article {
        height: auto !important;
        min-height: 76px !important;
        padding: 12px 14px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .home-polish .stats strong {
        font-size: 24px !important;
        line-height: 1.1 !important;
    }

    .home-polish .stats span {
        margin-top: 4px !important;
        font-size: 11px !important;
        line-height: 1.35 !important;
        color: #667085 !important;
        overflow-wrap: anywhere !important;
    }

    .home-polish .entry {
        height: auto !important;
        min-height: 86px !important;
        padding: 12px 10px 12px 60px !important;
        border-radius: 8px !important;
        overflow: visible !important;
        align-items: flex-start !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    .home-polish .entry img {
        left: 10px !important;
        width: 44px !important;
        height: 44px !important;
    }

    .home-polish .entry strong {
        font-size: 15px !important;
        line-height: 1.25 !important;
        margin-bottom: 4px !important;
    }

    .home-polish .entry span {
        font-size: 11px !important;
        line-height: 1.4 !important;
        color: #667085 !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }
}

@media (max-width: 360px) {
    .home-polish .promo {
        grid-template-columns: 1fr;
    }

    .home-polish .promo > a {
        justify-self: start;
    }
}

/* 首页移动端：统计区仅保留「栏目数量」「互动评论」，与设计稿一致。 */
@media (max-width: 760px) {
    .home-polish .stats article:nth-child(1),
    .home-polish .stats article:nth-child(2) {
        display: none !important;
    }

    .home-polish .stats {
        gap: 12px !important;
    }

    .home-polish .stats article {
        border: none !important;
        box-shadow: 0 4px 18px rgba(20, 25, 35, 0.07) !important;
    }
}

/* 首页移动端资讯洞察列表：卡片化布局、全宽封面、标题层级与桌面区分。 */
@media (max-width: 760px) {
    .home-polish #news.news-panel {
        padding: 16px 16px 14px !important;
        border-radius: 12px !important;
        background: #fff;
        border: none !important;
        box-shadow: 0 4px 22px rgba(20, 25, 35, 0.06) !important;
    }

    .home-polish #news .section-head {
        height: auto !important;
        min-height: 40px;
        margin-bottom: 12px;
        padding-bottom: 10px;
        align-items: flex-start;
        border-bottom: 1px solid #eef0f4;
    }

    .home-polish #news .section-head h2 {
        font-size: 18px !important;
        font-weight: 800 !important;
        line-height: 1.25;
        color: #1f2937;
    }

    /* 短红线落在「资讯」两字宽度下，贴近设计稿标题装饰 */
    .home-polish #news .section-head h2::after {
        width: 2.1em;
        max-width: 44px;
        height: 4px;
        bottom: -12px;
        border-radius: 2px;
        background: #ef1218;
    }

    .home-polish #news .section-head a {
        font-size: 12px;
        line-height: 1.6;
        color: #9ca3af !important;
    }

    .home-polish #news .news {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 18px 0 !important;
        border-bottom: 1px solid #edf0f5 !important;
    }

    .home-polish #news .news.last {
        border-bottom: 0 !important;
        padding-bottom: 4px !important;
    }

    .home-polish #news .thumb {
        width: 100% !important;
        max-width: none;
        height: auto !important;
        min-height: 104px !important;
        aspect-ratio: 16 / 9;
        justify-self: stretch !important;
        padding: 14px 16px !important;
        border-radius: 10px !important;
        background-size: cover !important;
        background-position: center !important;
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
        overflow: hidden;
    }

    .home-polish #news .thumb span {
        display: inline-flex;
        max-width: 7em;
        font-size: 13px;
        font-weight: 800;
        line-height: 1.25;
        white-space: normal;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
    }

    .home-polish #news .news > div:last-child {
        min-width: 0;
        display: grid;
        gap: 8px;
    }

    .home-polish #news .news em {
        font-size: 12px !important;
        line-height: 1.35;
        color: #ef1218 !important;
        font-weight: 700;
    }

    .home-polish #news .news h3 {
        margin: 0 !important;
        font-size: 17px !important;
        line-height: 1.45 !important;
        font-weight: 800 !important;
    }

    .home-polish #news .news h3 a {
        display: -webkit-box;
        overflow: hidden;
        color: #202b3c;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .home-polish #news .news p {
        display: -webkit-box;
        overflow: hidden;
        margin: 0 !important;
        color: #667085 !important;
        font-size: 13px !important;
        line-height: 1.65 !important;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .home-polish #news .news b {
        margin-top: 2px !important;
        font-size: 12px !important;
        line-height: 1.4;
        color: #ef1218 !important;
    }
}

@media (max-width: 360px) {
    .home-polish #news.news-panel {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .home-polish #news .thumb {
        width: 100%;
        min-height: 96px !important;
        height: auto !important;
        aspect-ratio: 16 / 9;
    }

    .home-polish #news .news h3 {
        font-size: 16px !important;
    }
}

/* 首页 PC：资讯洞察（左图右文、交替渐变封面、卡片与字体层级） */
@media (min-width: 761px) {
    .home-polish #news.news-panel {
        padding: 20px 22px 16px;
        border: none;
        border-radius: 12px;
        box-shadow: 0 6px 28px rgba(20, 25, 35, 0.07);
    }

    .home-polish #news .section-head {
        height: auto;
        min-height: 44px;
        margin-bottom: 2px;
        padding-bottom: 12px;
        align-items: flex-start;
        border-bottom: 1px solid #eef0f4;
    }

    .home-polish #news .section-head h2 {
        font-size: 20px;
        font-weight: 800;
        color: #1f2937;
        letter-spacing: -0.02em;
    }

    .home-polish #news .section-head h2::after {
        width: 2.1em;
        max-width: 44px;
        height: 4px;
        bottom: -14px;
        border-radius: 2px;
        background: #ef1218;
    }

    .home-polish #news .section-head a {
        color: #9ca3af;
        font-size: 13px;
        margin-top: 2px;
    }

    .home-polish #news .news {
        display: grid;
        grid-template-columns: 216px minmax(0, 1fr);
        gap: 22px;
        align-items: center;
        padding: 20px 0;
        border-bottom: 1px solid #eef0f5;
    }

    .home-polish #news .news.last {
        border-bottom: 0;
        padding-bottom: 6px;
    }

    .home-polish #news .thumb {
        width: 100%;
        height: 102px;
        min-height: 102px;
        border-radius: 10px;
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        overflow: hidden;
        position: relative;
        font-size: 15px;
        font-weight: 800;
        letter-spacing: 0.02em;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
        background-size: cover, cover, cover, cover;
        background-position: center;
    }

    .home-polish #news .thumb span {
        text-align: center;
        line-height: 1.35;
        max-width: none;
    }

    /* 第 1、3、5…条：偏红橙渐变 + 浅色圆形层次 */
    .home-polish #news > article.news:nth-child(even) .thumb,
    .home-polish #news > article.news:nth-child(even) .thumb.policy-thumb,
    .home-polish #news > article.news:nth-child(even) .thumb.selection-thumb {
        background-image:
            radial-gradient(ellipse 130% 100% at 90% 42%, rgba(255, 255, 255, 0.2) 0%, transparent 52%),
            radial-gradient(circle at 74% 86%, rgba(255, 255, 255, 0.12) 0%, transparent 44%),
            radial-gradient(circle at 16% 24%, rgba(255, 255, 255, 0.1) 0%, transparent 36%),
            linear-gradient(128deg, #e62820 0%, #ef4528 38%, #ff7a34 88%);
    }

    /* 第 2、4…条：偏黄橙渐变 */
    .home-polish #news > article.news:nth-child(odd) .thumb,
    .home-polish #news > article.news:nth-child(odd) .thumb.policy-thumb,
    .home-polish #news > article.news:nth-child(odd) .thumb.selection-thumb {
        background-image:
            radial-gradient(ellipse 120% 95% at 86% 38%, rgba(255, 255, 255, 0.24) 0%, transparent 50%),
            radial-gradient(circle at 68% 88%, rgba(255, 200, 120, 0.4) 0%, transparent 46%),
            radial-gradient(circle at 20% 26%, rgba(255, 255, 255, 0.14) 0%, transparent 38%),
            linear-gradient(128deg, #ffb020 0%, #ff9538 45%, #ff6b28 100%);
    }

    .home-polish #news .news > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 8px;
        min-width: 0;
    }

    .home-polish #news .news em {
        font-size: 12px;
        font-weight: 700;
        color: #ef1218;
    }

    .home-polish #news .news h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 800;
        line-height: 1.42;
    }

    .home-polish #news .news h3 a {
        color: #111827;
    }

    .home-polish #news .news h3 a:hover {
        color: #ef1218;
    }

    .home-polish #news .news p {
        margin: 0;
        color: #6b7280;
        font-size: 13px;
        line-height: 1.68;
    }

    .home-polish #news .news b {
        margin-top: 2px;
        font-size: 12px;
        font-weight: 700;
        color: #ef1218;
    }
}

/* 首页移动端会员权益卡片修正：只覆盖 #member，避免内容和按钮挤压。 */
@media (max-width: 760px) {
    .home-polish #member.member {
        height: auto !important;
        min-height: 0 !important;
        margin-top: 14px !important;
        padding: 20px !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        align-items: start !important;
        border-radius: 8px !important;
        background-size: cover !important;
        background-position: center !important;
        overflow: hidden;
    }

    .home-polish #member.member > i {
        width: 50px !important;
        height: 50px !important;
        margin: 0 !important;
        justify-self: start;
    }

    .home-polish #member.member > i::after {
        left: 14px;
        top: 11px;
        width: 22px;
        height: 28px;
    }

    .home-polish #member.member > div {
        min-width: 0;
        display: grid;
        gap: 7px;
    }

    .home-polish #member.member span {
        width: fit-content;
        height: 24px !important;
        padding: 0 8px !important;
        border-radius: 4px !important;
        font-size: 12px !important;
        line-height: 1;
    }

    .home-polish #member.member h2 {
        margin: 0 !important;
        color: #1f2937;
        font-size: 18px !important;
        font-weight: 500;
        line-height: 1.35 !important;
        overflow-wrap: anywhere;
    }

    .home-polish #member.member p {
        margin: 0 !important;
        color: #667085 !important;
        font-size: 13px !important;
        line-height: 1.65 !important;
    }

    .home-polish #member.member > a {
        width: 176px !important;
        max-width: 100%;
        height: 40px !important;
        justify-self: start;
        border-radius: 6px !important;
        font-size: 14px !important;
        line-height: 1;
    }
}

@media (max-width: 360px) {
    .home-polish #member.member {
        padding: 18px !important;
    }

    .home-polish #member.member h2 {
        font-size: 17px !important;
    }

    .home-polish #member.member > a {
        width: 100% !important;
    }
}

/* Header logo responsive compatibility */
@media (min-width: 761px) {
    .home-polish .header-main {
        grid-template-columns: 180px minmax(420px, 1fr) auto !important;
        gap: 20px;
        align-items: center;
    }

    .home-polish .header-main .brand {
        width: 180px;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        overflow: hidden;
    }

    .home-polish .header-main .brand img {
        width: auto !important;
        max-width: 170px;
        height: auto !important;
        max-height: 62px;
        object-fit: contain;
        object-position: left center;
    }
}

@media (max-width: 760px) {
    .home-polish .header-main {
        display: grid !important;
        grid-template-columns: 1fr auto !important;
        gap: 10px;
        align-items: center;
        padding: 10px 0 12px;
    }

    .home-polish .header-main .brand {
        grid-column: 1 / -1;
        width: 100%;
        height: 104px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
    }

    .home-polish .header-main .brand img {
        width: auto !important;
        max-width: min(132px, 44vw);
        height: auto !important;
        max-height: 96px;
        object-fit: contain;
        object-position: center;
    }

    .home-polish .header-main .search {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        order: 2;
    }

    .home-polish .header-actions {
        grid-column: 1 / -1;
        width: 100%;
        order: 3;
        justify-content: space-between;
    }
}

@media (max-width: 390px) {
    .home-polish .header-main .brand {
        height: 92px;
    }

    .home-polish .header-main .brand img {
        max-width: min(118px, 42vw);
        max-height: 86px;
    }
}

/* Article detail mobile spacing and disabled interaction compatibility */
.home-polish .article-content .article-donate,
.home-polish .article-content .entry-meta,
.home-polish #comments {
    display: none !important;
}

@media (max-width: 760px) {
    .home-polish .page {
        margin-top: 10px;
    }

    .home-polish .article-content {
        padding: 12px 14px !important;
        border-radius: 8px !important;
    }

    .home-polish .article-content > .article-tag:first-child {
        margin-bottom: 10px !important;
    }

    .home-polish .article-content > .section-head {
        gap: 6px;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .home-polish .article-content > .section-head h2 {
        font-size: 20px !important;
        line-height: 1.32 !important;
    }

    .home-polish .article-content > .section-head + .article-tag {
        margin-bottom: 12px !important;
        gap: 6px 10px;
    }

    .home-polish .article-content .article-text {
        font-size: 15px;
        line-height: 1.78;
    }

    .home-polish .article-content .article-text p {
        margin-bottom: 12px;
    }

    .home-polish .article-content .social-share {
        margin-top: 8px !important;
        margin-bottom: 8px !important;
    }

    .home-polish .article-content .entry-meta,
    .home-polish .article-content .related-article {
        margin-top: 10px !important;
    }
}

@media (max-width: 390px) {
    .home-polish .article-content {
        padding: 10px 12px !important;
    }
}
