@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Đảm bảo file colors.css được load ở đầu hoặc được include trước */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: #fff;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary);
    color: white;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    background: var(--primary-hover, #4f46e5);
}

.btn-outline {
    display: block;
    text-align: center;
    width: 100%;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 12px;
    border-radius: 30px;
    font-weight: 600;
    margin-top: 25px;
    text-transform: uppercase;
    font-size: 13px;
    transition: 0.2s;
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.badge {
    background: var(--primary);
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

header {
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 120px;
    margin-bottom: -10px;
    margin-top: -10px;
}

.logo span {
    color: var(--text-main);
}

.logo i {
    color: var(--primary);
    font-size: 24px;
}

.nav-links {
    display: flex;
    gap: 24px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
}

.nav-links li a:hover {
    color: var(--primary);
}

.nav-links li.active a {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
    padding-bottom: 15px;
}

/* ==========================================
   DROPDOWN MENU STYLES
   ========================================== */
.nav-links li.has-dropdown {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: -15px; 
}

.nav-links .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    z-index: 100;
}

.nav-links li.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .dropdown li {
    width: 100%;
}

.nav-links .dropdown li a {
    padding: 12px 20px;
    display: block;
    color: var(--text-main);
    text-transform: none;
    font-weight: 500;
    font-size: 14px;
    border-bottom: none !important;
    transition: background 0.2s, color 0.2s;
}

.nav-links .dropdown li a:hover {
    background-color: var(--bg-hero);
    color: var(--primary);
}

/* Fix dropdown hiển thị trên mobile */
@media (max-width: 768px) {
    .nav-links .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: transparent;
        padding: 5px 0 5px 15px;
        display: none; /* Ẩn mặc định trên mobile */
    }

    /* Bỏ hiệu ứng hover trên mobile, thay bằng class .open được JS thêm vào */
    .nav-links li.has-dropdown:hover .dropdown {
        display: none; 
    }
    .nav-links li.has-dropdown.open .dropdown {
        display: flex;
    }
    
    /* Quay mũi tên xuống khi menu mở */
    .nav-links li.has-dropdown.open > a > i {
        transform: rotate(180deg);
        transition: transform 0.3s;
    }
}

.header-icons {
    display: flex;
    gap: 20px;
    font-size: 20px;
    align-items: center;
    cursor: pointer;
}

.header-icons i:hover {
    color: var(--primary);
}

.search-bar-container {
    display: none;
    background: #fff;
    padding: 15px 0;
    border-top: 1px solid var(--border-color);
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    z-index: 99;
}

.search-bar-container.show {
    display: block;
}

.search-form {
    display: flex;
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    outline: none;
    font-size: 15px;
    font-family: inherit;
    transition: border 0.2s;
}

.search-form input:focus {
    border-color: var(--primary);
}

.search-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    transition: 0.2s;
}

.search-form button:hover {
    background: var(--primary-hover, #4f46e5);
}

.hero {
    background: var(--bg-hero, #eef2ff);
    padding: 40px 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 30px;
    padding: 0 20px;
}

.hero-main {
    position: relative;
    padding: 50px;
    border-radius: 20px;
    overflow: hidden;
    background-color: var(--bg-hero, #eef2ff);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 450px;
    max-height: 590px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-main::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 75%;
}

.hero h1 {
    font-size: 46px;
    line-height: 1.1;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    line-height: 1.5;
    font-weight: 400;
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.trending-now {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.trending-now h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 700;
    text-transform: uppercase;
}

.trending-now h3 i {
    color: var(--primary);
    font-size: 20px;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.trending-num {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    width: 45px;
    text-align: center;
}

.trending-img {
    width: 65px;
    height: 65px;
    border-radius: 8px;
    object-fit: cover;
}

.trending-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section {
    padding: 50px 20px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
}

.section-title i {
    color: var(--primary);
    font-size: 26px;
}

.view-all {
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s;
}

.view-all:hover {
    opacity: 0.8;
}

.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.grid-8 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 15px; text-align: center; }

.card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.news-card .card-img-wrap {
    aspect-ratio: 4/4;
}

.movie-card .card-img-wrap {
    aspect-ratio: 2/3;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.75);
    color: white;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-badge i {
    color: #ffd700;
}

.tv-card .card-img-wrap {
    border-radius: 8px;
}

.tv-card .card-title {
    position: absolute;
    bottom: 0px;
    left: 0;
    right: 0;
    padding: 40px 10px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    color: white;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 100px;
}

.gallery-item {
    cursor: pointer;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 3px solid transparent;
    transition: border 0.2s;
}

.gallery-item:hover img {
    border-color: var(--primary);
}

.gallery-item h4 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    min-height: 50vh;
}

.article-header {
    text-align: center;
}

.article-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
    font-weight: 500;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    justify-content: center;
}

.article-hero {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 30px;
    aspect-ratio: 16/9;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: #222;
}

.article-content p {
    margin-bottom: 25px;
}

.article-content .dropcap {
    float: left;
    font-size: 60px;
    line-height: 50px;
    font-weight: 700;
    color: var(--primary);
    margin: 5px 10px 0 0;
}

.article-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    display: block;
    margin: 20px auto;
}

.article-content table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0;
    margin: 25px 0;
    font-size: 16px;
    font-family: inherit;
    background-color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: table; 
    table-layout: auto; 
}

