/* News Page Specific Styles */
.page-header {
    background-color: #f9f9ff;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.05;
    z-index: 1;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: var(--text-color);
    opacity: 0.05;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--text-color);
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.sidebar-widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.sidebar-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    color: var(--text-color);
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 74, 173, 0.1);
}

.category-link:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.category-count {
    background-color: rgba(0, 74, 173, 0.1);
    color: var(--text-color);
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    transition: all 0.2s ease;
}

.category-link:hover .category-count {
    background-color: var(--primary-color);
    color: white;
}

.popular-post {
    display: flex;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 74, 173, 0.1);
}

.popular-post:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-image {
    width: 80px;
    height: 60px;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content {
    flex: 1;
}

.popular-post-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-post-title a {
    color: var(--text-color);
    transition: all 0.2s ease;
}

.popular-post-title a:hover {
    color: var(--primary-color);
}

.popular-post-date {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
    display: flex;
    align-items: center;
}

.popular-post-date svg {
    margin-right: 0.25rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud .tag {
    background-color: rgba(0, 74, 173, 0.1);
    color: var(--text-color);
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    transition: all 0.2s ease;
}

.tag-cloud .tag:hover {
    background-color: var(--primary-color);
    color: white;
}

.search-form {
    display: flex;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 74, 173, 0.2);
    border-radius: 0.5rem 0 0 0.5rem;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-button:hover {
    background-color: #e02e6c;
}

.news-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.news-card-image {
    height: 200px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-card-category {
    display: inline-block;
    background-color: rgba(250, 60, 128, 0.1);
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.news-card-category:hover {
    background-color: var(--primary-color);
    color: white;
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    color: var(--text-color);
    transition: all 0.2s ease;
}

.news-card-title a:hover {
    color: var(--primary-color);
}

.news-card-excerpt {
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: auto;
}

.news-card-date, .news-card-author {
    display: flex;
    align-items: center;
}

.news-card-date svg, .news-card-author svg {
    margin-right: 0.25rem;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.pagination-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    border-radius: 50%;
    background-color: white;
    color: var(--text-color);
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination-item:hover, .pagination-item.active {
    background-color: var(--primary-color);
    color: white;
}

.pagination-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem;
    border-radius: 50%;
    background-color: white;
    color: var(--text-color);
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination-arrow:hover {
    background-color: var(--primary-color);
    color: white;
}

.pagination-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-arrow.disabled:hover {
    background-color: white;
    color: var(--text-color);
}

/* Slider styles */
.slider {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.slider-item {
    flex: 0 0 100%;
    position: relative;
}

.slider-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.slider-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: white;
}

.slider-category {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
}

.slider-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    -webkit-line-clamp: 2; /* Giới hạn số dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
}

.slider-meta {
    display: flex;
    font-size: 0.85rem;
    opacity: 0.8;
}

.slider-date {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.slider-date svg {
    margin-right: 0.25rem;
}

.slider-controls {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.slider-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-arrow:hover {
    background-color: var(--primary-color);
}

.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 74, 173, 0.2);
    border-radius: 0.5rem 0 0 0.5rem;
    outline: none;
}

.newsletter-input:focus {
    border-color: var(--primary-color);
}

.newsletter-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-button:hover {
    background-color: #e02e6c;
}

/* Related Articles */
.related-articles {
    margin-top: 3rem;
}

.related-articles-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.related-article {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-article-image {
    height: 180px;
    overflow: hidden;
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.related-article:hover .related-article-image img {
    transform: scale(1.1);
}

.related-article-content {
    padding: 1.25rem;
}

.related-article-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-color);
}

.related-article-title a {
    color: var(--text-color);
    transition: all 0.2s ease;
}

.related-article-title a:hover {
    color: var(--primary-color);
}

.related-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.related-article-date {
    display: flex;
    align-items: center;
}

.related-article-date svg {
    margin-right: 0.25rem;
}

/* Table of Contents */
.toc-container {
    position: fixed;
    top: 12vw;
    right: 29vw;
    transform: translateY(-50%);
    z-index: 100;
    transition: all 0.3s ease;
}

@media (min-width: 1024px) {
    .toc-container {
        position: fixed;
        top: 12vw;
        right: 30vw;
        transform: translateY(-50%);
        z-index: 100;
        transition: all 0.3s ease;
    }
}

.toc-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(250, 60, 128, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.toc-toggle:hover {
    background-color: #e02e6c;
    transform: scale(1.1);
}

.toc {
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transform: translateX(120%);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.toc.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.toc-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toc-title svg {
    margin-right: 0.5rem;
}

.toc-close {
    cursor: pointer;
    color: var(--text-color);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.toc-close:hover {
    opacity: 1;
    color: var(--primary-color);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.5rem;
}

.toc-link {
    display: flex;
    align-items: center;
    color: var(--text-color);
    padding: 0.5rem 0;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.toc-link:hover {
    color: var(--primary-color);
    padding-left: 0.5rem;
}

.toc-link svg {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.toc-link.level-2 {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

.toc-indicator {
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .toc-container {
        bottom: 10vh;
        top: auto;
        right: 20px;
        transform: none;
    }

    .toc {
        bottom: 0;
        top: auto;
        right: 0;
        max-height: 60vh;
        width: 280px;
    }
}
@media (min-width: 2560px) {
    .toc-container {
        position: fixed;
        top: 14vw;
        right: 35vw;
        transform: translateY(-50%);
        z-index: 100;
        transition: all 0.3s ease;
    }
}

/* Article Page Specific Styles */
.page-header {
    background-color: #f9f9ff;
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.05;
    z-index: 1;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background-color: var(--text-color);
    opacity: 0.05;
    z-index: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    color: var(--text-color);
    opacity: 0.7;
    font-size: 0.9rem;
}

.breadcrumb-item a {
    color: var(--text-color);
    transition: all 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

.breadcrumb-separator {
    margin: 0 0.5rem;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
}

.article-meta-item {
    display: flex;
    align-items: center;
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.article-meta-item svg {
    margin-right: 0.5rem;
}

.article-category {
    display: inline-block;
    background-color: rgba(250, 60, 128, 0.1);
    color: var(--primary-color);
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.article-category:hover {
    background-color: var(--primary-color);
    color: white;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 2.5rem 0 1.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 2rem 0 1.25rem;
}

.article-content ul, .article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: all 0.2s ease;
}

.article-content a:hover {
    color: #e02e6c;
}

.article-image {
    border-radius: 0.5rem;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-image img {
    width: 100%;
    height: auto;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 74, 173, 0.1);
}

.article-tag {
    background-color: rgba(0, 74, 173, 0.1);
    color: var(--text-color);
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 1rem;
    transition: all 0.2s ease;
}

.article-tag:hover {
    background-color: var(--primary-color);
    color: white;
}

.article-share {
    display: flex;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 74, 173, 0.1);
}

.article-share-title {
    font-weight: 600;
    margin-right: 1rem;
}

.article-share-buttons {
    display: flex;
    gap: 0.5rem;
}

.article-share-button {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 74, 173, 0.1);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.article-share-button:hover {
    background-color: var(--primary-color);
    color: white;
}

.article-author {
    display: flex;
    align-items: center;
    background-color: #f9f9ff;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 3rem;
}

.article-author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.article-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-author-content {
    flex: 1;
}

.article-author-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.article-author-bio {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.article-author-social {
    display: flex;
    gap: 0.5rem;
}

.article-author-social-link {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 74, 173, 0.1);
    color: var(--text-color);
    transition: all 0.2s ease;
}

.article-author-social-link:hover {
    background-color: var(--primary-color);
    color: white;
}