/*
Theme Name: Signature Joinery
Theme URI: https://signaturejoinery.co.uk/
Author: Leeds Signature Joinery
Description: Custom WordPress blog theme for Leeds Signature Joinery.
Version: 1.0
Text Domain: signaturejoinery
*/

/* =========================================================
   SIGNATURE JOINERY BLOG
   ========================================================= */

.blog-page {
    background: #f5f5f5;
    min-height: 100vh;
}

.blog-hero {
    background: #222;
    padding: 70px 20px;
    text-align: center;
}

.blog-hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.blog-logo {
    display: block;
    max-width: 260px;
    width: 100%;
    height: auto;
    margin: 0 auto 30px;
}

.blog-hero h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-family: "Nanum Myeongjo", serif;
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
}

.blog-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #e6e6e6;
    font-family: "Quicksand", sans-serif;
    font-size: 18px;
    line-height: 1.7;
}

.blog-content {
    padding: 65px 20px 80px;
}

.blog-heading {
    margin-bottom: 30px;
}

.blog-heading h2 {
    margin: 0;
    font-family: "Nanum Myeongjo", serif;
    font-size: 34px;
    color: #222;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border-radius: 3px;
    box-shadow: 0 5px 22px rgba(0, 0, 0, 0.08);
}

.blog-card-image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.blog-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.03);
}

.blog-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
}

