/* ============================================
   HOMEPAGE SPECIFIC STYLES
   Chỉ load trên trang chủ (index)
   ============================================ */

.homepage-wrapper {
    padding: 40px 0;
}

.homepage-header {
    margin-bottom: 32px;
    text-align: center;
}

.homepage-title {
    margin: 0;
    color: var(--secondary-color);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.homepage-wrapper .section-random-audio,
.homepage-wrapper .section-latest,
.homepage-wrapper .section-top-liked,
.homepage-wrapper .section-categories {
    margin-bottom: 50px;
}

/* Grid 3 columns for Box 1 */
.grid-3-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Latest posts list */
.latest-list .story-list-item {
    padding: 18px 0;
}

.latest-list .latest-item-no-image .list-content {
    padding-left: 0;
}

/* Top liked list */
.top-liked-list {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 10px 0;
}

.top-item {
    padding: 14px 24px;
    border-bottom: 1px solid #eee;
}

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

.top-item .rank-number {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}

.top-item .top-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.top-item .top-meta {
    font-size: 13px;
    color: #666;
}

/* Category list */
.category-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.category-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(230, 57, 57, 0.1);
}

.category-item .cat-name {
    font-weight: 600;
    color: var(--secondary-color);
}

.category-item .cat-count {
    font-size: 13px;
    background: #f1f1f1;
    padding: 2px 10px;
    border-radius: 20px;
    color: #555;
}

/* Responsive */
@media (max-width: 992px) {
    .grid-3-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {

    .homepage-header {
        margin-bottom: 24px;
    }

    .homepage-title {
        font-size: 28px;
    }
 
    .category-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
