/* ==============================
   News Detail Page Sticky Fix
   Future Power Color
================================= */

.news-detail-page {
    padding: 35px 0 55px;
    overflow: visible !important;
}

/* 重点：这里不能用 align-items:flex-start */
.news-detail-layout {
    display: flex;
    align-items: stretch;
    gap: 30px;
    overflow: visible !important;
}

/* ==============================
   Left Main
================================= */

.news-detail-main {
    flex: 1;
    min-width: 0;
}

.news-detail-article {
    padding: 32px;
    background: linear-gradient(135deg, rgba(55,179,74,.08), rgba(16,155,215,.08));
    border: 1px solid #e7f2ee;
    border-radius: 24px;
    box-shadow: 0 12px 34px rgba(16,36,58,.06);
}

/* 面包屑 */
.news-detail-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 18px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

.news-detail-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: all .3s ease;
}

.news-detail-breadcrumb a:hover {
    color: #168a3a;
}

.news-detail-breadcrumb i {
    color: #109bd7;
}

/* 标题 */
.news-detail-article h1 {
    margin: 0 0 16px;
    color: #14284b;
    font-size: 36px;
    line-height: 1.35;
    font-weight: 800;
}

/* 时间 / 浏览 / 分类 */
.news-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.news-detail-meta span {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.4;
}

.news-detail-meta i {
    margin-right: 5px;
    color: #37b34a;
}

/* 封面图 */
.news-detail-cover {
    margin-bottom: 28px;
    border-radius: 20px;
    overflow: hidden;
    background: #f7fbf8;
    border: 1px solid #e7f2ee;
    position: relative;
}

.news-detail-cover::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #37b34a 0%, #109bd7 72%, #f6bd16 100%);
}

.news-detail-cover img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==============================
   WordPress Content Style
   后台编辑器内容通用样式
================================= */

.news-detail-content {
    color: #374151;
    font-size: 16px;
    line-height: 1.85;
}

.news-detail-content h2,
.news-detail-content h3,
.news-detail-content h4,
.news-detail-content h5,
.news-detail-content h6 {
    margin: 30px 0 16px;
    color: #14284b;
    line-height: 1.35;
    font-weight: 800;
}

.news-detail-content h2 {
    font-size: 28px;
}

.news-detail-content h3 {
    font-size: 23px;
}

.news-detail-content h4 {
    font-size: 20px;
}

.news-detail-content h5 {
    font-size: 18px;
}

.news-detail-content h6 {
    font-size: 16px;
}

.news-detail-content p {
    margin: 0 0 18px;
}

.news-detail-content a {
    color: #168a3a;
    text-decoration: underline;
}

.news-detail-content a:hover {
    color: #109bd7;
}

.news-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 12px 0;
}

.news-detail-content ul,
.news-detail-content ol {
    margin: 0 0 20px 22px;
    padding: 0;
}

.news-detail-content li {
    margin-bottom: 8px;
}

.news-detail-content blockquote {
    margin: 24px 0;
    padding: 22px 26px;
    background: #fff;
    border-left: 4px solid #37b34a;
    border-radius: 14px;
    color: #14284b;
    font-size: 18px;
    line-height: 1.65;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(16,36,58,.06);
}

.news-detail-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background: #fff;
    border: 1px solid #e7f2ee;
    border-radius: 14px;
    overflow: hidden;
}

.news-detail-content table th,
.news-detail-content table td {
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    color: #374151;
    font-size: 15px;
    line-height: 1.5;
    text-align: left;
}

