/* =========================================================
   News Posts Block + Insights Grid
   ========================================================= */

/* Full-width orange row â€” breaks out of any parent container */
.insights-grid__orange-row {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Force white text inside orange rows regardless of theme link styles */
.insights-grid__orange-row .wp-block-heading,
.insights-grid__orange-row .wp-block-heading a,
.insights-grid__orange-row .wp-block-heading a:hover,
.insights-grid__orange-row .wp-block-heading a:visited,
.insights-grid__orange-row p {
    color: #ffffff !important;
}

/* Centred pagination */
.insights-grid__pagination {
    text-align: center;
    padding: 24px 0 40px;
}

.insights-grid__pagination .page-numbers {
    display: inline-block;
    padding: 0 4px;
    margin: 0 2px;
    text-decoration: none;
    color: #222;
    font-weight: normal;
    transition: color 0.2s;
}

.insights-grid__pagination .page-numbers.current {
    color: #ff6200;
    font-weight: bold;
    cursor: default;
}

.insights-grid__pagination .page-numbers:hover:not(.current) {
    color: #ff6200;
    text-decoration: underline;
}

.insights-grid__pagination .page-numbers.dots {
    color: #bbb;
    cursor: default;
}

.insights-grid__pagination .next,
.insights-grid__pagination .prev {
    color: #ff6200;
    font-weight: bold;
    text-decoration: none;
    padding: 0 4px;
    transition: text-decoration 0.2s;
}
.insights-grid__pagination .next:hover,
.insights-grid__pagination .prev:hover {
    text-decoration: underline;
}

/* Heading (optional) */
.news-posts-block__heading-wrap {
    padding-top: 40px;
    padding-bottom: 20px;
}

.news-posts-block__heading {
    text-align: center;
    margin: 0;
    font-size: 2rem;
    color: #222;
}

/* Each row of 4 posts */
.news-posts-block__row {
    padding: 40px 0;
}

/* 4-column flex grid */

.news-posts-block__columns {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.columns-4 .news-posts-block__column {
    width: 25%;
}
.columns-3 .news-posts-block__column {
    width: 33.3333%;
}
.news-posts-block__column {
    box-sizing: border-box;
    padding: 0;
}

.insights-grid.columns-4 .wp-block-column {
    flex: 1 1 0 !important;
    max-width: none !important;
}

.insights-grid.columns-3 .wp-block-column {
    flex: 1 1 0 !important;
    max-width: none !important;
}

.insights-grid__filler {
    visibility: hidden;
    pointer-events: none;
}

@media (max-width: 781px) {
    .insights-grid.columns-4 .wp-block-column,
    .insights-grid.columns-3 .wp-block-column {
        flex: 0 0 100% !important;
        max-width: 100%;
    }
}

@media (min-width: 782px) and (max-width: 991px) {
    .insights-grid.columns-4 .wp-block-column,
    .insights-grid.columns-3 .wp-block-column {
        flex: 1 1 40% !important;
        max-width: none !important;
    }
}

/* Image */
.news-posts-block__image {
    padding: 4px;
}

.news-posts-block__image a {
    display: block;
}

.news-posts-block__image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* Title */
.news-posts-block__title {
    text-align: left;
    margin: 8px 4px 0;
    padding: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.news-posts-block__title a {
    text-decoration: none;
}

.news-posts-block__title a:hover {
    text-decoration: underline;
}

/* Category | Date label */
.news-posts-block__label {
    text-align: left;
    margin: 4px 4px 0;
    padding: 4px 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Excerpt */
.news-posts-block__excerpt {
    margin: 0 4px;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* â”€â”€ White row colours â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.news-posts-block__row--white .news-posts-block__title a {
    color: #464646;
}

.news-posts-block__row--white .news-posts-block__title a:hover {
    color: #ff6200;
}

.news-posts-block__row--white .news-posts-block__label {
    color: #ff6200;
}

.news-posts-block__row--white .news-posts-block__excerpt {
    color: #464646;
}

/* â”€â”€ Orange row colours â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.news-posts-block__row--orange .news-posts-block__title a {
    color: #ffffff;
}

.news-posts-block__row--orange .news-posts-block__title a:hover {
    color: #fcf596;
}

.news-posts-block__row--orange .news-posts-block__label {
    color: #fcf596;
}

.news-posts-block__row--orange .news-posts-block__excerpt {
    color: #ffffff;
}

/* Empty state */
.news-posts-block__empty {
    text-align: center;
    color: #888;
    padding: 20px 0;
}

/* â”€â”€ Responsive â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Tablet: 2 columns */
@media (max-width: 991px) {
    .news-posts-block__column {
        width: 50% !important;
    }
}

/* Mobile: 1 column */
@media (max-width: 575px) {
    .news-posts-block__column {
        width: 100% !important;
    }
}