/**
 * Article Pages Styles
 * 文章列表页和内容页专用样式
 */

/* ========== 页面横幅 ========== */
.page-banner {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-top: 0;
}

.page-banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.page-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 95, 90, 0.85) 0%, rgba(26, 95, 90, 0.6) 100%);
}

.page-banner-content {
    position: absolute;
    right: 0;
    bottom: var(--space-xl);
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: white;
}

.page-banner-title {
    font-size: var(--font-size-display);
    font-weight: 500;
    margin-bottom: clamp(8px, 1vw, 16px);
    line-height: 1.3;
}

.page-banner-subtitle {
    font-size: var(--font-size-h4);
    opacity: 0.9;
    line-height: 1.5;
}

/* ========== 文章列表页 ========== */
.content-page-banner {
    margin-top: 100px;
}

.content-page-banner-inner1 {
    aspect-ratio:9/1 ;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}
.content-page-banner-inner1 img,.content-page-banner-inner2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.content-page-banner-inner2 {
    aspect-ratio:2/1 ;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    display: none;
}
.article-list-section {
    padding: var(--space-xl) 0;
    background: var(--bg-white);
}

/* 筛选区域 */
.article-filter {
    display: grid;
    grid-template-columns:clamp(200px, 21.5vw, 300px) 2fr;
    gap: 0 var(--space-sm);
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-color);
}
.filter-search {
    display: flex;
    align-items: center;
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0 4px 0 var(--space-2xs);
    transition: var(--transition);
    max-height:48px;
    margin: var(--space-md) 0;
}

.filter-search:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 90, 0.1);
}

.filter-search-input {
    flex: 1;
    padding: clamp(8px, 0.8vw, 12px) 0;
    border: none;
    background: transparent;
    font-size: var(--font-size-body);
    outline: none;
    color: var(--text-dark);
}

.filter-search-input::placeholder {
    color: var(--text-muted);
}

.filter-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    transition: var(--transition);
}

.filter-search-btn:hover {
    color: var(--primary-color);
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 1vw, 12px);
    grid-column: 1 / -1;
    justify-content: flex-end;
    height: fit-content;
}

.filter-tag {
    padding: var(--space-3xs) var(--space-xs);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    background: transparent;
    color: var(--text-light);
    font-size: var(--font-size-body);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tag.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 文章列表 */
.article-list {
    display: flex;
    flex-direction: column;
}

.article-item {
    border-bottom: 1px solid var(--border-color);
}

.article-item:last-child {
    border-bottom: none;
}



/* Article list cards use a 1/3 media column and 2/3 content column on desktop. */
.article-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    transition: var(--transition);
}

.article-link:hover {
    opacity: 0.8;
}

.article-list .article-date {
    position: absolute;
    top: 0;
    left:clamp(20px, 5cqw, 120px);
    z-index: 1;
    width: clamp(80px, 20cqw, 120px);
    text-align: center;
    background: var(--primary-color);
    color: white;
    border-radius: 0 0 clamp(4px, 0.4vw, 6px) clamp(4px, 0.4vw, 6px);
    padding: clamp(8px, 3cqw, 16px) clamp(4px, 0.4vw, 8px);
}

.article-list .article-date-day {
    display: block;
    font-size: clamp(24px, 6.8cqw, 42px);
    font-weight: 500;
    line-height: 1;
}

.article-list .article-date-month {
    display: block;
    font-size: var(--font-size-caption);
    opacity: 0.9;
}

.article-list .article-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: clamp(6px, 0.6vw, 10px);
    overflow: hidden;
    container-type: inline-size;
}

.article-list .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-transform);
}

.article-link:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    min-width: 0;
}

.article-list .article-title {
    font-size: var(--font-size-h3);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: clamp(8px, 0.8vw, 12px);
    line-height: 1.4;
}

.article-list .article-desc {
    font-size: var(--font-size-body);
    color: var(--text-light);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-list .article-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.article-list .article-keyword {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-size: var(--font-size-body);
    line-height: 1;
    color: var(--text-light);
    background: var(--bg-white);
}

/* 分页 */
.article-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(4px, 0.4vw, 8px);
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: clamp(36px, 3.6vw, 44px);
    height: clamp(36px, 3.6vw, 44px);
    padding: 0 clamp(8px, 0.8vw, 12px);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-dark);
    font-size: var(--font-size-body);
    cursor: pointer;
    transition: var(--transition);
}

.pagination-btn:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.pagination-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination-btn.next {
    width: clamp(36px, 3.6vw, 44px);
}

/* ========== 文章内容页 ========== */
.article-detail-section {
    padding: var(--space-xl) 0;
    background: var(--bg-white);
    margin-top: 0;
}

