/* assets/css/viewpost.css */

/* --- PAGE WRAPPER --- */
.post-page-wrapper {
    background-color: #fdfdfd;
    padding: 50px 0;
}

/* --- THE MAIN GRID LAYOUT --- */
.post-layout-grid {
    display: grid;
    /* Left Column (Main) takes available space, Right (Sidebar) takes 320px */
    grid-template-columns: 1fr 340px; 
    gap: 50px;
    align-items: start; /* Align to top */
}

/* --- LEFT COLUMN: MAIN CONTENT --- */
.post-main-column {
    background: transparent;
    /* Optional: Add background: white; padding: 30px; border-radius: 12px; box-shadow... if you want it boxed */
}

/* --- RIGHT COLUMN: SIDEBAR --- */
.post-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- SIDEBAR WIDGETS --- */
.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.sidebar-widget h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar Lists (Trending/Related) */
.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f9fafb;
}

.sidebar-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-list a {
    text-decoration: none;
    display: block;
    transition: transform 0.2s;
}

.sidebar-list a:hover {
    transform: translateX(3px);
}

.side-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
    margin-bottom: 3px;
}

.sidebar-list a:hover .side-title { color: #0056b3; }

.side-views {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
}

.side-arrow {
    color: #0056b3;
    font-weight: bold;
    margin-right: 5px;
}

/* Social Widget */
.social-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    color: white;
    transition: opacity 0.2s;
    gap: 10px;
}

.social-link:hover { opacity: 0.9; }
.social-link.telegram { background: #0088cc; }
.social-link.youtube { background: #ff0000; }

/* Ad Widget Placeholder */
.ad-placeholder {
    background: #f3f4f6;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 12px;
    border-radius: 6px;
    border: 1px dashed #d1d5db;
}

/* --- HEADER STYLES (Existing) --- */
.post-view-header { margin-bottom: 30px; }
.header-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.category-pill { background: #0056b3; color: white; padding: 5px 12px; border-radius: 50px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.view-counter { color: #666; font-size: 13px; font-weight: 600; }
.post-main-title { font-size: 36px; font-weight: 900; margin-bottom: 15px; line-height: 1.2; color: #111827; }
.post-subtitle { color: #0056b3; margin-top: 0; margin-bottom: 15px; font-weight: 600; font-size: 18px; }
.post-meta { color: #6b7280; border-bottom: 1px solid #eee; padding-bottom: 15px; font-size: 13px; }

/* --- DOWNLOAD BOX (Existing) --- */
.download-box {
    background: #f0f9ff; border: 2px dashed #0056b3; border-radius: 10px; padding: 20px;
    margin-bottom: 30px; display: flex; align-items: center; gap: 15px; justify-content: space-between;
}
.download-icon { font-size: 24px; background: white; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.download-info h4 { margin: 0 0 4px 0; color: #0056b3; font-weight: 700; font-size: 15px; }
.download-info p { margin: 0; font-size: 12px; color: #555; }
.btn-download { background: #0056b3; color: white; text-decoration: none; padding: 10px 20px; border-radius: 6px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.btn-download:hover { background: #004494; }

/* --- MAIN CONTENT (TinyMCE) --- */
.post-full-content { font-size: 18px; line-height: 1.7; color: #374151; }
.post-full-content p { margin-bottom: 20px; }
.post-full-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 25px 0; display: block; }
.post-full-content blockquote { border-left: 4px solid #0056b3; padding-left: 15px; font-style: italic; color: #4b5563; margin: 25px 0; background: #f9fafb; padding: 12px 15px; }

/* --- FOOTER --- */
.post-footer { margin-top: 50px; padding: 20px 0; border-top: 1px solid #e5e7eb; }
.back-link { text-decoration: none; color: #0056b3; font-weight: 700; }

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 992px) {
    .post-layout-grid {
        grid-template-columns: 1fr; /* Stack into 1 column */
        gap: 40px;
    }

    .post-sidebar {
        order: 2; /* Ensure sidebar is below content on mobile */
    }
    
    .post-main-title { font-size: 28px; }
    
    .download-box { flex-direction: column; text-align: center; }
    .btn-download { width: 100%; display: block; text-align: center; }
}