/* News Pages Styles */

/* Page Header */
.page-header {
    padding: 8rem 0 4rem;
    background: linear-gradient(to bottom, #111827, #1f2937);
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(
        circle at top right,
        rgba(34, 197, 94, 0.1),
        transparent 50%
    );
}
.page-header-content {
    text-align: center;
    position: relative;
    z-index: 1;
}
.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}
.page-subtitle {
    font-size: 1.125rem;
    color: #9ca3af;
    max-width: 600px;
    margin: 0 auto;
}

/* News List Section */
.news-list-section {
    padding: 4rem 0;
    background: #f9fafb;
}
.news-list-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* News Detail */
.news-detail {
    padding: 6rem 0 3rem;
    background: #fff;
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.breadcrumb a {
    color: #6b7280;
    font-size: 0.875rem;
    transition: color 0.3s;
}
.breadcrumb a:hover {
    color: #22c55e;
}
.breadcrumb i {
    color: #9ca3af;
    flex-shrink: 0;
    font-size: 12px;
}

.breadcrumb i.fa-house {
    font-size: 14px;
}
.breadcrumb span {
    color: #374151;
    font-size: 0.875rem;
}

/* Post Detail Two Column Layout - Grid 9-3 */
.post-detail-wrapper {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 30px;
    padding: 30px 0 50px;
    align-items: flex-start;
}

.post-detail-main {
    min-width: 0;
}

.post-detail-sidebar {
    position: sticky;
    top: 160px;
    align-self: start;
}

.post-detail-wrapper.no-sidebar {
    grid-template-columns: 1fr !important;
}

.post-detail-wrapper.no-sidebar .post-detail-main {
    max-width: 900px;
    margin: 0 auto;
}

.post-detail-wrapper.no-sidebar .post-detail-sidebar {
    display: none !important;
}

@media (max-width: 991px) {
    .post-detail-wrapper {
        grid-template-columns: 1fr !important;
    }

    .post-detail-main {
        max-width: 100%;
        width: 100%;
    }

    .post-detail-sidebar {
        order: 2;
        position: relative;
        top: 0;
        margin-top: 0px !important;
        background: #fff;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    }
}

/* Article Header */
.article-header {
    margin-bottom: 2rem;
}
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.article-category {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(to right, #22c55e, #3b82f6);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}
.article-date {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}
.article-date svg {
    color: #9ca3af;
}
.article-title {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

/* Article Image */
.article-image {
    margin-bottom: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Featured Image - Fixed Size */
.article-featured-image {
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 768px) {
    .article-featured-image {
        height: 280px;
    }
}

@media (max-width: 480px) {
    .article-featured-image {
        height: 200px;
    }
}

/* Article Body */
.article-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
}
.article-body p {
    margin-bottom: 1.5rem;
}
.article-body h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 2.5rem 0 1rem;
}
.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 2rem 0 0.75rem;
}
.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}
.article-body li {
    margin-bottom: 0.5rem;
}
.article-body blockquote {
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(
        to right,
        rgba(34, 197, 94, 0.1),
        rgba(59, 130, 246, 0.1)
    );
    border-left: 4px solid #22c55e;
    border-radius: 0 1rem 1rem 0;
    font-style: italic;
    color: #374151;
}
.article-body blockquote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 500;
    color: #6b7280;
}

/* Article Footer */
.article-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}
.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.article-share span {
    color: #6b7280;
    font-size: 0.875rem;
}
.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    transition: all 0.3s;
}
.share-btn.facebook {
    background: #1877f2;
    color: #fff;
}
.share-btn.facebook:hover {
    background: #0d65d9;
    transform: scale(1.1);
}
.share-btn.twitter {
    background: #1da1f2;
    color: #fff;
}
.share-btn.twitter:hover {
    background: #0c85d0;
    transform: scale(1.1);
}
.back-to-news {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #22c55e;
    font-weight: 500;
    transition: gap 0.3s;
}
.back-to-news:hover {
    gap: 0.75rem;
    color: #16a34a;
}

/* Related News */
.related-news {
    padding: 4rem 0;
    background: #f9fafb;
}
.related-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
}
.related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Footer Back Link */
.footer-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
    font-size: 0.875rem;
    transition: color 0.3s;
}
.footer-back-link:hover {
    color: #22c55e;
}

/* Responsive */
@media (min-width: 640px) {
    .page-title {
        font-size: 3rem;
    }
    .article-title {
        font-size: 2.5rem;
    }
    .news-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .news-list-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .related-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* News Card Link Wrapper */
.news-card-link-wrap {
    display: block;
    text-decoration: none;
    color: inherit;
}
.news-card-link-wrap .news-card {
    transition: all 0.3s;
}
.news-card-link-wrap:hover .news-card {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
    border-color: #86efac;
}

/* ========== Sidebar - Bài Viết Mới Nhất ========== */
.sidebar-card {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    margin-bottom: 0;
}

.sidebar-card-header {
    background: transparent;
    color: #1a365d;
    padding: 0 0 16px 0;
    border-bottom: 2px solid #22c55e;
}

.sidebar-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #1a365d;
}

/* Sidebar Related Posts List */
.sidebar-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-post-item {
    display: flex;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-post-item:last-child {
    border-bottom: none;
}

.sidebar-post-item:hover {
    background: #f8f9fa;
}

.sidebar-post-thumb {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.sidebar-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sidebar-post-content {
    flex: 1;
    min-width: 0;
}

.sidebar-post-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.sidebar-post-item:hover .sidebar-post-title {
    color: #22c55e;
}

@media (max-width: 576px) {
    .sidebar-post-thumb {
        width: 70px;
        height: 50px;
    }
}