/* Detail pages align a share rail, reading column, and related-content sidebar. */
.article-detail-layout {
    display: grid;
    grid-template-columns: 70px 1fr 300px;
    gap: var(--space-xl);
    align-items: start;
    padding-bottom: var(--space-md);
}

/* 左侧分享栏 */
.article-share-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(56px, 5.6vw, 70px);
    height: clamp(56px, 5.6vw, 70px);
    border-style: solid;
    border-color: var(--border-color);
    border-width: 1px 1px 0px 1px;
    border-radius: 0;
    color: var(--text-light);
    transition: var(--transition);
}

.share-btn:first-child {
    border-top-left-radius: var(--radius-sm);
    border-top-right-radius: var(--radius-sm);
}

.share-btn:last-child {
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    border-bottom-width: 1px;
}

.share-btn img {
    width: 60%;
    height: auto;
    transition: var(--transition);
}

.share-btn:hover {
    color: var(--primary-color);
    background: rgba(26, 95, 90, 0.05);
}

.share-btn:hover img {
    filter: brightness(0) saturate(100%) invert(26%) sepia(32%) saturate(1194%) hue-rotate(126deg) brightness(92%) contrast(88%);
}



/* 文章主内容 */
.article-detail-main {
    max-width: 100%;
}

.article-header {
    margin-bottom: var(--space-md);
}

.article-header .article-date {
    display: inline-block;
    width: auto;
    background: transparent;
    color: var(--text-muted);
    font-size: var(--font-size-h4);
    padding: 0;
    margin-bottom: var(--space-2xs);
}

.article-detail-main .article-title {
    font-size: var(--font-size-display);
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-dark);
    margin-bottom: var(--space-md);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(8px, 0.8vw, 12px);
}

.article-tag {
    padding: clamp(4px, 0.4vw, 6px) var(--space-xs);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    font-size: var(--font-size-h4);
    color: var(--text-light);
}

.article-divider {
    border: none;
    height: 1px;
    background: var(--border-color);
    margin-bottom: var(--space-md);
}

.article-body {
    font-size: var(--font-size-h4);
    line-height: 1.9;
    color: var(--text-dark);
}

.article-body p {
    margin-bottom: var(--space-md);
    text-indent: 2em;
}

.article-body p:first-child {
    margin-top: 0;
}

.article-body p:last-child {
    margin-bottom: 0;
}

.article-lead {
    font-weight: 400;
}

.article-figure {
    margin: var(--space-md) 0;
    border-radius: clamp(8px, 0.8vw, 12px);
    overflow: hidden;
}

.article-figure img {
    width: 100%;
    height: auto;
    display: block;
}

/* 右侧相关新闻 */
.article-related-sidebar {
    position: sticky;
    top: 100px;
}

.related-title {
    font-size: var(--font-size-h3);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.related-item {
    display: block;
    transition: var(--transition);
}

.related-item:hover {
    opacity: 0.8;
}

.related-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: clamp(6px, 0.6vw, 8px);
    overflow: hidden;
    margin-bottom: clamp(8px, 0.6vw, 10px);
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-transform);
}

.related-item:hover .related-image img {
    transform: scale(1.05);
}

.related-article-title {
    font-size: var(--font-size-h4);
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-date {
    font-size: var(--font-size-caption);
    color: var(--text-muted);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .article-filter {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        gap: 0 var(--space-md);
        align-items: start;
    }

    .filter-search {
        grid-column: 1;
        grid-row: 1;
        width: 100%;
        margin: 0;
    }

    .filter-tags {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
    }

    .article-list {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .article-detail-layout {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .article-share-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .article-related-sidebar {
        position: static;
        padding-top: var(--space-md);
        border-top: 1px solid var(--border-color);
    }

    .related-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    .content-page-banner-inner1 {
        display: none;
    }
    .content-page-banner-inner2 {
        display: block;
    }
    .article-filter {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .filter-search {
        grid-column: 1;
        grid-row: 2;
        max-width: 100%;
        margin: var(--space-xs) 0 0;
    }

    .filter-tags {
        grid-column: 1;
        grid-row: 1;
        justify-content: flex-start;
    }

    .article-list {
        grid-column: 1;
        grid-row: 3;
    }

    .article-link {
        grid-template-columns: 1fr;
        gap: var(--space-xs);
    }

    .related-list {
        grid-template-columns: 1fr;
    }
    
}

@media (max-width: 480px) {

    .page-banner-content {
        padding: 0 var(--space-xs);
    }

    .filter-tag {
        padding: 6px 12px;
        font-size: 14px;
    }

    .article-tags {
        gap: 6px;
    }

    .article-tag {
        padding: 4px 10px;
        font-size: 11px;
    }

    .share-btn {
        width: 40px;
        height: 40px;
    }
}
