/**
 * News List Styles - Bootstrap 5 Layout
 * File terpisah untuk komponen berita list
 */

/* ==========================================================================
   News Card - Horizontal Layout
   ========================================================================== */
.news-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-card {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    padding: 15px;
}

.news-card:last-child {
    margin-bottom: 0;
}

/* Topic Label */
.news-topic {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    color: #dd3333;
    /* text-transform: uppercase; */
    /* letter-spacing: 0.5px; */
    /* margin-bottom: 8px; */
}

.news-topic a {
    color: inherit;
    text-decoration: none;
}

.news-topic a:hover {
    color: #0b63a1;
}

/* Title */
.news-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
}

.news-title a {
    color: #016fba;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-title a:hover {
    color: #0b63a1;
}

/* Excerpt - 2 line clamp */
.news-excerpt {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    line-height: 1.6;
    margin-bottom: 0px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    min-height: 2.6em;
}

/* Meta Info */
.news-meta {
    font-size: 11px;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

/* Meta + Share dalam satu baris */
.news-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
    margin-top: auto;
}

.news-footer .news-meta {
    margin-bottom: 0;
}

.news-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-meta-item svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.news-meta-category a {
    color: #666;
    font-weight: 600;
    text-decoration: none;
}

.news-meta-category a:hover {
    color: #dd3333;
}

/* Share Buttons - Hidden by default, show on hover */
.news-share {
    display: flex;
    gap: 5px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Show share buttons on card hover */
.news-card:hover .news-share {
    opacity: 1;
    visibility: visible;
}

.news-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 6px;
    font-size: 11px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-share-btn svg {
    width: 14px;
    height: 14px;
}

/* Facebook Button */
.news-share-btn.share-facebook {
    background-color: #1877f2;
    color: #fff;
}

.news-share-btn.share-facebook:hover {
    background-color: #0d65d9;
    color: #fff;
}

/* X/Twitter Button */
.news-share-btn.share-twitter {
    background-color: #000;
    color: #fff;
}

.news-share-btn.share-twitter:hover {
    background-color: #333;
    color: #fff;
}

/* WhatsApp Button */
.news-share-btn.share-whatsapp {
    background-color: #25D366;
    color: #fff;
}

.news-share-btn.share-whatsapp:hover {
    background-color: #1da851;
    color: #fff;
}

/* Thumbnail Container */
.news-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    height: 100%;
    min-height: 140px;
}

.news-thumbnail a {
    display: block;
    height: 100%;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.4s ease;
}

.news-card:hover .news-thumbnail img {
    transform: scale(1.05);
}

/* ==========================================================================
   Responsive - Tetap Horizontal di Semua Ukuran
   ========================================================================== */

/* News card selalu flex-row (horizontal) di semua ukuran layar */
.news-card>.d-flex {
    flex-direction: row !important;
}

/* Pastikan urutan: konten kiri, gambar kanan */
.news-card .w-md-70 {
    width: 70%;
    order: 1;
}

.news-card .w-md-30 {
    width: 30%;
    order: 2;
}

/* Responsive adjustments untuk mobile */
@media (max-width: 767px) {
    .news-title {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .news-excerpt {
        display: none;
    }

    .news-topic {
        font-size: 11px;
        /* margin-bottom: 5px; */
    }

    .news-meta {
        font-size: 10px;
        gap: 10px;
        margin-bottom: 8px;
    }

    .news-share-btn span {
        display: none;
    }

    .news-share-btn {
        padding: 6px 8px;
    }

    .news-card {
        padding: 12px;
    }
}

/* ==========================================================================
   Widget Berita Populer
   ========================================================================== */
.widget-popular .popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-popular .popular-item {
    border-bottom: 1px solid #eee;
}

.widget-popular .popular-item:last-child {
    border-bottom: none;
}

.widget-popular .popular-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    transition: background 0.2s ease;
}

.widget-popular .popular-link:hover {
    /* background: #f9f9f9; */
    margin: 0 -15px;
    padding: 12px 15px;
}

.widget-popular .popular-title {
    flex: 1;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.widget-popular .popular-link:hover .popular-title {
    color: #dd3333;
}

.widget-popular .popular-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    overflow: hidden;
    border-radius: 3px;
    background: #eee;
}

.widget-popular .popular-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.widget-popular .popular-link:hover .popular-thumb img {
    transform: scale(1.08);
}

/* ==========================================================================
   Widget Topik Populer
   ========================================================================== */
.widget-topics .topics-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget-topics .topics-item {
    border-bottom: 1px solid #eee;
}

.widget-topics .topics-item:last-child {
    border-bottom: none;
}

.widget-topics .topics-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    transition: all 0.2s ease;
}

.widget-topics .topics-link:hover {
    /* background: #f9f9f9; */
    margin: 0 -15px;
    padding: 10px 15px;
}

.widget-topics .topics-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    transition: color 0.2s ease;
}

.widget-topics .topics-link:hover .topics-name {
    color: #dd3333;
}

.widget-topics .topics-count {
    font-size: 11px;
    color: #fff;
    background: #dd3333;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 30px;
    text-align: center;
}

