/* =========================================================
   OPEN NEWTOWN CATEGORY ARCHIVES
========================================================= */

.opennewtown-category-page {
    background: #f4f7f8;
}


/* =========================================================
CATEGORY HEADER
Matches News & Updates hero
========================================================= */

.category-header {
    position: relative;
    overflow: hidden;

    padding: 38px 30px 72px;

    background-image:
        linear-gradient(
            90deg,
            rgba(35, 79, 126, 0.92) 0%,
            rgba(35, 79, 126, 0.78) 32%,
            rgba(35, 79, 126, 0.32) 62%,
            rgba(35, 79, 126, 0.04) 100%
        ),
        url('/wp-content/uploads/2026/09/aerial-view.webp');

    background-size: cover;
    background-position: 49% 27%;
    background-repeat: no-repeat;

    text-align: left;
}

/* Shape divider */
.category-header::after {
    content: "";
    position: absolute;

    left: 0;
    right: 0;
    bottom: -1px;

    width: 100%;
    height: 42px;

    background: #f4f7f8;

    clip-path: polygon(
        0 70%,
        18% 86%,
        38% 78%,
        55% 90%,
        72% 76%,
        88% 84%,
        100% 72%,
        100% 100%,
        0 100%
    );
}

.category-header-inner {
    position: relative;
    z-index: 1;

    width: min(90%, 1500px);
    margin: 0 auto;
}

.category-page-title {
    max-width: 700px;

    margin: 0 !important;

    color: #ffffff !important;

    font-size: clamp(32px, 3vw, 42px);
    line-height: 1.1;

    background: none !important;

    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: initial;
}

/* Green divider beneath heading */
.category-page-title::after {
    content: "";
    display: block;

    width: 520px;
    max-width: 70vw;
    height: 2px;

    margin: 52px 0 0;

    background: #7dc6aa;
    border-radius: 2px;
}

.category-page-description {
    max-width: 720px;

    margin: 34px 0 0;

    color: #ffffff;

    font-size: 18px;
    line-height: 1.6;
}

.category-page-description p {
    margin: 0;
    color: inherit;
}
/* =========================================================
   CATEGORY FILTER BUTTONS
========================================================= */

.category-filter-nav {
    width: min(90%, 1500px);
    margin: 30px auto 50px;

    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 12px;
}

.category-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 10px 20px;

    border: 1px solid #3569a3;
    border-radius: 7px;

    background: rgba(255, 255, 255, 0.7);

    color: #3569a3 !important;

    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;

    text-decoration: none !important;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.category-filter-button:hover {
    transform: translateY(-2px);

    background: #ffffff;

    box-shadow: 0 6px 16px rgba(20, 45, 55, 0.12);
}

.category-filter-button.is-active {
    border-color: transparent;

    background: linear-gradient(
        90deg,
        #3569a3,
        #55b88b
    );

    color: #ffffff !important;

    box-shadow: 0 5px 14px rgba(20, 45, 55, 0.14);
}


/* =========================================================
   POST GRID
========================================================= */

.category-posts {
    width: min(90%, 1500px);
    margin: 0 auto;
    padding-bottom: 70px;
}

.category-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 50px 36px;

    align-items: start;
}


/* =========================================================
   CATEGORY CARDS
========================================================= */

.category-card {
    min-width: 0;
    margin: 0 !important;

    background: rgba(255, 255, 255, 0.96) !important;

    border-radius: 14px !important;
    overflow: hidden;

    box-shadow:
        0 8px 24px rgba(20, 45, 55, 0.12),
        0 2px 6px rgba(20, 45, 55, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 16px 34px rgba(20, 45, 55, 0.17),
        0 4px 10px rgba(20, 45, 55, 0.08);
}


/* =========================================================
   FEATURED IMAGE
========================================================= */

.category-card-image {
    display: block;

    width: 100%;
    height: 250px;

    overflow: hidden;

    /* Card handles the outer corners */
    border-radius: 0 !important;

    box-shadow: none !important;
}

.category-card-thumbnail {
    display: block;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover;

    transition: transform 0.4s ease;
}

.category-card:hover .category-card-thumbnail {
    transform: scale(1.035);
}


/* =========================================================
   CARD CONTENT
========================================================= */

.category-card-content {
    padding: 25px 28px 28px;
}

.category-card-category {
    margin: 0 0 11px;

    color: #3569a3;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.07em;
}


/* =========================================================
   CARD TITLE
========================================================= */

.category-card-title {
    margin: 0 0 15px !important;

    font-size: 29px !important;
    line-height: 1.12 !important;
}

.category-card-title a {
    background: linear-gradient(
        90deg,
        #3569a3 0%,
        #3569a3 35%,
        #55b88b 100%
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    color: #3569a3;

    text-decoration: none !important;
}


/* =========================================================
   DATE
========================================================= */

.category-card-date {
    margin: 0 0 14px;

    color: #596970;

    font-size: 15px;
    line-height: 1.4;
    font-weight: 600;
}


/* =========================================================
   EXCERPT
========================================================= */

.category-card-excerpt {
    color: #4b5960;

    font-size: 15px;
    line-height: 1.55;
}

.category-card-excerpt p {
    margin: 0 0 18px;
}


/* =========================================================
   READ MORE
========================================================= */

.category-card-more {
    display: inline-flex;
    align-items: center;

    margin-top: 2px;

    color: #234f7e !important;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    text-decoration: none !important;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.category-card-more:hover {
    color: #55a986 !important;
    transform: translateX(4px);
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .category-card {
        border-radius: 12px !important;
    }

    .category-card-image {
        height: 220px;
    }

    .category-card-content {
        padding: 22px 22px 25px;
    }

    .category-card-title {
        font-size: 26px !important;
    }

}

/* =========================================================
   READ MORE
========================================================= */

.category-card-more {
    display: inline-flex;
    align-items: center;

    margin-top: 2px;

    color: #234f7e !important;

    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.08em;

    text-decoration: none !important;

    transition:
        transform 0.2s ease,
        color 0.2s ease;
}

.category-card-more:hover {
    color: #55a986 !important;
    transform: translateX(4px);
}


/* =========================================================
   PAGINATION
========================================================= */

.category-pagination {
    margin-top: 60px;
    text-align: center;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1024px) {

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

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 767px) {

    .category-header {
        padding: 40px 20px 25px;
    }

    .category-page-description {
        font-size: 16px;
    }

    .category-filter-nav {
        justify-content: flex-start;
        margin-bottom: 35px;
    }

    .category-filter-button {
        padding: 9px 14px;
        font-size: 14px;
    }

    .category-post-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .category-card-image {
        height: 230px;
    }

    .category-card-content {
        padding: 20px 5px 0;
    }

    .category-card-title {
        font-size: 26px !important;
    }

}