﻿/* Category nav */
.category-nav {
    display: inline-flex; /* ✅ đổi từ flex → inline-flex */
    flex-wrap: nowrap;
    overflow-x: auto;
    align-items: center;
    /* padding: 16px 24px; */
    gap: 4px;
    /* background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); */
    /* border: 1px solid #e2e8f0; */
    border-radius: 16px;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1); */
    /* scrollbar-width: none; */
    -ms-overflow-style: none;
    position: relative;
    backdrop-filter: blur(10px);
}

.breadcrumb-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px; /* khoảng cách giữa 2 nav */
    margin-bottom: 30px;
    margin-top: 20px;
}

.category-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(248, 250, 252, 0.6) 100%); */
    /* border-radius: 16px; */
    z-index: -1;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .category-nav {
        padding: 12px 16px;
        gap: 2px;
        border-radius: 12px;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .separator {
        margin: 0 4px;
    }
}

/* Custom scrollbar for when needed on smaller screens */
@media (max-width: 640px) {
    .category-nav {
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }

        .category-nav::-webkit-scrollbar {
            display: block;
            height: 4px;
            margin-top: 8px;
        }

        .category-nav::-webkit-scrollbar-track {
            background: transparent;
            border-radius: 2px;
        }

        .category-nav::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 2px;
        }

            .category-nav::-webkit-scrollbar-thumb:hover {
                background: #94a3b8;
            }
}

/* Elegant focus states for accessibility */
.nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

    .nav-link:focus:not(:focus-visible) {
        box-shadow: none;
    }

.nav-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.separator {
    color: #cbd5e1;
    flex-shrink: 0;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.category-nav:hover .separator {
    color: #94a3b8;
}

.category-nav a {
    text-decoration: none;
    color: #4b5563;
    white-space: nowrap;
    transition: color 0.3s ease;
    font-size: 18px; /* hoặc 1.125rem, 1.2em */
    font-weight: 600; /* tùy chọn nếu muốn đậm hơn */
}

    .category-nav a:hover {
        color: #10B981; /* màu xanh chủ đạo */
    }

    .category-nav a.active {
        font-weight: bold;
        color: #10B981;
    }

.category-nav .separator {
    color: #9ca3af; /* xám nhẹ */
    user-select: none;
}

.category-nav .category-nav-button {
    font-size: 0.9rem;
    color: #000;
    cursor: pointer;
    position: relative;
    background: none;
    border-width: 2px;
    border-style: solid;
    border-color: transparent;
    border-image: initial;
    padding: 0.5rem 1rem;
    transition: 0.3s;
    border-radius: 0.5rem;
    overflow: hidden;
}

    .category-nav .category-nav-button.active::after {
        width: 100%;
    }

    .category-nav .category-nav-button:hover {
        color: #000;
    }

    .category-nav .category-nav-button.active {
        background-color: #000;
        color: #fff;
    }

    .category-nav .category-nav-button::after {
        content: "";
        position: absolute;
        bottom: 0px;
        left: 0px;
        width: 0px;
        height: 2px;
        background-color: #000;
        transition: width 0.3s;
    }

    .category-nav .category-nav-button:hover::after {
        width: 100%;
    }

.featured-article {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-radius: 12px;
    margin-bottom: 10px;
}

    /* Image container with overlays */
    .featured-article .image-container {
        position: relative;
        width: 400px;
        height: 300px;
        background-color: #b9d7f1;
        border-radius: 12px;
        overflow: hidden;
        flex-shrink: 0;
    }

        .featured-article .image-container img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            border-radius: 12px;
        }

/* Circular highlight */
.circle-highlight {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 70px;
    height: 70px;
    border: 4px solid #2c9ed9;
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
}

