/* ========== Articles Page ========== */

/* ========== Page Banner ========== */
.articles-banner {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2d1040 0%, #4a1942 40%, #6d295a 70%, #f96c9f 100%);
    overflow: hidden;
}
.articles-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(249,108,159,0.25) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 40%);
    pointer-events: none;
}
.articles-banner::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249,108,159,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.articles-banner .banner-content {
    position: relative;
    text-align: center;
    color: #fff;
    z-index: 1;
    padding: 0 20px;
}
.articles-banner .banner-content h2 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.25);
    letter-spacing: 1px;
}
.articles-banner .banner-content p {
    font-size: 15px;
    opacity: 0.85;
    line-height: 1.8;
    margin-bottom: 20px;
}
.articles-banner .breadcrumb {
    font-size: 13px;
    opacity: 0.8;
}
.articles-banner .breadcrumb a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color .2s;
}
.articles-banner .breadcrumb a:hover {
    color: #ffb6d9;
}
.articles-banner .breadcrumb span {
    margin: 0 6px;
    opacity: 0.6;
}

/* ========== Articles Section ========== */
.articles-section {
    padding: 60px 0 80px;
    background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
}
.articles-wrapper {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

/* ========== Article Categories ========== */
.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    transition: all .35s cubic-bezier(.4,0,.2,1);
}
.category-tag:hover {
    color: #f96c9f;
    background: linear-gradient(135deg, #fef7fa, #fef0f5);
    border-color: rgba(249,108,159,0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,108,159,0.1);
}
.category-tag.active {
    color: #fff;
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 4px 16px rgba(249,108,159,0.4);
    transform: translateY(-1px);
}

/* ========== Article Search ========== */
.article-search {
    margin-bottom: 24px;
}
.article-search form {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 50px;
    overflow: hidden;
    border: 1.5px solid #e8e8e8;
    transition: border-color .3s, box-shadow .3s;
}
.article-search form:focus-within {
    border-color: #f96c9f;
    box-shadow: 0 4px 16px rgba(249,108,159,0.15);
}
.article-search .search-input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #333;
    background: transparent;
}
.article-search .search-input::placeholder {
    color: #aaa;
}
.article-search .search-btn {
    padding: 12px 20px;
    border: none;
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    color: #fff;
    cursor: pointer;
    transition: opacity .2s;
    font-size: 14px;
}
.article-search .search-btn:hover {
    opacity: 0.9;
}

/* ========== Article List ========== */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ========== Article Card ========== */
.article-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(249,108,159,0.06);
    transition: transform .35s cubic-bezier(.4,0,.2,1), box-shadow .35s;
}
.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(249,108,159,0.12);
}
.article-image {
    position: relative;
    height: 100%;
    min-height: 220px;
    overflow: hidden;
}
.article-image a {
    display: block;
    width: 100%;
    height: 100%;
}
.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.article-card:hover .article-image img {
    transform: scale(1.06);
}
.article-category {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 14px;
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    color: #fff;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(249,108,159,0.3);
    z-index: 1;
}
.article-content {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.article-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
}
.article-content h3 a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}
.article-content h3 a:hover {
    color: #f96c9f;
}
.article-excerpt {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 16px;
}
.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.article-meta i {
    font-size: 12px;
    color: #f96c9f;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    color: #fff;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .3s, box-shadow .3s;
    align-self: flex-start;
}
.read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(249,108,159,0.35);
    color: #fff;
}
.read-more i {
    font-size: 11px;
    transition: transform .2s;
}
.read-more:hover i {
    transform: translateX(3px);
}

/* ========== No Articles ========== */
.no-articles {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.no-articles i {
    font-size: 48px;
    color: #e0e0e0;
    margin-bottom: 16px;
}
.no-articles p {
    font-size: 16px;
    color: #999;
    margin-bottom: 12px;
}
.no-articles .keyword-hint {
    font-size: 14px;
    color: #666;
}
.no-articles .keyword-hint strong {
    color: #f96c9f;
}
.no-articles .clear-search {
    color: #f96c9f;
    text-decoration: none;
    font-weight: 500;
    margin-left: 8px;
    transition: color .2s;
}
.no-articles .clear-search:hover {
    color: #d9658d;
}

/* ========== Pagination ========== */
/* ========== Pagination（兼容 ThinkPHP 分页）========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 40px;
    padding: 20px 0;
    flex-wrap: wrap;
}
/* ThinkPHP 默认分页：ul > li > a/span */
.pagination ul,
.pagination ol {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.pagination li {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border-radius: 50px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    border: 1.5px solid #e5e5e5;
    transition: all .25s ease;
    cursor: pointer;
}
.pagination li a:hover {
    color: #f96c9f;
    border-color: rgba(249,108,159,0.35);
    background: linear-gradient(135deg, #fef7fa, #fef0f5);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(249,108,159,0.15);
}
.pagination li.active span,
.pagination li .active {
    color: #fff !important;
    background: linear-gradient(135deg, #f96c9f, #d9658d) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 14px rgba(249,108,159,0.35);
    cursor: default;
}
.pagination li.disabled a,
.pagination li.disabled span,
.pagination li .disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #fafafa;
    border-color: #eee;
    transform: none;
}
/* 省略号 */
.pagination li.disabled span {
    border: none;
    background: transparent;
    opacity: 0.6;
}

/* 兼容旧 .page-item 选择器 */
.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 14px;
    border-radius: 50px;
    text-decoration: none;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    transition: all .3s;
    cursor: pointer;
}
.page-item:hover:not(.disabled):not(.active) {
    color: #f96c9f;
    border-color: rgba(249,108,159,0.3);
    background: linear-gradient(135deg, #fef7fa, #fef0f5);
    transform: translateY(-1px);
}
.page-item.active {
    color: #fff;
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    border-color: rgba(255,255,255,0.2);
    box-shadow: 0 4px 16px rgba(249,108,159,0.4);
}
.page-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ========== Sidebar ========== */
.articles-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 80px;
}

/* ========== Sidebar Card ========== */
.sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid rgba(249,108,159,0.06);
    transition: transform .3s, box-shadow .3s;
}
.sidebar-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(249,108,159,0.1);
}
.sidebar-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #fef0f5;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-card h3 i {
    color: #f96c9f;
    font-size: 15px;
}