.blog-card-meta {
    margin-bottom: 10px;
    color: #777;
    font-family: "Quicksand", sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.blog-card h2 {
    margin: 0 0 15px;
    font-family: "Nanum Myeongjo", serif;
    font-size: 25px;
    line-height: 1.25;
}

.blog-card h2 a {
    color: #222;
    text-decoration: none;
}

.blog-card h2 a:hover {
    color: #fcaf00;
}

.blog-card-excerpt {
    margin-bottom: 22px;
    color: #555;
    font-family: "Quicksand", sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

.blog-card-excerpt p {
    margin: 0;
}

.blog-read-more {
    display: inline-block;
    width: fit-content;
    margin-top: auto;
    padding: 11px 19px;
    background: #222;
    color: #ffffff;
    font-family: "Quicksand", sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.blog-read-more:hover {
    background: #fcaf00;
    color: #111;
}

.blog-empty {
    grid-column: 1 / -1;
    padding: 50px 30px;
    background: #ffffff;
    text-align: center;
}

.blog-empty h2 {
    margin-top: 0;
    font-family: "Nanum Myeongjo", serif;
}

.blog-pagination {
    margin-top: 45px;
    text-align: center;
}

.blog-pagination .nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination .current {
    display: inline-block;
    padding: 9px 13px;
    border: 1px solid #ddd;
    background: #ffffff;
    color: #222;
    text-decoration: none;
}

.blog-pagination .current,
.blog-pagination a:hover {
    background: #222;
    border-color: #222;
    color: #ffffff;
}

@media screen and (max-width: 1000px) {

    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media screen and (max-width: 640px) {

    .blog-hero {
        padding: 50px 20px;
    }

    .blog-logo {
        max-width: 210px;
    }

    .blog-hero h1 {
        font-size: 35px;
    }

    .blog-hero p {
        font-size: 16px;
    }

    .blog-content {
        padding: 45px 16px 60px;
    }

    .blog-heading h2 {
        font-size: 29px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .blog-card-content {
        padding: 23px;
    }

    .blog-card h2 {
        font-size: 23px;
    }

}

/* =========================================================
   BLOG / MAIN SITE INTEGRATION
   ========================================================= */

/* Restore the site's normal navigation behaviour */
body .topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;
    padding: 0 !important;

    background-color: var(--off-white) !important;

    border-bottom-right-radius: 10px !important;
    border-bottom-left-radius: 10px !important;

    filter: drop-shadow(0 0 5px #909090);
    z-index: 9999 !important;
}

/* Keep original desktop navigation layout */
body .topbar nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

body .topbar nav > ul {
    display: block !important;
    width: auto !important;
    margin: 0 auto !important;
}

/* Blog starts below fixed navigation */
.blog-page {
    padding-top: 48px;
}

/* Clean up blog hero */
.blog-hero {
    background: #1f1f1f;
    padding: 70px 20px 75px;
}

/* Improve empty-state readability */
.blog-empty h2 {
    color: #fcaf00 !important;
}

.blog-empty p {
    color: #646464 !important;
    opacity: 1 !important;
}

/* WP admin toolbar clashes with your global input CSS */
#wpadminbar input,
#wpadminbar textarea {
    width: auto !important;
    padding: 0 !important;
    display: inline-block !important;
    background: transparent !important;
}

/* WordPress toolbar sits above fixed menu when logged in */
body.admin-bar .topbar {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .topbar {
        top: 46px !important;
    }
}

/* Preserve the site's existing mobile nav behaviour */
@media screen and (max-width: 680px) {

    body .topbar {
        text-align: center;
    }

    body .topbar nav {
        display: none;
    }

    body .topbar i.fa-bars {
        display: inline-block;
    }

    .blog-page {
        padding-top: 54px;
    }
}

/* =========================================================
   BLOG ARTICLE LAYOUT
   ========================================================= */

/* Main article */
.single-post main,
.single-post .site-main {
    width: 100%;
}

/* Centre article content */
.single-post article {
    width: calc(100% - 40px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 65px 0 80px;
}

/* Article title */
.single-post article h1 {
    max-width: 1000px;
    margin: 0 0 35px;
    line-height: 1.15;
}

/* Comfortable reading width */
.single-post .entry-content {
    max-width: 950px;
}

/* Paragraph spacing */
.single-post .entry-content p {
    margin-bottom: 20px;
    line-height: 1.75;
}

/* Section headings */
.single-post .entry-content h2 {
    margin-top: 50px;
    margin-bottom: 22px;
    line-height: 1.2;
}

/* Lists */
.single-post .entry-content ul,
.single-post .entry-content ol {
    margin: 20px 0 30px 25px;
}

/* Images */
.single-post .entry-content figure,
.single-post .entry-content .wp-block-image {
    margin: 35px 0;
}

.single-post .entry-content img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Mobile */
@media screen and (max-width: 680px) {

    .single-post article {
        width: calc(100% - 32px);
        padding: 40px 0 60px;
    }

    .single-post article h1 {
        font-size: 34px;
    }

    .single-post .entry-content h2 {
        margin-top: 38px;
    }
}

.blog-post-meta {
    margin: -15px 0 30px;
    color: #777;
    font-family: "Quicksand", sans-serif;
    font-size: 14px;
}

.blog-post-meta-separator {
    margin: 0 10px;
}

/* =========================================================
   BLOG ARTICLE CTA
   ========================================================= */

.blog-post-cta {
    max-width: 950px;
    margin-top: 70px;
    padding: 45px;
    background: #1f1f1f;
    border-radius: 10px;
}

.blog-post-cta h2 {
    margin-top: 0;
    color: #fcaf00;
}

.blog-post-cta p {
    color: #f4f4f4;
    max-width: 760px;
}

.blog-post-cta .btn {
    margin-top: 20px;
}

@media screen and (max-width: 680px) {

    .blog-post-cta {
        padding: 30px 22px;
        margin-top: 50px;
    }

}


@media screen and (max-width: 680px) {

    .blog-post-cta {
        padding: 30px 22px;
        margin-top: 50px;
    }

}

/* =========================================================
   BLOG CATEGORY NAVIGATION
   ========================================================= */

.blog-categories {
    padding: 32px 20px 20px;
    background: #f5f5f5;
}

.blog-categories-heading {
    margin-bottom: 15px;
}

.blog-categories-heading h2 {
    margin: 0 0 5px;
    font-size: 28px;
    color: #555;
}

.blog-categories-heading p {
    margin: 0;
    color: #8a8a8a;
    font-size: 13px;
}

.blog-category-grid {
    display: flex !important;
    align-items: center;
    gap: 0 !important;
    width: 100%;
    background: #fafafa;
    border: 1px solid #ddd;
}

.blog-category-card {
    display: flex !important;
    flex: 1 1 auto;
    min-height: 46px;
    padding: 0 13px !important;
    align-items: center;
    justify-content: center;

    background: transparent !important;
    border: 0 !important;
    border-right: 1px solid #e1e1e1 !important;
    border-radius: 0 !important;

    text-align: center;
    text-decoration: none !important;
    white-space: nowrap;

    transition: background .2s ease, color .2s ease;
}

.blog-category-card:last-child {
    border-right: 0 !important;
}

.blog-category-card span {
    margin: 0 !important;
    color: #555;
    font-family: "Quicksand", sans-serif;
    font-size: 12px;
    font-weight: 500;
}

.blog-category-card small {
    display: none !important;
}

.blog-category-card:hover {
    background: #222 !important;
    transform: none !important;
}

.blog-category-card:hover span {
    color: #fcaf00 !important;
}


/* MOBILE / TABLET */

@media screen and (max-width: 900px) {

    .blog-category-grid {
        overflow-x: auto;
        justify-content: flex-start;
    }

    .blog-category-card {
        flex: 0 0 auto;
        padding: 0 16px !important;
    }

}


/* =========================================================
   BLOG CATEGORY NAV - MOBILE FIX
   ========================================================= */

@media screen and (max-width: 680px) {

    .blog-categories {
        padding: 28px 16px 16px !important;
    }

    .blog-categories-heading {
        margin-bottom: 14px !important;
    }

    .blog-categories-heading h2 {
        font-size: 30px !important;
        line-height: 1.15 !important;
        margin-bottom: 8px !important;
    }

    .blog-categories-heading p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }

    .blog-category-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        gap: 0 !important;

        width: 100% !important;
        border: 1px solid #ddd !important;
        background: #fafafa !important;

        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .blog-category-grid::-webkit-scrollbar {
        display: none;
    }

    .blog-category-card {
        flex: 0 0 auto !important;
        min-height: 44px !important;

        padding: 0 14px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        border: 0 !important;
        border-right: 1px solid #e1e1e1 !important;

        white-space: nowrap !important;
        background: transparent !important;
    }

    .blog-category-card:last-child {
        border-right: 0 !important;
    }

    .blog-category-card span {
        font-size: 12px !important;
        line-height: 1 !important;
        margin: 0 !important;
    }

    .blog-category-card small {
        display: none !important;
    }

}


/* MOBILE CATEGORY DROPDOWN */

.blog-category-mobile {
    display: none;
}

@media screen and (max-width: 680px) {

    .blog-category-grid {
        display: none !important;
    }

    .blog-category-mobile {
        display: block;
        margin-top: 14px;
    }

    .blog-category-mobile label {
        display: block;
        margin-bottom: 7px;
        color: #555;
        font-family: "Quicksand", sans-serif;
        font-size: 13px;
        font-weight: 500;
    }

    .blog-category-mobile select {
        display: block;
        width: 100%;
        height: 46px;

        padding: 0 42px 0 14px !important;

        border: 1px solid #d6d6d6 !important;
        border-radius: 3px;

        background-color: #fafafa !important;
        color: #555;

        font-family: "Quicksand", sans-serif;
        font-size: 14px;

        cursor: pointer;
    }

}


/* =========================================================
   MOBILE BLOG CATEGORY DROPDOWN
   ========================================================= */

.blog-category-mobile {
    display: none;
}

@media screen and (max-width: 680px) {

    .blog-category-grid {
        display: none !important;
    }

    .blog-category-mobile {
        display: block;
        margin-top: 14px;
    }

    .blog-category-toggle {
        position: relative;
        display: block;
        width: 100%;
        padding: 14px 46px 14px 16px;

        border: 1px solid #d8d8d8;
        border-radius: 3px;

        background: #fafafa;
        color: #555;

        font-family: "Quicksand", sans-serif;
        font-size: 14px;
        font-weight: 500;

        text-align: left;
        cursor: pointer;
    }

    .blog-category-arrow {
        position: absolute;
        top: 50%;
        right: 17px;

        width: 8px;
        height: 8px;

        border-right: 2px solid #666;
        border-bottom: 2px solid #666;

        transform: translateY(-70%) rotate(45deg);
        transition: transform .2s ease;
    }

    .blog-category-toggle.is-open .blog-category-arrow {
        transform: translateY(-30%) rotate(225deg);
    }

    .blog-category-mobile-menu {
        display: none;

        overflow: hidden;

        border: 1px solid #d8d8d8;
        border-top: 0;

        background: #ffffff;
    }

    

    .blog-category-mobile-menu a {
        display: block;

        padding: 13px 16px;

        border-bottom: 1px solid #ececec;

        color: #555;
        font-family: "Quicksand", sans-serif;
        font-size: 13px;

        text-decoration: none;
    }

    .blog-category-mobile-menu a:last-child {
        border-bottom: 0;
    }

    .blog-category-mobile-menu a:hover {
        background: #f5f5f5;
        color: #fcaf00;
    }

}


/* =========================================================
   BLOG BREADCRUMBS
   ========================================================= */

.blog-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;

    margin: 0 0 24px;

    font-family: "Quicksand", sans-serif;
    font-size: 13px;
    line-height: 1.4;
}

.blog-breadcrumbs a {
    color: #777;
    text-decoration: none;
}

.blog-breadcrumbs a:hover {
    color: #fcaf00;
}

.breadcrumb-separator {
    color: #aaa;
}

.breadcrumb-current {
    color: #999;
}

/* Mobile */
@media screen and (max-width: 680px) {

    .blog-breadcrumbs {
        font-size: 12px;
        gap: 5px;
        margin-bottom: 20px;
    }

    .breadcrumb-current {
        display: none;
    }
}

@media screen and (max-width: 680px) {

    .blog-page {
        padding-top: 68px !important;
    }

}

@media screen and (max-width: 680px) {

    .single-post main {
        padding-top: 72px !important;
    }

    .single-post article {
        padding-top: 28px !important;
    }

}