/* Line drawing overlay */
.line-drawing {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

    .line-drawing svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    .line-drawing path {
        stroke: #a3c1e8;
        stroke-width: 2;
        fill: none;
    }

/* Article content */
.article-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-trending {
    font-size: 19px;
    font-weight: 700;
    color: var(--willimedia-green);
    user-select: none;
    display: flex;
}

.article-title {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin: 0;
    line-height: 1.2;
}

.article-excerpt {
    font-size: 14px;
    color: #444;
    margin: 0;
    line-height: 1.4;
}

.article-meta {
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

    .article-meta span {
        user-select: none;
    }

        .article-meta span:first-child {
            font-weight: 700;
            color: #000;
        }



/* Icons container */
.icons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-left: auto;
    user-select: none;
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s ease;
    padding: 0;
    line-height: 1;
}

    .icon-button:hover {
        color: #2563eb;
    }

@media (max-width: 1024px) {
    main {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumb */
nav.breadcrumb {
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 16px;
}

    nav.breadcrumb li {
        color: #6b7280 !important;
    }

    nav.breadcrumb ol {
        list-style: none;
        padding: 0;
        margin: 0;
        display: inline-flex;
        gap: 8px;
        align-items: center;
    }

        nav.breadcrumb ol li {
            display: inline;
        }

    nav.breadcrumb li:last-child a {
        color: var(--willimedia-green) !important;
    }

    nav.breadcrumb ol li a {
        font-weight: 600;
    }

/* Banner */
.banner {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    overflow: hidden;
    margin-bottom: 24px;
}

    .banner svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    .banner path {
        stroke: #94a3b8;
        stroke-width: 2;
        fill: none;
    }



@media (min-width: 768px) {
    .featured-article {
        flex-direction: row;
    }
}

.featured-image-container {
    flex-shrink: 0;
    width: 100%;
    max-width: 192px;
    background-color: #bfdbfe;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

    .featured-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.featured-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: white;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.featured-content h2 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    cursor: pointer;
    transition: color 0.2s ease;
}

    .featured-content h2:hover {
        color: #2563eb;
    }

.featured-content p {
    font-size: 14px;
    color: #374151;
    margin: 0 0 16px 0;
}

.featured-meta {
    font-size: 12px;
    color: #6b7280;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Smaller article cards grid */
.small-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .small-articles-grid {
        grid-template-columns: 1fr;
    }

    .content-area {
        margin-top: 10px;
    }

    .image-container {
        width: unset;
        height: unset;
    }
}

.small-article {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

    .small-article:hover {
        box-shadow: 0 4px 8px rgb(0 0 0 / 0.15);
    }

.small-article-image-container {
    position: relative;
    width: 100%;
    height: 128px;
    overflow: hidden;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

    .small-article-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.small-article-label {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #2563eb;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

.small-article-title {
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

/* Repeated article blocks */
.article-list {
    display: flex;
    flex-direction: column;
    /* gap: 10px; */
    padding-top: 20px;
}

    .article-list .article-section {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }

        .article-list .article-section .header-row {
            position: relative;
            display: flex;
            justify-content: flex-end; /* đẩy view-more sang phải */
            align-items: center;
            min-height: 40px; /* đảm bảo có chiều cao */
            padding: 0 8px;
        }

            .article-list .article-section .header-row .section-title {
                position: absolute;
                left: 50%;
                transform: translateX(-50%);
                font-weight: 700;
                color: #1f2937;
                font-size: 20px;
                margin: 0;
                white-space: nowrap;
            }

            .article-list .article-section .header-row .view-more {
                font-size: 14px;
                color: #2563eb;
                text-decoration: none;
                font-weight: 500;
                z-index: 1;
            }

        .article-list .article-section .article-list-item {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
        }

            .article-list .article-section .article-list-item .article-card {
                width: calc(33% - 12px);
                border-radius: 12px;
                padding: 12px;
                display: flex;
                flex-direction: column;
                gap: 8px;
                box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
            }

                .article-list .article-section .article-list-item .article-card .image-container {
                    width: 100%;
                    aspect-ratio: 4/3;
                    overflow: hidden;
                    border-radius: 8px;
                    position: relative;
                    background-color: #bfdbfe;
                }

                    .article-list .article-section .article-list-item .article-card .image-container img {
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }

                    .article-list .article-section .article-list-item .article-card .image-container .label-trending {
                        /* position: absolute; */
                        /* top: 8px; */
                        /* left: 8px; */
                        /* background-color: #2563eb; */
                        /* color: white; */
                        /* font-size: 12px; */
                        /* font-weight: 700; */
                        /* padding: 2px 8px; */
                        /* border-radius: 6px; */
                    }

                .article-list .article-section .article-list-item .article-card .article-title {
                    font-size: 16px;
                    font-weight: 700;
                    color: #111827;
                    margin: 0;
                    cursor: pointer;
                    transition: color 0.2s ease;
                    display: -webkit-box;
                    -webkit-line-clamp: 2;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }

                    .article-list .article-section .article-list-item .article-card .article-title:hover {
                        color: #2563eb;
                    }

                .article-list .article-section .article-list-item .article-card .article-excerpt {
                    font-size: 14px;
                    color: #374151;
                    margin: 0;
                    display: -webkit-box;
                    -webkit-line-clamp: 3;
                    -webkit-box-orient: vertical;
                    overflow: hidden;
                    text-overflow: ellipsis;
                }

/* <1300px: 3 items per row */
@media (max-width: 1299px) {
    .article-list .article-section .article-list-item .article-card {
        width: calc(33.333% - 11px);
    }
}

/* <900px: 2 items per row */
@media (max-width: 899px) {
    .article-list .article-section .article-list-item .article-card {
        width: calc(50% - 8px);
    }
}

/* (Optional) <600px: 1 item per row */
@media (max-width: 599px) {
    .article-list .article-section .article-list-item .article-card {
        width: 100%;
    }
}

/* Sidebar */
aside {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.browse-categories {
    background-color: #dbeafe;
    border-radius: 12px;
    padding: 16px;
}

    .browse-categories h3 {
        font-weight: 700;
        color: #111827;
        margin-bottom: 16px;
        font-size: 16px;
    }

    .browse-categories ul {
        list-style: none;
        padding: 0;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .browse-categories li button {
        width: 100%;
        text-align: left;
        background-color: white;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        padding: 8px 12px;
        font-size: 14px;
        color: #374151;
        transition: background-color 0.2s ease;
    }

        .browse-categories li button:hover {
            background-color: #bfdbfe;
        }

/* Vertical decorative images */
.vertical-decorations {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.vertical-decoration {
    width: 100%;
    height: 128px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    overflow: hidden;
}

    .vertical-decoration svg {
        width: 100%;
        height: 100%;
        display: block;
    }

    .vertical-decoration path {
        stroke: #94a3b8;
        stroke-width: 2;
        fill: none;
    }

/* Video Grid */
.video-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

    /* Video Card */
    .video-grid .video-card {
        display: flex;
        flex-direction: column;
        background-color: #fff;
        border-radius: 5px;
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
        transition: transform 0.3s, box-shadow 0.3s;
        height: 320px; /* cố định chiều cao */
        width: 250px; /* cố định chiều rộng */
        margin-bottom: 0;
    }

        .video-grid .video-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        }

    /* Thumbnail */
    .video-grid .video-thumbnail {
        padding: 8px 8px 0 8px;
    }

        .video-grid .video-thumbnail img {
            width: 234px; /* căn theo video-card width */
            height: 180px;
            object-fit: cover;
            display: block;
        }

    /* Video Info */
    .video-grid .video-info {
        padding: 4px 8px;
    }

        .video-grid .video-info h3 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 5px;
            color: #333;
            line-height: 1.3;
            font-family: var(--font-family);
            height: 48px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            white-space: normal;
        }

        .video-grid .video-info p {
            font-size: 14px;
            color: var(--light-text);
            line-height: 1.4;
            font-family: var(--font-family);
            padding-bottom: 4px;
            height: 60px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            white-space: normal;
        }

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 32px;
}

.pagination-list {
    display: flex;
    list-style: none;
    gap: 8px;
    padding: 0;
    margin: 0;
}

    .pagination-list li a {
        display: inline-block;
        padding: 8px 14px;
        border: 1px solid #d1d5db; /* border-gray-300 */
        border-radius: 6px;
        text-decoration: none;
        color: #374151; /* text-gray-700 */
        font-weight: 500;
        transition: all 0.2s ease-in-out;
    }

        .pagination-list li a:hover {
            background-color: #10B981; /* willimedia-green */
            color: white;
            border-color: #10B981;
        }

    .pagination-list li.active a {
        background-color: #10B981;
        color: white;
        border-color: #10B981;
    }

.news-item {
    padding-bottom: 20px;
}

.bottom-banners {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap; /* Cho phép xuống dòng */
    gap: 16px;
    justify-content: center;
    padding: 20px 0;
}

.bottom-banner {
    flex: 1 1 calc(25% - 16px); /* Mặc định: 4 banner mỗi hàng */
    max-width: calc(25% - 16px);
    height: 300px;
}

    .bottom-banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

@media (max-width: 1299px) {
    .bottom-banner {
        flex: 1 1 calc(50% - 16px);
        max-width: calc(50% - 16px);
    }
}

.ads_d {
    width: 300px;
    height: 600px;
}

.news-widget {
    width: 300px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    background: #fff;
    overflow: hidden;
}

.news-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

    .news-tabs .tab {
        flex: 1;
        padding: 10px;
        text-align: center;
        cursor: pointer;
        background: #f9f9f9;
        border: none;
        outline: none;
        font-weight: bold;
        color: #888;
    }

        .news-tabs .tab.active {
            color: #000;
            border-bottom: 2px solid #2196f3;
            background: #fff;
        }

.news-widget .tab-content {
    display: none;
}

    .news-widget .tab-content.active {
        display: block;
    }

.news-list {
    max-height: 1000px;
    overflow-y: auto;
    padding: 6px 10px;
    margin: 0;
}

    .news-list ul {
        list-style: none;
        margin: 0;
        padding: 0;
        display: grid;
        gap: 8px;
    }

    .news-list li {
        display: flex;
        align-items: flex-start;
        gap: 6px;
        line-height: 1.4;
    }

        .news-list li a {
            display: inline-block;
            color: #111;
            text-decoration: none;
            font-size: 14px;
            transition: color 0.2s;
        }

            .news-list li a:hover {
                color: #2563eb;
            }

    .news-list .dot {
        display: inline-block;
        width: 6px;
        height: 6px;
        background-color: #fff; /* Trắng */
        border: 1px solid #000; /* Viền đen */
        border-radius: 50%; /* Tròn */
        margin-top: 5px;
        margin-right: 6px;
        flex-shrink: 0;
    }

    .news-list .icon-small {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }

    .news-list .live-badge {
        background-color: #f00;
        color: #fff;
        font-size: 10px;
        font-weight: bold;
        padding: 2px 4px;
        border-radius: 3px;
        display: inline-block;
        flex-shrink: 0;
    }

.category-sidebar {
    order: 0;
    width: 300px;
    flex-shrink: 0;
}