.article-content table thead tr,
.article-content table th {
    background-color: var(--primary);
    color: #ffffff;
    text-align: left;
    font-weight: bold;
    border-bottom: none;
}

.article-content table th,
.article-content table td {
    padding: 14px 18px;
    border-bottom: 1px solid #eeeeee;
    line-height: 1.5;
}

.article-content table tbody tr:nth-of-type(even) {
    background-color: #fbfbfb;
}

.article-content table tbody tr:hover {
    background-color: #f1f1f1;
    transition: background-color 0.2s ease;
}

.article-content table tbody tr:last-of-type td {
    border-bottom: 2px solid var(--primary);
}

.article-content table img {
    max-width: 100px;
    height: auto;
    border-radius: 4px;
}

.article-content table a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.article-content table a:hover {
    text-decoration: underline;
}

.article-content table p {
    margin-bottom: 5px;
}

.related-inline {
    background: var(--bg-hero, #eef2ff);
    border-left: 4px solid var(--primary);
    padding: 15px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.related-inline-img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.related-inline-content {
    flex: 1;
}

.related-inline-badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
    letter-spacing: 0.5px;
}

.related-inline a {
    font-size: 18px;
    font-weight: 600;
    color: #111;
    line-height: 1.3;
    transition: color 0.2s;
    display: block;
}

.related-inline a:hover {
    color: var(--primary);
}

.author-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fdfdfd;
    padding: 25px;
    border-radius: 12px;
    margin: 40px 0;
    border: 1px solid #eaeaea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.author-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    padding: 2px;
}

.author-info {
    flex: 1;
}

.author-info h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 700;
    color: #111;
}

.author-info p {
    margin: 0;
    font-size: 15px;
    color: #555;
    line-height: 1.5;
}

.comments-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.comments-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.comment-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    resize: vertical;
    min-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

.comment-form textarea:focus {
    border-color: var(--primary);
}

.comment-form button {
    align-self: flex-end;
    padding: 10px 30px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

.comment-form button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #888;
    flex-shrink: 0;
}

.comment-body {
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 0 12px 12px 12px;
    flex: 1;
    border: 1px solid #f1f1f1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: #111;
    font-size: 15px;
}

.comment-time {
    font-size: 12px;
    color: #888;
}

.comment-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

.related-bottom {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid var(--border-color);
}

.related-bottom h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-bottom h3 i {
    color: var(--primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-bottom .card-img-wrap {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
}

.related-bottom .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-bottom .card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.page-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 20px;
    min-height: 50vh;
}

.page-container h1 {
    font-size: 38px;
    margin-bottom: 25px;
    font-weight: 700;
}

.page-container h2 {
    font-size: 20px;
    margin: 30px 0 10px;
    font-weight: 600;
    color: var(--primary);
}

.page-container p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 15px;
    color: #555;
}

