/**
 * Case Study Listing Page - Flat Style
 * Professional Naming Convention (BEM)
 */

.cs-index-container {
    background-color: #f7f7f7;
    overflow-x: clip;
    width: 100%;
}

/* Header Section */
.cs-header {
    padding: 4rem 0;
}

@media (max-width: 768px) {
    .cs-header {
        padding: 4rem 0 2rem;
    }
}

.cs-header__badge {
    margin-bottom: 1rem;
}

.cs-header__badge-text {
    display: inline-block;
    padding: 8px 20px;
    background-color: #f8f9fa;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: 50rem;
    font-size: 14px;
}

.cs-header__title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a1a1b;
}

.cs-header__desc {
    font-size: 1.1rem;
    color: #5f5f5f;
    line-height: 1.6;
}

.cs-header__image img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
}

/* Main Content Area */
.cs-main-content {
    padding: 1rem 0;
}

.cs-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1a1a1b;
}

/* Custom Slider Navigation */
.cs-nav-btn {
    width: 36px;
    height: 36px;
    background-color: #fff;
    border: 1px solid #eeeeee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1a1a1b;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
}

.cs-nav-btn:hover {
    background-color: #1a1a1b;
    color: #fff;
    border-color: #1a1a1b;
}

/* Slider Container */
.cs-cat-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: 10px;
}

.cs-cat-slider::-webkit-scrollbar {
    display: none;
}

.cs-cat-slide {
    flex: 0 0 80%;
    scroll-snap-align: start;
    border-radius: 12px;
}

@media (min-width: 768px) {
    .cs-cat-slide {
        flex: 0 0 45%;
    }
}

@media (min-width: 1024px) {
    .cs-cat-slide {
        flex: 0 0 calc(33.333% - 0.7rem);
    }
}

/* Category Card */
.cs-cat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.1s;
    height: 100%;
}

.cs-cat-card:hover {
    background-color: #fcfcfc;
}

.cs-cat-card--active {
    background-color: #464646 !important;
    border-color: #464646 !important;
    color: #fff !important;
}

.cs-cat-card--active .cs-cat-card__count {
    color: rgba(255, 255, 255, 0.7);
}

.cs-cat-card--active .cs-cat-card__placeholder {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}




.cs-cat-card__visual {
    background: #fff;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 50px;
    overflow: hidden;
}

.cs-cat-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-cat-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ced4da;
    background-color: #f8f9fa;
}

.cs-cat-card__placeholder i {
    color: #696969;
}

.cs-cat-card__content {
    flex: 1;
}

.cs-cat-card__name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.cs-cat-card__count {
    font-size: 13px;
    color: #888;
}

/* Author Card */
.cs-author-card {
    position: sticky;
    top: 100px;
}

.cs-author-card__label {
    font-size: 18px;
    font-weight: 600;
    color: #575757;
    margin-bottom: 1.5rem;
}

.cs-author-card__profile {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-start;
}

.cs-author-card__avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cs-author-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.cs-author-card__info {
    flex: 1;
}

.cs-author-card__name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.cs-author-card__title {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
    line-height: 1.4;
}

.cs-author-card__exp {
    font-size: 13px;
    color: #1a1a1b;
    font-weight: 600;
}

.cs-author-card__bio {
    position: relative;
}

.cs-author-card__bio-text {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cs-author-card__more-link {
    font-weight: 500;
    color: #1a1a1b;
    text-decoration: underline;
    font-size: 14px;
    display: inline-block;
    margin-top: 5px;
}

/* --- CASE STUDY ITEMS LIST --- */
.cs-items-list {
    margin-top: 2rem;
}

.cs-items-list__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
    color: #1a1a1b;
}