/* ==========================================================================
   Widget Tag Populer (Tag Cloud)
   ========================================================================== */
.widget-tags .tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.widget-tags .tag-item {
    display: inline-block;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    background: #f0f0f0;
    border-radius: 3px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.widget-tags .tag-item:hover {
    background: #dd3333;
    color: #fff;
}

/* ==========================================================================
   Video Badge untuk News Card
   ========================================================================== */
.news-card-video {
    position: relative;
}

.news-card-video a::after {
    content: '';
    /* position: absolute; */
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease;
}

.news-card:hover .news-card-video a::after {
    background: rgba(0, 0, 0, 0.25);
}

.news-card-video .video-duration {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
}

.news-card-video .video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: #dd3333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
}

.news-card-video .video-play-icon-list {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(129, 215, 66, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    font-size: 9px;
}

.news-card-video .video-play-icon svg,
.news-card-video .video-play-icon-list svg {
    width: 18px;
    height: 18px;
    color: #fff;
    margin-left: 2px;
}

.news-card:hover .news-card-video .video-play-icon,
.news-card:hover .news-card-video .video-play-icon-list {
    background: #81d742;
    transform: translate(-50%, -50%) scale(1.1);
}

/* =====================================================
   FILTER BAR (Advanced)
   ===================================================== */
.list-filter-bar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group .filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.filter-input {
    padding: 6px 30px 6px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    min-width: 150px;
}

.filter-input:focus {
    outline: none;
    border-color: #81d742;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #81d742;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background: #6bc02e;
}

.btn-filter svg {
    width: 16px;
    height: 16px;
}

.btn-reset {
    font-size: 14px;
    color: #888;
    text-decoration: none;
}

.btn-reset:hover {
    color: #dd3333;
    text-decoration: underline;
}

.filter-stats {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive Filter */
@media (max-width: 767px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select,
    .filter-input {
        width: 100%;
    }

    .filter-actions {
        width: 100%;
        justify-content: space-between;
    }

    .btn-filter {
        flex: 1;
        justify-content: center;
    }
}

/* =====================================================
   LIST HEADER
   ===================================================== */
.list-breadcrumb {
    padding: 15px 0;
    margin-bottom: 0;
}

.list-breadcrumb .breadcrumb {
    margin-bottom: 0;
    background: transparent;
    padding: 0;
}

.list-header {
    margin-bottom: 25px;
}

/* Header dengan Banner */
.list-header-banner {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.list-header-banner .bk-16x9 {
    aspect-ratio: 21/9;
}

.list-header-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.list-header-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
}

.list-header-overlay .list-title {
    color: #fff;
    margin-bottom: 10px;
}

.list-header-overlay .list-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* Header Sederhana */
.list-header-simple {
    padding: 20px 0;
    border-bottom: 3px solid #81d742;
    margin-bottom: 20px;
}

.list-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-title svg {
    color: #81d742;
    flex-shrink: 0;
}

.list-description {
    font-size: 15px;
    color: #666;
    margin: 10px 0 0;
    line-height: 1.6;
}

/* LIST TOOLBAR (Stats & Filter) */
.list-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.list-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.stats-count {
    font-weight: 600;
    color: #1a1a2e;
}

.stats-page {
    padding-left: 15px;
    border-left: 1px solid #ddd;
}

.list-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 767px) {
    .list-title {
        font-size: 20px;
    }

    .list-title svg {
        width: 22px;
        height: 22px;
    }

    .list-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-filter {
        width: 100%;
    }

    .stats-page {
        display: none;
    }

    .list-header-banner .bk-16x9 {
        aspect-ratio: 16/9;
    }

    .list-header-overlay {
        padding: 20px;
    }

    .list-header-overlay .list-title {
        font-size: 20px;
    }
}

/* =====================================================
   LIST PAGINATION
   ===================================================== */
.list-pagination {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.list-pagination .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.list-pagination .page-item {
    margin: 0;
}

.list-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.list-pagination .page-link:hover {
    color: #fff;
    background: #81d742;
    border-color: #81d742;
}

.list-pagination .page-item.active .page-link {
    color: #fff;
    background: #81d742;
    border-color: #81d742;
    pointer-events: none;
}

.list-pagination .page-item.disabled .page-link {
    color: #aaa;
    background: #f5f5f5;
    border-color: #eee;
    pointer-events: none;
}

.list-pagination .page-prev,
.list-pagination .page-next {
    gap: 5px;
    padding: 0 15px;
}

.list-pagination .page-prev span,
.list-pagination .page-next span {
    display: none;
}

/* Responsive Pagination */
@media (max-width: 767px) {

    .list-pagination .page-prev span,
    .list-pagination .page-next span {
        display: inline;
    }

    .list-pagination .page-link {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    /* Hide page numbers on very small screens, show prev/next only */
    .list-pagination .page-item:not(:first-child):not(:last-child) {
        display: none;
    }

    .list-pagination .page-item.active {
        display: block;
    }
}

.list-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-label {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.filter-select {
    padding: 6px 30px 6px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 18px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.filter-select:focus {
    outline: none;
    border-color: #81d742;
}