/* Shared Sidebar Styling for News Detail Pages */

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
    transition: box-shadow 0.3s ease;
}

.sidebar-widget:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #0a0e27;
    position: relative;
    padding-bottom: 15px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color, #16cde9);
    border-radius: 2px;
}

.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-post-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    margin-bottom: 5px;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}

.recent-post-item:hover {
    background: #f8fafc;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border-color: #e2e8f0;
}

.recent-post-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.4s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.recent-post-item:hover .recent-post-img {
    transform: scale(1.05);
}

.recent-post-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recent-post-info h5 {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 6px;
    font-weight: 600;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-item:hover .recent-post-info h5 {
    color: var(--primary-color, #16cde9);
}

.recent-post-info span {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.recent-post-info span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 50%;
}

/* ==========================================================================
   2-Column Grid News Layout
   ========================================================================== */

/* Reading Progress Bar */
.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 9999;
    background: transparent;
    pointer-events: none;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #16cde9, #0ea5e9);
    width: 0%;
    transition: width 0.1s;
    box-shadow: 0 0 10px rgba(22, 205, 233, 0.5);
}

/* Main Layout: 2 Columns */
.news-detail-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Left (2 parts), Right (1 part) */
    gap: 50px;
    align-items: flex-start;
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 30px;
}

.news-detail-main {
    width: 100%;
    min-width: 0;
}

/* Sidebar Styling (Right Column) */
.news-sidebar {
    position: sticky;
    top: 120px;
    width: 100%;
    margin-top: 0;
    border-top: none;
    padding-top: 0;
}

.sidebar-widget {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eee;
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #0a0e27;
    text-align: left;
    position: relative;
    padding-bottom: 15px;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--primary-color, #16cde9);
    border-radius: 2px;
    transform: none;
    /* Reset center align */
}

/* Vertical List for Sidebar */
.recent-posts-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.recent-post-item {
    display: flex;
    flex-direction: row;
    /* Side by side image and text */
    gap: 15px;
    padding: 10px;
    margin-bottom: 0;
    align-items: center;
    background: transparent;
    border-radius: 12px;
    box-shadow: none;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    text-decoration: none;
    height: auto;
}

.recent-post-item:hover {
    background: #f8fafc;
    transform: translateX(5px);
    /* Slide right instead of lift */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border-color: #e2e8f0;
}

.recent-post-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 0;
    object-fit: cover;
}

.recent-post-info {
    padding: 0;
    flex: 1;
}

.recent-post-info h5 {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 5px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recent-post-item:hover .recent-post-info h5 {
    color: var(--primary-color, #16cde9);
}

.recent-post-info span {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
}

/* News Article Card (Left Column) */
.news-article-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    margin-bottom: 0;
}

.news-article-img-wrapper {
    position: relative;
    height: 450px;
    overflow: hidden;
}

.news-article-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.news-article-card:hover .news-article-img {
    transform: scale(1.05);
}

.news-content-pad {
    padding: 50px;
}

/* Meta Data Styles */
.news-meta-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 25px;
}

/* Typography Reset */
.article-body h2 {
    text-align: left;
    font-size: 2.2rem;
    color: #0a0e27;
    margin-bottom: 25px;
    line-height: 1.3;
}

.article-body {
    color: #475569;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Media Queries */
@media (max-width: 992px) {
    .news-detail-layout {
        grid-template-columns: 1fr;
        /* Stack on smaller screens */
        gap: 40px;
    }

    .news-sidebar {
        position: static;
        margin-top: 20px;
    }

    .sidebar-title {
        text-align: left;
    }

    .sidebar-title::after {
        left: 0;
        transform: none;
    }

    .recent-posts-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}