/* ========================================
   NEWS PAGE - Tin Tức
   Univision Design
   ======================================== */

.uv-news-page {
    background: #f1f5f9;
    min-height: calc(100vh - 150px);
    padding-bottom: 50px;
}

/* Breadcrumb */
.uv-news-breadcrumb {
    background: #fff;
    padding: 12px 0;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
}

.uv-news-breadcrumb a {
    color: #0035a8;
    text-decoration: none;
}

.uv-news-breadcrumb a:hover {
    text-decoration: underline;
}

.uv-news-breadcrumb span {
    color: #6b7280;
}

/* Page Title */
.uv-news-title {
    font-size: 24px;
    font-weight: 700;
    color: #0035a8;
    margin: 25px 0 20px;
    text-transform: uppercase;
    text-align: center;
}

/* ========================================
   Category Carousel
   ======================================== */
.uv-news-categories-carousel {
    position: relative;
    margin-bottom: 20px;
    padding: 0 40px;
}

.uv-categories-wrapper {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 12px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.uv-categories-wrapper::-webkit-scrollbar {
    display: none;
}

.uv-category-item {
    flex: 0 0 auto;
    text-align: center;
    min-width: 100px;
}

.uv-category-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 6px;
}

.uv-category-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    background: #f3f4f6;
}

.uv-category-item.active .uv-category-image,
.uv-category-item:hover .uv-category-image {
    border-color: #0035a8;
}

.uv-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.uv-category-image .uv-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
}

.uv-category-image.uv-all-category {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0035a8 0%, #0051ff 100%);
}

.uv-category-image.uv-all-category i {
    font-size: 32px;
    color: #fff;
}

.uv-category-item span {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.uv-category-item.active span,
.uv-category-item:hover span {
    color: #0035a8;
}

.uv-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    color: #374151;
}

.uv-carousel-nav:hover {
    background: #0035a8;
    border-color: #0035a8;
    color: #fff;
}

.uv-carousel-nav.prev {
    left: 0;
}

.uv-carousel-nav.next {
    right: 0;
}


/* ========================================
   Search Bar
   ======================================== */
.uv-news-search {
    max-width: 500px;
    margin: 0 auto 25px;
}

.uv-news-search form {
    position: relative;
    display: flex;
    align-items: center;
}

.uv-news-search i {
    position: absolute;
    left: 15px;
    color: #9ca3af;
    font-size: 16px;
}

.uv-news-search input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #e5e7eb;
    border-radius: 25px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.uv-news-search input:focus {
    outline: none;
    border-color: #0035a8;
    box-shadow: 0 0 0 3px rgba(0, 53, 168, 0.1);
}

/* ========================================
   Featured & Suggested Section
   ======================================== */
.uv-news-featured-section {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

/* Section Header */
.uv-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

.uv-section-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    position: relative;
    padding-left: 12px;
}

.uv-section-header h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: #0035a8;
    border-radius: 2px;
}

.uv-view-all {
    font-size: 13px;
    color: #0035a8;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.uv-view-all:hover {
    text-decoration: underline;
}

/* Empty state */
.uv-empty-news {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.uv-empty-news i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: #d1d5db;
}

.uv-empty-news p {
    font-size: 15px;
}

/* Featured Post */
.uv-featured-post {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.uv-featured-card {
    display: block;
    text-decoration: none;
}

.uv-featured-image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    padding-top: 100%; /* 1:1 */
}

.uv-featured-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.uv-featured-card:hover .uv-featured-image img {
    transform: scale(1.03);
}

.uv-featured-info {
    padding: 0 5px;
}

.uv-featured-date {
    font-size: 12px;
    color: #9ca3af;
    display: block;
    margin-bottom: 8px;
}

.uv-featured-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.uv-featured-card:hover .uv-featured-title {
    color: #0035a8;
}