/* ========== Sidebar Search ========== */
.sidebar-search-form .search-box {
    display: flex;
    gap: 0;
    background: #fafafa;
    border-radius: 50px;
    overflow: hidden;
    border: 1.5px solid #e8e8e8;
    transition: border-color .3s, box-shadow .3s;
}
.sidebar-search-form .search-box:focus-within {
    border-color: #f96c9f;
    box-shadow: 0 4px 16px rgba(249,108,159,0.15);
}
.sidebar-search-form .search-box input {
    flex: 1;
    padding: 10px 16px;
    border: none;
    outline: none;
    font-size: 13px;
    color: #333;
    background: transparent;
}
.sidebar-search-form .search-box button {
    padding: 10px 16px;
    border: none;
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    color: #fff;
    cursor: pointer;
    transition: opacity .2s;
    font-size: 13px;
}
.sidebar-search-form .search-box button:hover {
    opacity: 0.9;
}

/* ========== Hot Articles ========== */
.hot-articles {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.hot-articles li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    transition: background .2s;
}
.hot-articles li:hover {
    background: linear-gradient(135deg, #fef7fa, #fef0f5);
}
.rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #999;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.rank-top {
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    color: #fff;
    box-shadow: 0 2px 8px rgba(249,108,159,0.3);
}
.hot-articles li a {
    font-size: 14px;
    color: #555;
    text-decoration: none;
    line-height: 1.5;
    transition: color .2s;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.hot-articles li:hover a {
    color: #f96c9f;
}

/* ========== Category List ========== */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.category-list li {
    display: flex;
    align-items: center;
}
.category-list li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: all .2s;
    flex: 1;
}
.category-list li a:hover,
.category-list li a.active {
    background: linear-gradient(135deg, #fef7fa, #fef0f5);
    color: #f96c9f;
}
.category-list li a i {
    font-size: 12px;
    color: #f96c9f;
    opacity: 0.7;
}
.category-list li a .count {
    margin-left: auto;
    font-size: 12px;
    color: #aaa;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 50px;
}

/* ========== Recommended Counselors ========== */
.recommended-counselors {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.counselor-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef7fa, #fff);
    border: 1px solid rgba(249,108,159,0.08);
    transition: transform .2s, box-shadow .2s;
}
.counselor-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(249,108,159,0.1);
}
.counselor-mini img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(249,108,159,0.2);
}
.counselor-info {
    flex: 1;
}
.counselor-info h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 2px;
}
.counselor-info p {
    font-size: 12px;
    color: #999;
}
.counselor-mini .btn-sm {
    padding: 6px 14px;
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    color: #fff;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
    white-space: nowrap;
}
.counselor-mini .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,108,159,0.3);
    color: #fff;
}

/* ========== Tag Cloud ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.tag-cloud .tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: linear-gradient(135deg, #fef7fa, #fef0f5);
    color: #d9658d;
    border-radius: 50px;
    font-size: 12px;
    text-decoration: none;
    transition: background .2s, transform .2s, color .2s;
}
.tag-cloud .tag:hover {
    background: linear-gradient(135deg, #f96c9f, #d9658d);
    color: #fff;
    transform: translateY(-1px);
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
    .articles-wrapper {
        grid-template-columns: 1fr 320px;
        gap: 30px;
    }
}
@media (max-width: 992px) {
    .articles-wrapper {
        grid-template-columns: 1fr;
    }
    .articles-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .article-card {
        grid-template-columns: 240px 1fr;
    }
}
@media (max-width: 768px) {
    .articles-banner {
        min-height: 240px;
    }
    .articles-banner .banner-content h2 {
        font-size: 28px;
    }
    .article-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .article-categories::-webkit-scrollbar {
        display: none;
    }
    .article-card {
        grid-template-columns: 1fr;
    }
    .article-image {
        min-height: 180px;
    }
    .articles-sidebar {
        grid-template-columns: 1fr;
    }
    .pagination {
        gap: 6px;
    }
    .page-item {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
}
@media (max-width: 480px) {
    .articles-section {
        padding: 40px 0 60px;
    }
    .articles-wrapper {
        gap: 24px;
    }
    .article-content {
        padding: 16px 20px;
    }
    .article-content h3 {
        font-size: 17px;
    }
    .article-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    .sidebar-card {
        padding: 20px 16px;
    }
}
