/* Page Template Layout */
.page-template {
    /* Use block so breadcrumb sits above content, consistent with list pages */
    display: block;
    width: 100%;
    padding: 20px 0;
}

/* Stick the titlebar to the header on default page template */
.page-template .page-titlebar--full {
    margin-top: -20px;
}

.page-template .container {
    /* Column flow: breadcrumb (full row) followed by content layout */
    display: block;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

.page-layout {
    display: flex;
    width: 100%;
    gap: 30px;
}

.page-content {
    flex: 1;
    min-width: 0;
    /* Prevents flexbox overflow */
    background-color: #fff;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.page-sidebar {
    width: 300px;
    flex-shrink: 0;
    background-color: #fff;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}


/* Page Title */
.page-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 1.8em;
    font-weight: 400;
    color: #495057;
    margin: 15px 0 20px;
    border-bottom: none;
}

.page-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 0.8em;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* Content Typography */
.post-body {
    line-height: 1.8;
    color: #333;
    padding-top: 20px;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    margin-top: 24px;
    margin-bottom: 16px;
    font-weight: 700;
    color: #222;
}

.post-body h1 {
    font-size: 2.2em;
}

.post-body h2 {
    font-size: 1.8em;
}

.post-body h3 {
    font-size: 1.5em;
}

.post-body h4 {
    font-size: 1.2em;
}

.post-body h5 {
    font-size: 1.1em;
}

.post-body h6 {
    font-size: 1em;
}

.post-body p {
    margin-bottom: 16px;
}

.post-body ul,
.post-body ol {
    margin-bottom: 16px;
    padding-left: 25px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body a {
    color: #337ab7;
    text-decoration: none;
    transition: color 0.3s;
}

.post-body a:hover {
    color: #23527c;
    text-decoration: underline;
}

.post-body blockquote {
    border-left: 4px solid #eee;
    padding-left: 15px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

.post-body code {
    padding: 2px 4px;
    font-size: 90%;
    color: #c7254e;
    background-color: #f9f2f4;
    border-radius: 4px;
}

.post-body pre {
    display: block;
    padding: 10px;
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.42857143;
    color: #333;
    word-break: break-all;
    word-wrap: break-word;
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .page-layout {
        flex-direction: column;
        gap: 0;
    }

    .page-sidebar{
        width: 100%;
    }

    .page-layout.mobile-sidebar-hidden .page-sidebar {
        display: none;
    }

    .page-content {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* New Page Titlebar Styles */
.page-titlebar {
    position: relative;
    min-height: 295px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-color: #f8f9fa; /* Fallback for no image */
    overflow: hidden;
}

.page-titlebar .parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: none; /* no default image when not provided */
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.page-titlebar .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--titlebar-overlay, rgba(0,0,0,0.22)); /* softer overlay */
    z-index: 2;
}

.page-titlebar .container {
    position: relative;
    z-index: 3;
    padding: 20px;
}

.page-titlebar__title {
    font-size: 2.5em;
    font-weight: 700;
    margin: 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.page-titlebar__breadcrumb {
    margin-top: 10px;
    font-size: 0.9em;
}

.page-titlebar__breadcrumb .breadcrumb {
    display: inline-block;
    padding: 0;
    background: none;
}

.page-titlebar__breadcrumb .breadcrumb a,
.page-titlebar__breadcrumb .breadcrumb .current {
    color: #fff;
    opacity: 0.8;
}

.page-titlebar__breadcrumb .breadcrumb a:hover {
    opacity: 1;
    text-decoration: none;
}

.page-titlebar__breadcrumb .separator {
    color: #fff;
    opacity: 0.8;
    margin: 0 8px;
}