.uv-featured-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Suggested Posts */
.uv-suggested-posts {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.uv-suggested-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.uv-suggested-item {
    display: flex;
    gap: 12px;
    text-decoration: none;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.uv-suggested-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.uv-suggested-image {
    flex: 0 0 110px;
    width: 110px;
    height: 110px;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
}

.uv-suggested-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.uv-suggested-item:hover .uv-suggested-image img {
    transform: scale(1.05);
}

.uv-suggested-info {
    flex: 1;
    min-width: 0;
}

.uv-suggested-date {
    font-size: 11px;
    color: #9ca3af;
    display: block;
    margin-bottom: 5px;
}

.uv-suggested-title {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.uv-suggested-item:hover .uv-suggested-title {
    color: #0035a8;
}


/* ========================================
   Category Section & Post Cards
   ======================================== */
.uv-news-category-section {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.uv-category-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Post Card */
.uv-post-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s, transform 0.2s;
}

.uv-post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.uv-post-image {
    position: relative;
    padding-top: 100%; /* 1:1 */
    overflow: hidden;
    background: #f3f4f6;
}

.uv-post-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.uv-post-card:hover .uv-post-image img {
    transform: scale(1.05);
}

.uv-post-info {
    padding: 12px;
}

.uv-post-date {
    font-size: 11px;
    color: #9ca3af;
    display: block;
    margin-bottom: 6px;
}

.uv-post-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.uv-post-card:hover .uv-post-title {
    color: #0035a8;
}

/* ========================================
   All Posts Section
   ======================================== */
.uv-news-all-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.uv-all-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* ========================================
   Pagination
   ======================================== */
.uv-news-pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
}

.uv-pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.uv-page-link,
.uv-page-prev,
.uv-page-next,
.uv-page-active {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.uv-page-link:hover,
.uv-page-prev:hover,
.uv-page-next:hover {
    background: #0035a8;
    border-color: #0035a8;
    color: #fff;
}

.uv-page-active {
    background: #0035a8;
    border-color: #0035a8;
    color: #fff;
}

.uv-page-dots {
    color: #9ca3af;
    padding: 0 5px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1199px) {
    .uv-category-posts-grid,
    .uv-all-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .uv-news-featured-section {
        grid-template-columns: 1fr;
    }

    .uv-featured-image {
        padding-top: 100%; /* giữ 1:1 */
    }

    .uv-suggested-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .uv-suggested-item {
        flex-direction: column;
        padding-bottom: 0;
        border-bottom: none;
        gap: 10px;
    }

    .uv-suggested-image {
        flex: none;
        width: 100%;
        height: auto;
        padding-top: 100%; /* 1:1 */
        position: relative;
    }

    .uv-suggested-image img {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
    }

    .uv-category-posts-grid,
    .uv-all-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .uv-news-title {
        font-size: 20px;
    }

    .uv-news-categories-carousel {
        padding: 0 35px;
    }

    .uv-category-image {
        width: 80px;
        height: 80px;
    }

    .uv-category-item {
        min-width: 80px;
    }

    .uv-category-item span {
        font-size: 11px;
        max-width: 80px;
    }

    .uv-news-search {
        max-width: 100%;
    }

    .uv-featured-title {
        font-size: 16px;
    }

    .uv-suggested-list {
        grid-template-columns: 1fr 1fr;
    }

    .uv-category-posts-grid,
    .uv-all-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .uv-news-categories-carousel {
        padding: 0 30px;
    }

    .uv-categories-wrapper {
        gap: 10px;
    }

    .uv-category-image {
        width: 70px;
        height: 70px;
    }

    .uv-category-item {
        min-width: 70px;
    }

    .uv-carousel-nav {
        width: 28px;
        height: 28px;
    }

    .uv-suggested-list {
        grid-template-columns: 1fr;
    }

    .uv-suggested-item {
        flex-direction: row;
    }

    .uv-suggested-image {
        flex: 0 0 80px;
        width: 80px;
        height: 80px;
        padding-top: 0;
        position: relative;
    }

    .uv-post-info {
        padding: 10px;
    }

    .uv-post-title {
        font-size: 12px;
    }

    .uv-page-link,
    .uv-page-prev,
    .uv-page-next,
    .uv-page-active {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
}
