/* Custom Styles for Article List */
.news-list.compact li {
    padding: 4px 0 !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    text-align: left !important;
    display: flex;
    align-items: center;
}
.news-list.compact li a {
    color: #333 !important;
    text-decoration: none;
    text-align: left !important;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.news-list.compact li a:hover {
    color: #1890ff !important;
}
.news-list.compact li .title {
    font-size: 14px !important;
}
.news-list.compact li .date {
    font-size: 12px !important;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Top Article Styles */
.news-list.compact li a.top-article {
    text-align: left !important;
    display: block !important;
    width: auto !important;
    flex: 1;
}
.badge-top {
    display: inline-block;
    background-color: #ff4d4f;
    color: white;
    padding: 0 4px;
    border-radius: 2px;
    font-size: 12px;
    margin-right: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}
/* Ensure banner is 100% width */
.banner-section {
    width: 100%;
    display: block;
    padding: 0;
}
.banner-section .banner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}
.carousel {
    width: 100% !important;
    max-width: 100% !important; /* Remove width limit */
    margin: 0;
}
.carousel-track {
    width: 100% !important;
}
.carousel-item {
    width: 100% !important;
    text-align: center;
}
.carousel-item a {
    display: block;
    width: 100%;
}
.carousel-item img {
    width: auto !important; /* Let image determine width, but max 100% */
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 0 auto; /* Center image */
}

/* Tags Navigation Styles */
.tag-area {
    background-color: transparent !important;
    padding: 15px 0 !important;
    text-align: left !important;
    width: 100%;
}
.tag-area-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 10px;
    padding: 0 20px;
}
.tag-area a {
    color: #333 !important;
    text-decoration: none;
    font-size: 14px !important;
    position: relative;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.tag-area a:not(:nth-child(10n)):not(:last-child)::after {
    content: "";
    position: absolute;
    right: -6px; /* Position exactly between items */
    top: 50%;
    transform: translateY(-50%);
    height: 12px;
    width: 1px;
    background-color: rgba(0,0,0,0.1); /* Light color */
    border-right: 1px dashed rgba(0,0,0,0.1); /* Dotted line effect */
}
/* Remove border for rightmost items in grid row */
.tag-area a:nth-child(10n)::after {
    display: none;
}

.tag-area a:hover {
    color: #1890ff !important;
}

@media(max-width: 768px) {
    .tag-area-inner {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 0 10px;
    }
    .tag-area a {
        font-size: 12px !important;
    }
    /* Reset separators for mobile grid */
    .tag-area a::after {
        display: block; /* Ensure visible by default */
        right: -5px;
    }
    .tag-area a:nth-child(10n)::after {
        display: block; /* Reset desktop rule */
    }
    .tag-area a:nth-child(5n)::after {
        display: none; /* Remove separator for every 5th item */
    }
    .tag-area a:not(:nth-child(5n)):not(:last-child)::after {
        /* Style is inherited, just ensuring selector specificity */
    }
}
