/* Separate CSS for Post/Page layout with right sidebar */

/***** Make the entire page white for these templates *****/
body.single,
body.page-template-page-right-sidebar,
body.single .site,
body.page-template-page-right-sidebar .site {
    background: #fff !important;
}

/* Use white background across this layout */
.post-layout-right-sidebar {
    background: #fff;
}

/* Wrapper centers the two-column block horizontally and constrains width */
.post-layout-right-sidebar {
    display: flex;
    justify-content: center; /* center the grid in the viewport */
    align-items: flex-start;
    width: 100%;
}

/* Container */
.post-layout-right-sidebar .post-layout-container {
    max-width: 1100px; /* tighter like screenshot */
    width: 100%;
    margin: 24px auto; /* ensure centered with auto margins */
    padding: 0 16px;
    display: grid;
    /* fixed content width similar to reference for perfect centering */
    grid-template-columns: 720px 320px; /* content + sidebar */
    gap: 28px; /* reduce gap so content shifts closer to center */
    align-items: start;
}

/* Allow content to shrink on smaller screens before stacking */
@media (max-width: 1100px) {
    .post-layout-right-sidebar .post-layout-container {
        grid-template-columns: minmax(0, 680px) 320px;
    }
}

/* Content */
.post-layout-right-sidebar .post-layout-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 24px;
}

.post-layout-right-sidebar .entry-title {
    margin: 0 0 10px 0;
    font-size: 30px;
    color: #1e4a72;
}

.post-layout-right-sidebar .entry-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 12px 0 18px 0;
}

.post-layout-right-sidebar .entry-content {
    color: #333;
    line-height: 1.7;
}

.post-layout-right-sidebar .entry-content p { margin: 0 0 1em 0; }
.post-layout-right-sidebar .entry-content h2 { margin-top: 1.2em; }
.post-layout-right-sidebar .entry-content ul { padding-left: 18px; }

.post-layout-right-sidebar .entry-footer {
    margin-top: 20px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: #666;
}

/* Sidebar */
.post-layout-right-sidebar .post-layout-sidebar {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 16px;
}

.post-layout-right-sidebar .widget { margin-bottom: 18px; }
.post-layout-right-sidebar .widgettitle {
    font-size: 16px;
    margin: 0 0 10px 0;
    background: #d32f2f; /* red heading */
    color: #fff;         /* white text */
    padding: 10px 14px;
    border-radius: 6px;
}

/* Media handling inside content */
.post-layout-right-sidebar .entry-content img,
.post-layout-right-sidebar .entry-content video,
.post-layout-right-sidebar .entry-content iframe,
.post-layout-right-sidebar .entry-content embed {
    max-width: 100%;
    height: auto;
}

/* Responsive tables */
.post-layout-right-sidebar .entry-content table {
    width: 100% !important;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
}
.post-layout-right-sidebar .entry-content th,
.post-layout-right-sidebar .entry-content td {
    padding: 8px;
}

/* Long code blocks scroll on small screens */
.post-layout-right-sidebar .entry-content pre {
    overflow: auto;
    max-width: 100%;
}

/* Responsive */
@media (max-width: 1200px) {
    .post-layout-right-sidebar .post-layout-container { max-width: 1000px; }
}
@media (max-width: 992px) {
    .post-layout-right-sidebar .post-layout-container {
        grid-template-columns: 1fr; /* stack */
    }
    .post-layout-right-sidebar .post-layout-sidebar {
        order: 2;
    }
}
@media (max-width: 600px) {
    .post-layout-right-sidebar .post-layout-content { padding: 18px; }
    .post-layout-right-sidebar .entry-title { font-size: 24px; }
}