.cs-item-card {
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 20px;
    padding: 1.5rem 1rem;
    margin-bottom: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.cs-item-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cs-item-card__header-main {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex: 1;
    margin-right: 2rem;
}

.cs-item-card__logo {
    width: 75px;
    height: 75px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cs-item-card__logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cs-item-card__title-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    max-width: 80%;
}

.cs-item-card__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1b;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Premium Badge Style */
.cs-item-card__premium-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(90deg, #ffd3a5 0%, #fdcfbd 40%, #e2c1f3 100%);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.cs-item-card__premium-badge i {
    color: #1a1a1b;
    font-size: 14px;
}

.cs-item-card__premium-text {
    font-size: 11px;
    font-weight: 700;
    color: #003666;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cs-item-card__score-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #fff;
    border: 1.5px solid #1a1a1b;
    border-radius: 5px;
    font-weight: 700;
    font-size: 14px;
}

.cs-item-card__score-badge i {
    color: #ffc107;
    margin-right: 8px;
}

.cs-item-card__header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Badges Area */
.cs-item-card__badges {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cs-item-card__badge {
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px solid #7a7a7a;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #4e4e4e;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* CTA Buttons - MODERN RECTANGLE PILL STYLE */
.cs-item-card__btn {
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.23s;
    white-space: nowrap;
}

.cs-item-card__btn--dark {
    background: #494949;
    color: #fff;
}


/* Two Column Layout */
.cs-item-card__content-grid {
    display: flex;
    gap: 3rem;
}

.cs-item-card__meta-list {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.cs-item-card__meta-row {
    font-size: 14px;
    display: grid;
    grid-template-columns: 180px 1fr;
}

.cs-item-card__meta-label {
    font-weight: 700;
    color: #1a1a1b;
    font-size: 16px;
}

.cs-item-card__meta-value {
    color: #424242;
    text-align: right;
    font-weight: 500;
}

.cs-item-card__summary {
    flex: 1;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
    text-align: justify;
}

/* Features/Checklist Section */
.cs-item-card__features {
    border-top: 1px solid #e3e5e7;
    padding-top: 1.5rem;
}

.cs-item-card__features-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-transform: uppercase;
}

.cs-item-card__recommend-label {
    font-size: 15px;
    font-weight: 400;
    color: #424242;
    text-transform: none;
}

.cs-item-card__recommend-label span {
    color: #333333;
    font-weight: 700;
    font-size: 18px;
}


.cs-item-card__features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 3rem;
}

.cs-item-card__feature-item {
    display: flex;
    gap: 10px;
    font-size: 15px;
    color: #353535;
    letter-spacing: -0.5px;
}

.cs-item-card__feature-item i {
    color: #099e04;
    font-size: 14px;
    font-weight: 800;
    -webkit-text-stroke: 0.5px #09be34;
}

/* Footer Section - Expert Opinion */
.cs-item-card__footer {
    background: #f6f5f9;
    border-radius: 20px;
    padding: 1rem;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.cs-item-card__expert-profile {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 180px;
    flex-shrink: 0;
}

.cs-item-card__expert-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
}

.cs-item-card__expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cs-item-card__expert-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
}

.cs-item-card__expert-title {
    font-size: 11px;
    color: #888;
    margin: 0;
    letter-spacing: 0.02em;
}

.cs-item-card__expert-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    min-width: 100px;
    flex-shrink: 0;
}

.cs-item-card__expert-body {
    flex: 1;
    font-size: 15px;
    line-height: 1.6;
    color: #1a1a1b;
    font-weight: 500;
    font-style: italic;
}

.cs-item-card__rating-gauge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 100px;
    flex-shrink: 0;
}

.cs-item-card__rating-val {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1b;
}

.cs-item-card__rating-meta {
    font-size: 11px;
    font-weight: 700;
    color: #808080;
    text-transform: uppercase;
}

/* Responsive - Adjustments for smaller screens */
@media (max-width: 992px) {
    .cs-item-card__content-grid {
        flex-direction: column;
        gap: 1.5rem;
    }

    .cs-item-card__meta-list {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .cs-section-title {
        font-size: 18px;
    }

    .cs-item-card {
        padding: 1.5rem;
    }

    .cs-item-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cs-item-card__header-main {
        margin-right: 0;
        gap: 1rem;
    }

    .cs-item-card__logo {
        width: 50px;
        height: 50px;
    }

    .cs-item-card__title-area {
        max-width: 100%;
    }

    .cs-item-card__title {
        font-size: 1.1rem;
        -webkit-line-clamp: 2;
        /* Cho phép hiện 2 dòng trên mobile */
    }

    .cs-item-card__score-badge,
    .cs-item-card__premium-badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    .cs-item-card__score-badge i,
    .cs-item-card__premium-badge i {
        font-size: 12px;
    }

    .cs-item-card__premium-text {
        font-size: 9px;
    }

    .cs-item-card__badges {
        gap: 0.5rem;
    }

    .cs-item-card__badge {
        padding: 4px 10px;
        font-size: 11px;
        gap: 6px;
    }

    .cs-item-card__badge i {
        font-size: 12px;
    }

    .cs-item-card__btn {
        padding: 6px 16px;
        font-size: 13px;
    }

    .cs-item-card__features-grid {
        grid-template-columns: 1fr;
    }

    .cs-item-card__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cs-item-card__expert-profile {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        padding-right: 0;
        padding-bottom: 1rem;
        width: 100%;
    }

    .cs-item-card__rating-gauge {
        align-items: flex-start;
    }
}


.cs-load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #585858;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    cursor: pointer;
    background: transparent;
    text-decoration: underline;
}


.cs-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.cs-load-more-btn__spinner i {
    display: inline-block;
    animation: cs-spin 0.8s linear infinite;
}

@keyframes cs-spin {
    100% {
        transform: rotate(360deg);
    }
}