/* Banner styles */
#consulting-hero {
    position: relative;
    height: 420px;
    background-size: cover;
    background-position: center;
}

#consulting-hero .hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Sidebar styles */
.sidebar .sidebar-widget {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0.25rem;
}

.sidebar .widget-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.sidebar ul a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.sidebar ul a:hover {
    color: #146fc8;
}

.sidebar .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.sidebar .tag-item {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 50px; /* Pill-shaped tags */
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.sidebar .tag-item:hover {
    background-color: #146fc8;
    color: #fff;
    transform: translateY(-2px);
}


.consulting-section .section-header {
    border-bottom: none; /* Remove the old border */
    padding-bottom: 0;
}

.consulting-section .section-tabs {
    width: 100%;
    border-bottom: 2px solid #eee;
}

.consulting-section .section-tabs .tab-link {
    padding: 0.5rem 0.25rem;
    margin-right: 1.5rem;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    color: #6c757d;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.consulting-section .section-tabs .tab-link:hover {
    color: #333;
}

.consulting-section .section-tabs .tab-link.active {
    color: #146fc8;
    border-bottom-color: #146fc8;
}

.article-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.25rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.article-item:last-child {
    margin-bottom: 0;
}

.article-item:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.075);
    transform: translateY(-3px);
}

.article-img {
    max-width: 200px;
}

.article-img img {
    border-radius: 0.25rem;
}

.article-title a {
    color: #212529;
    text-decoration: none;
    font-weight: bold;
    transition: color .2s ease-in-out;
}

.article-item .btn-link {
    color: #6c757d;
    text-decoration: none !important;
}

.article-item .btn-link:hover {
    color: #212529;
}

.article-item:hover .article-title a {
    color: #146fc8;
}

.article-meta {
    line-height: 1.6;
}

.pagination .page-item.active .page-link {
    background-color: #146fc8;
    border-color: #146fc8;
}

.pagination .page-link {
    color: #146fc8;
}

.pagination .page-link:hover {
    color: #0f5ba3;
}

/* 手机端分类导航优化 */
@media (max-width: 768px) {
    /* 头图优化 */
    #consulting-hero {
        height: 300px;
    }
    .consulting-section .section-tabs {
        display: flex;
        justify-content: space-between;
        align-items: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid #eee;
        padding: 10px 0;
        margin-bottom: 20px;
        gap: 5px;
    }

    .consulting-section .section-tabs::-webkit-scrollbar {
        display: none;
    }

    .consulting-section .section-tabs .tab-link {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        margin: 0;
        text-align: center;
        background-color: #f8f9fa;
        border: 1px solid #e9ecef;
        border-radius: 20px;
        color: #666;
        font-size: 13px;
        font-weight: 500;
        white-space: nowrap;
        transition: all 0.3s ease;
        border-bottom: none;
    }

    .consulting-section .section-tabs .tab-link:hover {
        background-color: #e9ecef;
        color: #146fc8;
        border-color: #146fc8;
    }

    .consulting-section .section-tabs .tab-link.active {
        background-color: #146fc8;
        color: white;
        border-color: #146fc8;
        border-bottom: none;
    }

    /* 文章列表手机端优化 */
    .article-item {
        flex-direction: column;
        padding: 15px;
        margin-bottom: 15px;
    }

    .article-img {
        max-width: 100%;
        margin-bottom: 15px;
        margin-right: 0 !important;
    }

    .article-img img {
        width: 100%;
        height: 200px;
        object-fit: cover;
    }

    .article-title {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .article-meta {
        font-size: 14px;
        margin-bottom: 10px;
    }

    /* 侧边栏手机端优化 */
    .sidebar {
        margin-top: 30px;
    }

    .sidebar .sidebar-widget {
        padding: 15px;
        margin-bottom: 20px;
    }

    .sidebar .widget-title {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .sidebar .tag-item {
        font-size: 12px;
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    /* 超小屏优化 */
    #consulting-hero {
        height: 250px;
    }
    .consulting-section .section-tabs .tab-link {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 70px;
    }

    .article-item {
        padding: 12px;
    }

    .article-title {
        font-size: 15px;
    }

    .article-meta {
        font-size: 13px;
    }
}