.page-container ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.page-container li {
    font-size: 15px;
    color: #555;
    margin-bottom: 8px;
}

.newsletter {
    background: var(--bg-hero, #eef2ff);
    padding: 50px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.newsletter-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.newsletter-text {
    display: flex;
    align-items: center;
    gap: 24px;
}

.newsletter-text i {
    font-size: 48px;
    color: var(--primary);
}

.newsletter-text h3 {
    font-size: 20px;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 700;
}

.newsletter-text p {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.newsletter-form {
    display: flex;
    flex: 1;
    max-width: 550px;
    margin: 0 40px;
    background: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.newsletter-form input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    border-radius: 30px 0 0 30px;
    outline: none;
    font-size: 15px;
}

.newsletter-form button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 0 30px 30px 0;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    transition: 0.2s;
}

.newsletter-form button:hover {
    background: var(--primary-hover, #4f46e5);
}

.social-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.social-links span {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: 0.2s;
}

.social-icons a:hover {
    color: #fff;
    background: var(--primary);
}

footer {
    padding: 30px 0;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    background: #fdfdfd;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 25px;
    text-transform: uppercase;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
}

.footer-logo i {
    color: var(--primary);
}

.small-container {
    max-width: 800px;
    margin: 0 auto;
}

.category-container {
    max-width: 960px;
}

.trending-title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}


.custom-article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.list-item {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    text-decoration: none;
    color: #111;
    transition: opacity 0.2s;
}

.list-item:hover {
    opacity: 0.8;
}

.list-img {
    width: 320px;
    flex-shrink: 0;
}

.list-img img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.list-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.list-badge {
    width: fit-content;
    margin-bottom: 10px;
    padding: 4px 10px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.list-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.list-excerpt {
    color: #555;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-meta {
    font-size: 0.9rem;
    color: #777;
}

.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-paginate {
    background-color: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

.btn-paginate:hover {
    background-color: var(--primary-hover, #4f46e5);
    color: #fff;
}

.paginate-info {
    font-weight: 600;
    color: #555;
}

.embed,
.youtube {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
    background: #000;
}

.embed iframe,
.youtube iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.category-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.category-sidebar .sidebar-sticky {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.ad-wrapper {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    overflow: hidden;
}

.ad-wrapper .ad-label {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.category-sidebar {
    min-width: 0;
    max-width: 100%;
}

.ad-wrapper {
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.ad-wrapper iframe,
.ad-wrapper ins,
.ad-wrapper img,
.ad-wrapper object,
#adSlotSidebar1,
#adSlotSidebar2 {
    max-width: 100% !important;
}

@media (max-width: 480px) {
    .ad-wrapper {
        padding: 5px;
    }
}

@media (max-width: 1200px) {
    .hero-content {
        max-width: 80%;
    }
    .newsletter-form {
        margin: 0 20px;
    }
}

@media (max-width: 1024px) {

html, body {
    overflow-x: hidden;
}

    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .grid-8 { grid-template-columns: repeat(4, 1fr); }
    
    .hero-inner {
        grid-template-columns: 1fr;
    }
    
    .hero-main {
        min-height: 400px;
    }
    
    .hero-main::before {
        width: 100%;
        opacity: 0.4;
        -webkit-mask-image: none;
        mask-image: none;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .newsletter-inner {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .newsletter-text {
        flex-direction: column;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .category-sidebar .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        border-top: 1px solid var(--border-color);
        gap: 15px;
    }

    .nav-links.show {
        display: flex;
    }

    .nav-links li.active a {
        border-bottom: none;
    }

    .grid-5, .grid-6, .grid-8 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-inner {
        flex-direction: column;
        gap: 20px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 36px;
    }
    
    .related-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .related-inline-img {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .article-content table {
        display: block; 
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    
    .article-content table tbody,
    .article-content table thead {
        display: table;
        min-width: 100%;
    }

    .list-item {
        flex-direction: column;
        gap: 15px;
    }
    .list-img {
        width: 100%;
    }
    .list-img img {
        height: auto;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .grid-5, .grid-6, .grid-8 {
        grid-template-columns: 1fr;
    }
    
    .hero-main {
        padding: 30px 20px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .newsletter-form {
        flex-direction: column;
        border-radius: 12px;
        background: transparent;
        box-shadow: none;
        width: 100%;
        margin: 0;
        display: block;
    }
    
    .newsletter-form input {
        border-radius: 8px;
        margin-bottom: 10px;
        border: 1px solid #ddd;
    }
    
    .newsletter-form button {
        border-radius: 8px;
        padding: 15px;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding-left: 20px;
        padding-right: 20px;
    }

    .list-img {
        width: auto;
    }

    .article-header h1 {
        font-size: 28px;
    }
}

/* ==========================================
   WATCH PAGE CSS
   ========================================== */
.video-container { 
    position: relative; 
    width: 100%; 
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0; 
    background: #000; 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); 
}
.video-container iframe { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    border: 0; 
}
#current-title {
    margin-top: 20px;
    font-family: var(--font-heading);
    color: #222;
}

/* Grid 5 cột cho Playlist */
.watch-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.watch-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.watch-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.watch-item.active {
    border-color: var(--accent-pink);
    background-color: var(--accent-pink-light);
    box-shadow: 0 0 0 2px var(--accent-pink);
}

.watch-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.watch-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.watch-item:hover .watch-thumb img {
    transform: scale(1.05);
}

.watch-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.watch-play-overlay i {
    color: white;
    font-size: 24px;
    background: var(--accent-pink);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.watch-item:hover .watch-play-overlay {
    opacity: 1;
}

.watch-item:hover .watch-play-overlay i {
    transform: scale(1);
}

.watch-info {
    padding: 12px;
}

.watch-info h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.text-truncate-2 { 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    overflow: hidden; 
}

.watch-playlist-wrapper {
    margin-top: 60px;
}

@keyframes popIn {
    0% { opacity: 0; transform: translateY(10px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.btn-aff-anim {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Responsive cho danh sách video */
@media (max-width: 1200px) {
    .watch-grid-5 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 992px) {
    .watch-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .watch-grid-5 { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .watch-playlist-wrapper {
        margin-top: 40px;
    }
}
@media (max-width: 480px) {
    .watch-grid-5 { grid-template-columns: 1fr; }
    .watch-thumb { aspect-ratio: auto; height: 180px; }
    .watch-playlist-wrapper {
        margin-top: 30px;
    }
}

.animal-card .card-img-wrap {
    aspect-ratio: 4/5;
    border-radius: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.nature-card .card-img-wrap {
    aspect-ratio: 12/9;
    border-radius: 12px;
}

.nature-card .card-title {
    position: absolute;
    bottom: 0px;
    left: 0;
    right: 0;
    padding: 40px 10px 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: white;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rating-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: #2e7d32;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.rating-badge i {
    color: #ff9800;
}

.gallery-item img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 4px solid #eef2ff;
    transition: border 0.3s, transform 0.3s;
}

.gallery-item:hover img {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.hero-main {
    border-radius: 24px; 
}

.trending-now {
    border-radius: 24px;
}

/* ==========================================
   SPECIAL NEWS SECTION LAYOUT
   ========================================== */
.news-special-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Kiểu dáng cho bài viết lớn (Bên trái) */
.news-large-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.2s;
}

.news-large-card:hover {
    transform: translateY(-5px);
}

.news-large-card .card-img-wrap {
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.news-large-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-large-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-large-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Kiểu dáng cho danh sách bài viết nhỏ (Bên phải) */
.news-small-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-small-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-light);
    padding: 12px;
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s;
    border: 1px solid var(--border-color);
}

.news-small-card:hover {
    background: #fff;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-color: var(--primary);
}

.news-small-img-wrap {
    width: 140px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.news-small-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-small-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.card-badge-text {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-small-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hỗ trợ Responsive (Tablet & Mobile) */
@media (max-width: 992px) {
    .news-special-layout {
        grid-template-columns: 1fr;
    }
    .news-large-card .card-img-wrap {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 480px) {
    .news-small-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .news-small-img-wrap {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }
    
    .news-large-title {
        font-size: 22px;
    }
}