.news-detail-content table th {
    background: linear-gradient(135deg, #37b34a 0%, #109bd7 82%);
    color: #fff;
    font-weight: 700;
}

.news-detail-content pre {
    margin: 22px 0;
    padding: 18px;
    background: #10243a;
    color: #fff;
    border-radius: 14px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.news-detail-content code {
    padding: 2px 6px;
    background: #f7fbf8;
    border-radius: 5px;
    color: #168a3a;
    font-size: 14px;
}

.news-detail-content pre code {
    padding: 0;
    background: none;
    color: inherit;
}

/* ==============================
   Tags
================================= */

.news-detail-tags {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #dfe8ee;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.news-detail-tags span {
    color: #14284b;
    font-size: 15px;
    font-weight: 700;
}

.news-detail-tags span i {
    margin-right: 5px;
    color: #37b34a;
}

.news-detail-tags a {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    background: #fff;
    border: 1px solid rgba(55,179,74,.18);
    border-radius: 20px;
    color: #14284b;
    font-size: 14px;
    text-decoration: none;
    transition: all .3s ease;
}

.news-detail-tags a:hover {
    background: linear-gradient(135deg, #37b34a 0%, #109bd7 82%);
    border-color: transparent;
    color: #fff;
}

/* ==============================
   Previous / Next
================================= */

.news-prev-next {
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.news-prev-next a {
    min-height: 86px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e7f2ee;
    border-radius: 16px;
    color: #14284b;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all .3s ease;
}

.news-prev-next a:last-child {
    text-align: right;
    justify-content: flex-end;
}

.news-prev-next a span {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 4px;
}

.news-prev-next a b {
    display: block;
    color: #14284b;
    font-size: 15px;
    line-height: 1.45;
    font-weight: 700;
}

.news-prev-next a i {
    color: #37b34a;
    font-size: 22px;
}

.news-prev-next a:hover {
    background: linear-gradient(135deg, #37b34a 0%, #109bd7 82%);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(55,179,74,.22);
}

.news-prev-next a:hover span,
.news-prev-next a:hover b,
.news-prev-next a:hover i {
    color: #fff;
}

/* ==============================
   Right Sidebar Sticky
================================= */

/* 右侧必须撑满父级高度 */
.news-detail-side {
    flex: 0 0 330px;
    position: relative;
    align-self: stretch;
    overflow: visible !important;
}

/* 右侧跟随 */
.news-detail-side-sticky {
    position: sticky;
    top: 110px;
    z-index: 9;
}

.news-side-box {
    margin-bottom: 18px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e7f2ee;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(16,36,58,.05);
}

.news-side-title {
    margin-bottom: 18px;
}

.news-side-title h3 {
    margin: 0;
    color: #14284b;
    font-size: 21px;
    line-height: 1.35;
    font-weight: 800;
}

.news-side-title h3 i {
    margin-right: 8px;
    color: #37b34a;
}

/* 右侧分类 */
.news-side-category {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-side-category a {
    min-height: 46px;
    padding: 0 16px;
    background: #f7fbf8;
    border: 1px solid #e7f2ee;
    border-radius: 12px;
    color: #14284b;
    font-size: 15px;
    line-height: 1.4;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: all .3s ease;
}

.news-side-category a span {
    flex: 1;
}

.news-side-category a i {
    color: #109bd7;
    transition: all .3s ease;
}

.news-side-category a:hover,
.news-side-category a.active {
    background: linear-gradient(135deg, #37b34a 0%, #109bd7 82%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px rgba(55,179,74,.18);
}

.news-side-category a:hover i,
.news-side-category a.active i {
    color: #fff;
}

/* 右侧热门文章 */
.news-side-hot {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-side-hot a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #f7fbf8;
    border: 1px solid #e7f2ee;
    border-radius: 14px;
    text-decoration: none;
    transition: all .3s ease;
}

.news-side-hot a b {
    flex: 0 0 34px;
    color: #37b34a;
    font-size: 22px;
    line-height: 1;
    font-weight: 800;
}

.news-side-hot a span {
    flex: 1;
    color: #14284b;
    font-size: 14px;
    line-height: 1.5;
    font-weight: 700;
}

.news-side-hot a:hover {
    background: linear-gradient(135deg, #37b34a 0%, #109bd7 82%);
    border-color: transparent;
    transform: translateX(4px);
    box-shadow: 0 10px 24px rgba(55,179,74,.18);
}

.news-side-hot a:hover b,
.news-side-hot a:hover span {
    color: #fff;
}

/* ==============================
   Related Articles
================================= */

.news-related-box {
    margin-top: 30px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(55,179,74,.08), rgba(16,155,215,.08));
    border: 1px solid #e7f2ee;
    border-radius: 24px;
}

.news-related-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.news-related-title h2 {
    margin: 0;
    color: #14284b;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 800;
}

.news-related-title h2 i {
    margin-right: 8px;
    color: #37b34a;
}

.news-related-title a {
    color: #14284b;
    font-size: 14px;
    text-decoration: none;
    transition: all .3s ease;
    font-weight: 700;
}

.news-related-title a:hover {
    color: #168a3a;
}

.news-related-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.news-related-item {
    display: block;
    background: #fff;
    border: 1px solid #e7f2ee;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    transition: all .3s ease;
}

.news-related-item:hover {
    transform: translateY(-5px);
    border-color: rgba(16,155,215,.34);
    box-shadow: 0 12px 32px rgba(16,155,215,.14);
}

.news-related-img {
    height: 175px;
    overflow: hidden;
    background: #f7fbf8;
    position: relative;
}

.news-related-img::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #37b34a 0%, #109bd7 72%, #f6bd16 100%);
}

.news-related-img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all .4s ease;
}

.news-related-item:hover .news-related-img img {
    transform: scale(1.06);
}

.news-related-info {
    padding: 18px;
}

.news-related-info h3 {
    margin: 0 0 12px;
    color: #14284b;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 800;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-related-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.news-related-meta span {
    color: #6b7280;
    font-size: 13px;
    line-height: 1.4;
}

.news-related-meta i {
    margin-right: 5px;
    color: #37b34a;
}

/* ==============================
   Tablet
================================= */

@media (max-width: 992px) {
    .news-detail-layout {
        display: block;
    }

    .news-detail-side {
        width: 100%;
        margin-top: 24px;
        flex: none;
    }

    .news-detail-side-sticky {
        position: static;
        top: auto;
    }

    .news-side-box {
        margin-bottom: 18px;
    }

    .news-related-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==============================
   Mobile
================================= */

@media (max-width: 768px) {
    .news-detail-page {
        padding: 28px 0 42px;
    }

    .news-detail-article {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .news-detail-breadcrumb {
        margin-bottom: 14px;
        font-size: 13px;
        gap: 7px;
    }

    .news-detail-article h1 {
        margin-bottom: 14px;
        font-size: 26px;
        line-height: 1.35;
    }

    .news-detail-meta {
        gap: 10px;
        margin-bottom: 18px;
    }

    .news-detail-meta span {
        font-size: 12px;
    }

    .news-detail-cover {
        margin-bottom: 22px;
        border-radius: 16px;
    }

    .news-detail-content {
        font-size: 15px;
        line-height: 1.75;
    }

    .news-detail-content h2,
    .news-detail-content h3,
    .news-detail-content h4,
    .news-detail-content h5,
    .news-detail-content h6 {
        margin: 24px 0 14px;
    }

    .news-detail-content h2 {
        font-size: 23px;
    }

    .news-detail-content h3 {
        font-size: 20px;
    }

    .news-detail-content h4 {
        font-size: 18px;
    }

    .news-detail-content p {
        margin-bottom: 16px;
    }

    .news-detail-content blockquote {
        padding: 18px;
        font-size: 16px;
        border-radius: 12px;
    }

    .news-detail-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 12px;
    }

    .news-detail-content table th,
    .news-detail-content table td {
        padding: 12px 14px;
        font-size: 14px;
    }

    .news-detail-tags {
        margin-top: 24px;
        padding-top: 18px;
    }

    .news-prev-next {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .news-prev-next a {
        min-height: auto;
        padding: 16px;
        border-radius: 14px;
    }

    .news-prev-next a:last-child {
        text-align: left;
        justify-content: flex-start;
    }

    .news-side-box {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .news-side-title h3 {
        font-size: 20px;
    }

    .news-side-category a {
        min-height: 44px;
        padding: 0 14px;
        font-size: 14px;
    }

    .news-related-box {
        margin-top: 24px;
        padding: 22px 16px;
        border-radius: 20px;
    }

    .news-related-title {
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 16px;
    }

    .news-related-title h2 {
        font-size: 22px;
    }

    .news-related-list {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .news-related-img {
        height: 185px;
    }

    .news-related-info {
        padding: 16px;
    }

    .news-related-info h3 {
        font-size: 17px;
    }
}


/* ==============================
   News Detail Content List Fix
   解决全局 ul/li 去掉圆点的问题
================================= */

.news-detail-content ul {
    margin: 0 0 20px 22px;
    padding-left: 20px;
    list-style: disc !important;
}

.news-detail-content ol {
    margin: 0 0 20px 22px;
    padding-left: 20px;
    list-style: decimal !important;
}

.news-detail-content ul li {
    margin-bottom: 8px;
    color: #374151;
    list-style: disc !important;
    display: list-item !important;
}

.news-detail-content ol li {
    margin-bottom: 8px;
    color: #374151;
    list-style: decimal !important;
    display: list-item !important;
}

.news-detail-content ul li::marker,
.news-detail-content ol li::marker {
    color: #37b34a;
}

/* 嵌套列表 */
.news-detail-content ul ul {
    margin-top: 8px;
    margin-bottom: 8px;
    list-style: circle !important;
}

.news-detail-content ul ul li {
    list-style: circle !important;
}

.news-detail-content ol ol {
    margin-top: 8px;
    margin-bottom: 8px;
    list-style: lower-alpha !important;
}

.news-detail-content ol ol li {
    list-style: lower-alpha !important;
}