﻿.news-image {
    height: 180px !important;
    border-radius: 4px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.route {
    display: flex;
    padding: 20px 0 10px;
    column-gap: 4px;
    font-size: 16px;
    line-height: 24px;
}

.route-home {
    color: #718096;
}

.see-more img {
    display: inline-block;
    transition: transform 0.2s ease;
}

.filter-header {
    cursor: pointer;
}

    .filter-header img {
        transition: transform 0.2s ease;
    }

.news-grid {
    grid-template-columns: repeat(1fr, 3);
}

.news-header {
    display: flex;
    justify-content: space-between;
}

.header-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    color: #fff;
}

.header-filter {
    display: flex;
    column-gap: 16px;
    align-items: center;
    margin: 10px 20px;
    font-size: 14px;
    font-weight: 400;
}

.header-filter-text {
    font-size: 14px;
    font-weight: 400;
}

.header-select select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background-color: #fff;
}

.news-filter-section {
    font-family: "Inter", sans-serif;
    width: 100%;
}

.news-section-title {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
}

.news-filter-input-wrapper {
    position: relative;
    width: 100%;
    margin-top: 6px;
}

    .news-filter-input-wrapper input {
        width: 100%;
        padding: 10px 45px 10px 15px;
        font-size: 16px;
        border: 2px solid #ccc;
        border-radius: 8px;
        outline: none;
        cursor: pointer;
        transition: all 0.25s ease;
        background-color: #fff;
    }

        .news-filter-input-wrapper input:hover {
            border-color: var(--color-primary);
        }

        .news-filter-input-wrapper input:focus {
            border-color: var(--color-primary);
            /*box-shadow: 0 0 0 3px rgba(177, 0, 0, 0.15);*/
        }

.news-dropdown-arrow {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #555;
    pointer-events: none;
    transition: transform .2s ease;
}

.news-filter-input-wrapper.open .news-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.news-filter-dropdown {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    width: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: none;
    z-index: 99;
}

    .news-filter-dropdown li {
        padding: 12px 16px;
        cursor: pointer;
        transition: background 0.15s;
    }

        .news-filter-dropdown li:hover {
            background: #f2f2f2;
        }

        .news-filter-dropdown li.selected {
            background: var(--color-primary);
            color: white;
        }

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 20px;
}

    .news-grid.empty-state-active {
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 60px 20px 80px;
    }

.news-content {
    border: 2px solid #E4E4E4;
    border-top-color: #003B8E;
    border-radius: 4px;
}

.news-card,
.news-info {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}

.news-info {
    padding: 10px;
}

.news-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

    .news-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }


.news-title,
.news-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-title {
    min-height: 48px;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.news-time {
    font-size: 14px;
    line-height: 20px;
}

.news-description {
    min-height: 40px;
    font-size: 14px;
    line-height: 20px;
}

.interact {
    display: flex;
    justify-content: space-between;
}

.interact-like,
.interact-views {
    display: flex;
    align-items: center;
    column-gap: 4px;
    font-size: 14px;
    line-height: 20px;
}

    .interact-like img,
    .interact-views img {
        width: 18px;
    }

input[type=checkbox] {
    opacity: 1;
    position: relative;
}

.custom-checkbox:checked::after {
    left: 5px;
    top: 1px;
}

/* Skeleton Loading Styles */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton-line {
    display: inline-block;
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-news-card {
    opacity: 1;
}

    .skeleton-news-card .news-info {
        padding: 0;
    }

.skeleton-filter-list .skeleton-item {
    padding: 14px 20px;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
}

    .skeleton-filter-list .skeleton-item:last-child {
        border-bottom: none;
    }

.skeleton-see-more {
    padding: 10px 20px;
    display: flex;
    align-items: center;
}

/* Hide skeleton when content is loaded */
.news-grid:not(#news-grid-skeleton) .skeleton-news-card,
.filter-list:not(.skeleton-filter-list) .skeleton-item,
.see-more:not(.skeleton-see-more) {
    display: none;
}

/* Pagination disabled state */
.page-arrow.disabled,
.page-number.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Empty state (match documents page style) */
.empty-state {
    text-align: center;
    padding: 60px 20px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 12px;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.empty-state-message {
    font-size: 16px;
    color: #666;
    max-width: 520px;
    line-height: 1.6;
    margin: 0;
}

.news-grid.empty-state-active .empty-state {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ========== Skeleton Loading ========== */
.skeleton-news-card {
    pointer-events: none;
    user-select: none;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

    .skeleton-news-card .skeleton-image {
        width: 100%;
        height: 180px;
        background: #f0f0f0;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

        .skeleton-news-card .skeleton-image::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
            animation: skeleton-shimmer 1.5s infinite;
        }

    .skeleton-news-card .news-info {
        padding: 10px;
        display: flex;
        flex-direction: column;
        row-gap: 10px;
    }

    .skeleton-news-card .skeleton-title {
        width: 90%;
        height: 24px;
        background: #f0f0f0;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

        .skeleton-news-card .skeleton-title::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
            animation: skeleton-shimmer 1.5s infinite;
        }

    .skeleton-news-card .skeleton-title-line2 {
        width: 60%;
        height: 24px;
        margin-top: 0;
        background: #f0f0f0;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

        .skeleton-news-card .skeleton-title-line2::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
            animation: skeleton-shimmer 1.5s infinite;
        }

    .skeleton-news-card .skeleton-time {
        width: 40%;
        height: 20px;
        background: #f0f0f0;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

        .skeleton-news-card .skeleton-time::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
            animation: skeleton-shimmer 1.5s infinite;
        }

    .skeleton-news-card .skeleton-description {
        width: 100%;
        height: 20px;
        background: #f0f0f0;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

        .skeleton-news-card .skeleton-description::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
            animation: skeleton-shimmer 1.5s infinite;
        }

    .skeleton-news-card .skeleton-description-line2 {
        width: 95%;
        height: 20px;
        background: #f0f0f0;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

        .skeleton-news-card .skeleton-description-line2::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
            animation: skeleton-shimmer 1.5s infinite;
        }

    .skeleton-news-card .skeleton-interact {
        display: flex;
        justify-content: space-between;
        margin-top: 0;
    }

    .skeleton-news-card .skeleton-interact-like,
    .skeleton-news-card .skeleton-interact-views {
        width: 60px;
        height: 20px;
        background: #f0f0f0;
        border-radius: 4px;
        position: relative;
        overflow: hidden;
    }

    .skeleton-news-card .skeleton-interact-views {
        width: 80px;
    }

        .skeleton-news-card .skeleton-interact-like::after,
        .skeleton-news-card .skeleton-interact-views::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
            animation: skeleton-shimmer 1.5s infinite;
        }

@keyframes skeleton-shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* Xóa các skeleton styles cũ không dùng nữa */
.skeleton-line {
    display: none;
}

/* Watch Later Button Styles */
.news-thumbnail-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.news-thumbnail-link {
    display: block;
}

.watch-later-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    z-index: 2;
}

.watch-later-btn .watch-later-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: none;
}

.watch-later-btn:hover {
    background: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.watch-later-btn.is-saved {
    background: var(--primary-blue);
    color: #ffffff;
}

.watch-later-btn.is-saved .watch-later-icon {
    fill: currentColor;
    stroke: currentColor;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .main-content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .w-100 {
        width: 100%;
        box-sizing: border-box;
    }

    .news-content {
        width: 100%;
        box-sizing: border-box;
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 16px;
    }

    .news-header {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        box-sizing: border-box;
    }

    .content-header {
        width: 100%;
        box-sizing: border-box;
    }

    .header-filter {
        width: 100%;
        margin: 0;
        padding: 0 16px 16px;
        justify-content: space-between;
        box-sizing: border-box;
    }

    .header-select {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .news-form-filter-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .news-filter-input-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .header-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .w-100 {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .news-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .route {
        padding: 16px 0 8px;
        font-size: 14px;
        flex-wrap: wrap;
    }

    .main-content-wrapper {
        margin-top: 16px;
        margin-bottom: 16px;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 12px;
    }

    .news-card {
        margin-bottom: 0;
    }

    .news-image {
        height: 200px !important;
    }

    .news-info {
        padding: 12px;
    }

    .news-title {
        font-size: 15px;
        line-height: 22px;
        min-height: 44px;
    }

    .news-description {
        font-size: 13px;
        line-height: 18px;
        min-height: 36px;
    }

    .news-time {
        font-size: 13px;
    }

    .interact {
        font-size: 12px;
    }

    .interact-like img,
    .interact-views img {
        width: 16px;
    }

    .news-header {
        padding: 0;
        box-sizing: border-box;
    }

    .content-header {
        width: 100%;
        box-sizing: border-box;
    }

    .header-title {
        font-size: 16px;
        padding: 12px;
        box-sizing: border-box;
    }

    .header-filter {
        width: 100%;
        padding: 0 12px 12px;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        box-sizing: border-box;
    }

    .header-filter-text {
        font-size: 13px;
        white-space: nowrap;
    }

    .header-select {
        width: 100%;
        box-sizing: border-box;
    }

    .news-form-filter-section {
        width: 100%;
        box-sizing: border-box;
    }

    .news-filter-input-wrapper {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .news-filter-input-wrapper input {
        width: 100%;
        max-width: 100%;
        padding: 8px 40px 8px 12px;
        font-size: 14px;
        box-sizing: border-box;
    }

    .news-content {
        border-radius: 8px;
    }

    .sidebar {
        margin-top: 16px;
    }

    .filter-group {
        margin-bottom: 16px;
    }

    .filter-header {
        padding: 12px;
    }

    .filter-header h3 {
        font-size: 16px;
    }

    .search-bar input {
        font-size: 14px;
        padding: 0 30px 0 12px !important;
    }

    .pagination {
        padding: 16px 12px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .pagination .page-number,
    .pagination .page-arrow {
        min-width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .watch-later-btn {
        width: 28px;
        height: 28px;
        top: 6px;
        right: 6px;
    }

    .watch-later-btn .watch-later-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .route {
        font-size: 13px;
        padding: 12px 0 8px;
    }

    .news-grid {
        padding: 8px;
        gap: 12px;
    }

    .news-image {
        height: 180px !important;
    }

    .news-info {
        padding: 10px;
    }

    .news-title {
        font-size: 14px;
        line-height: 20px;
        min-height: 40px;
    }

    .news-header {
        padding: 0;
    }

    .header-title {
        font-size: 15px;
        padding: 12px;
        box-sizing: border-box;
    }

    .header-filter {
        width: 100%;
        padding: 0 12px 12px;
        margin: 0;
        box-sizing: border-box;
    }

    .news-filter-input-wrapper {
        width: 100%;
        max-width: 100%;
    }

    .news-filter-input-wrapper input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .filter-group {
        margin-bottom: 12px;
    }

    .filter-header {
        padding: 10px;
    }

    .filter-header h3 {
        font-size: 15px;
    }

    .filter-list {
        padding: 8px 10px;
    }

    .filter-list li {
        padding: 8px 0;
        font-size: 14px;
    }

    .pagination {
        padding: 12px 8px;
    }

    .pagination .page-number,
    .pagination .page-arrow {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .news-image {
        height: 160px !important;
    }

    .news-title {
        font-size: 13px;
    }

    .interact {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}