/*
 * Total Hydronic Blog – Extra Styles
 * Matching layout and font sizing of https://www.totalelectricsandac.com.au/blog/
 */

/* ── Reset WP block theme defaults that clash ── */
:root {
    --wp--style--global--content-size: 1200px;
    --wp--style--global--wide-size: 1200px;
}

/* Ensure pageWrapper wraps correctly on blog */
body.th-blog-page .pageWrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.th-blog-page .wp-site-blocks {
    flex: 1;
}

/* Remove WP block theme default top padding that may conflict */
body.th-blog-page .wp-site-blocks > * {
    padding-top: 0;
    padding-bottom: 0;
}

/* Ensure the overlay element sits correctly */
body.th-blog-page .overlay {
    display: none;
}
body.th-blog-page.nav-open .overlay {
    display: block;
}

/* ── Fix blog header top spacing (WP admin bar offset) ── */
body.th-blog-page.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.th-blog-page.admin-bar header {
        top: 46px;
    }
}

/* ── Blog post content typography ── */
body.th-blog-page .entry-content,
body.th-blog-page .wp-block-post-content {
    font-family: inherit;
    color: inherit;
}

/* ── Ensure footer stays at bottom ── */
body.th-blog-page footer {
    margin-top: auto;
}

/* ── Focus outline reset for site blocks ── */
:where(.wp-site-blocks :focus),
:where(.wp-site-blocks *:focus) {
    outline: 0 !important;
}

/* ─── Reference Site Layout & Typography: totalelectricsandac.com.au/blog/ ─── */

/* Hero Banner & Spacing */
.top-banner {
    position: relative;
    width: 100%;
    overflow: hidden;
    max-height: 370px;
    background-color: #05007F;
    margin-bottom: 80px;
}

.top-banner img.img-fullwidth {
    width: 100%;
    height: 370px;
    object-fit: cover;
    display: block;
}

.top-banner .wrapper-center-50 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    z-index: 2;
    padding: 0 15px;
}

.top-banner .wrapper-center-50 h1 {
    color: #ffffff;
    font-size: 36px;
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Container & Layout */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px 40px 15px;
    width: 100%;
}

#primary.content-area,
#main.site-main {
    width: 100%;
}

/* Article Cards Grid Layout */
article.post {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.article-post-first {
    padding-right: 10px;
}

.featured-media {
    margin: 0;
}

.featured-media-inner {
    overflow: hidden;
    border-radius: 6px;
}

.featured-media-inner a {
    display: block;
}

.featured-media-inner img.wp-post-image {
    width: 100%;
    height: 165px;
    object-fit: cover;
    display: block;
    border-radius: 6px;
    transition: transform 0.3s ease;
}

article.post:hover img.wp-post-image {
    transform: scale(1.04);
}

.article-post-second {
    padding-left: 10px;
}

.entry-header {
    margin-bottom: 8px;
}

/* Post Title Sizing as per Reference (21px / 1.3125rem) */
.entry-title,
.entry-title.heading-size-1 {
    font-size: 21px;
    font-size: 1.3125rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px 0;
}

.entry-title a {
    color: #05007F;
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry-title a:hover {
    color: #C1252F;
}

/* Excerpt / Summary Text Sizing as per Reference (16px / 1rem) */
.post-inner .entry-content p,
.entry-content p {
    font-size: 16px;
    font-size: 1rem;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

/* Single Post View Typography & Layout matching Reference Site */
body.single-post,
body.single,
body.single-post .pageWrapper > .wrapper,
body.single .pageWrapper > .wrapper {
    background-color: #FFFFFF !important;
}

body.single-post .pageWrapper > .wrapper,
body.single .pageWrapper > .wrapper {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.single-post-article {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    box-shadow: none;
}

.single-post .entry-header {
    margin-top: 10px;
    margin-bottom: 25px;
}

.single-post .entry-title {
    font-size: 36px;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #05007F;
    margin: 0 0 20px 0;
}

.single-post figure.featured-media {
    margin-bottom: 30px;
    max-height: none;
}

.single-post .featured-media-inner img.wp-post-image {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.single-post .post-inner.thin {
    width: auto;
    -webkit-box-orient: revert;
    display: contents;
    -webkit-line-clamp: revert;
    overflow: auto;
}

.single-post .entry-content {
    font-size: 17px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #333333;
}

.single-post .entry-content p {
    font-size: 17px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #333333;
    margin-bottom: 20px;
}

.single-post h2,
.single-post .entry-content h2 {
    color: #05007F;
    font-size: 28px;
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 50px !important;
    margin-bottom: 15px;
    line-height: 1.3;
}

.single-post h3,
.single-post .entry-content h3 {
    color: #05007F;
    font-size: 22px;
    font-size: 1.375rem;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.single-post .entry-content ul,
.single-post .entry-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
    font-size: 17px;
    line-height: 1.8;
    color: #333333;
}

.single-post .entry-content li {
    margin-bottom: 8px;
}

.single-post .entry-content a {
    color: #05007F;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.single-post .entry-content a:hover {
    color: #C1252F;
}

}

/* Single Post Prev / Next Navigation */
.pagination-single {
    margin-top: 40px;
    margin-bottom: 30px;
}

.pagination-single hr.styled-separator {
    border: none;
    border-top: 1px solid #eee;
    margin: 25px 0;
}

.pagination-single-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.pagination-single-inner a.previous-post,
.pagination-single-inner a.next-post {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #05007F;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.4;
    transition: color 0.2s ease;
    max-width: 48%;
}

.pagination-single-inner a.next-post {
    margin-left: auto;
    text-align: right;
    justify-content: flex-end;
}

.pagination-single-inner a.previous-post:hover,
.pagination-single-inner a.next-post:hover {
    color: #C1252F;
}

.pagination-single-inner .arrow {
    display: none !important;
}

.pagination-single-inner .title-inner {
    display: inline-block;
}

/* Responsive Media Queries for Banner Spacing & Layout */
@media (min-width: 768px) and (max-width: 1279px) {
    .top-banner {
        margin-bottom: 40px;
    }
}

@media screen and (max-width: 767px) {
    .top-banner {
        max-height: 220px;
        margin-bottom: 20px;
    }

    .top-banner img.img-fullwidth {
        height: 220px;
    }

    .top-banner .wrapper-center-50 h1 {
        font-size: 26px;
        font-size: 1.625rem;
    }

    .entry-title,
    .entry-title.heading-size-1 {
        font-size: 19px;
        font-size: 1.1875rem;
    }

    .article-post-first {
        padding-right: 15px;
    }

    .article-post-second {
        padding-left: 15px;
        margin-top: 15px !important;
    }

    .featured-media-inner img.wp-post-image {
        height: auto;
    }

    .single-post .entry-title {
        font-size: 24px;
        font-size: 1.5rem;
        margin-bottom: 15px;
    }

    .single-post h2,
    .single-post .entry-content h2 {
        font-size: 22px;
        font-size: 1.375rem;
        margin-top: 30px !important;
    }

    .single-post h3,
    .single-post .entry-content h3 {
        font-size: 19px;
        font-size: 1.1875rem;
        margin-top: 20px;
    }

    .single-post .entry-content p,
    .single-post .entry-content ul,
    .single-post .entry-content ol {
        font-size: 15px;
        line-height: 1.7;
    }

    .pagination-single-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .pagination-single-inner a.previous-post,
    .pagination-single-inner a.next-post {
        max-width: 100%;
        width: 100%;
    }

    .pagination-single-inner a.next-post {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Blog Index Page Numeric Pagination */
.blog-pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
    margin-bottom: 50px;
    width: 100%;
}

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: wrap;
}

.blog-pagination li.page-item {
    margin: 0;
    padding: 0;
    list-style: none !important;
}

.blog-pagination a.page-numbers,
.blog-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 4px;
    border: 1px solid #05007F;
    color: #05007F;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    background: #FFFFFF;
}

.blog-pagination a.page-numbers:hover {
    background: #C1252F;
    border-color: #C1252F;
    color: #FFFFFF !important;
}

.blog-pagination span.page-numbers.current {
    background: #05007F;
    border-color: #05007F;
    color: #FFFFFF !important;
}

.blog-pagination a.prev.page-numbers,
.blog-pagination a.next.page-numbers {
    padding: 0 18px;
}



