/* ============================================================
   MAXXESS INSIGHTS - GRID AND LISTING
   [maxxess_insights] and [maxxess_insights_archive]
   ============================================================ */


/* ---------- GRID SHELL ---------- */

.mx-insights__grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 44px;
    align-items: start;
}

.mx-insights__grid--no-feature { grid-template-columns: 1fr; }


/* ---------- CATEGORY TAG ON IMAGES ---------- */

.mx-insight-tag {
    position: absolute;
    left: 0;
    bottom: 0;
    font-family: var(--mx-text);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #ffffff;
    background: var(--mx-green);
    padding: 7px 14px;
    line-height: 1.2;
    pointer-events: none;
}


/* ---------- LARGE FEATURE ---------- */

.mx-insight-feature { margin: 0; }

.mx-insight-feature__image-link {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    margin-bottom: 22px;
    background: #f1f2f4;
    text-decoration: none;
}

.mx-insight-feature__image-link img {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: cover;
    transition: transform 600ms ease;
}
.mx-insight-feature__image-link:hover img { transform: scale(1.04); }

.mx-insights .mx-insight-feature__title,
.mx-insights h3.mx-insight-feature__title {
    font-family: var(--mx-head) !important;
    font-size: 31px !important;
    font-weight: 400 !important;
    line-height: 1.22 !important;
    letter-spacing: 0.01em;
    color: var(--mx-black) !important;
    margin: 0 0 14px 0 !important;
    text-transform: none;
}

.mx-insights .mx-insight-feature__title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 200ms ease;
}
.mx-insights .mx-insight-feature__title a:hover { color: var(--mx-green) !important; }

.mx-insights .mx-insight-feature__excerpt {
    font-family: var(--mx-text);
    font-size: 16px;
    line-height: 1.75;
    color: var(--mx-body);
    margin: 0 0 18px 0;
}

.mx-insights .mx-insight-feature__meta {
    font-family: var(--mx-text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mx-grey);
    margin: 0;
    padding-top: 16px;
    border-top: 1px solid var(--mx-line);
}


/* ---------- STACKED CARDS ---------- */

.mx-insight-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.mx-insight-card {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 22px;
    align-items: start;
    margin: 0;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--mx-line);
}
.mx-insight-card:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.mx-insight-card__image-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f1f2f4;
    text-decoration: none;
}

.mx-insight-card__image-link img {
    display: block;
    width: 100%;
    height: 128px;
    object-fit: cover;
    transition: transform 600ms ease;
}
.mx-insight-card__image-link:hover img { transform: scale(1.06); }

.mx-insight-card__body { min-width: 0; }

.mx-insights .mx-insight-card__title,
.mx-insights h3.mx-insight-card__title {
    font-family: var(--mx-head) !important;
    font-size: 19px !important;
    font-weight: 400 !important;
    line-height: 1.32 !important;
    letter-spacing: 0.01em;
    color: var(--mx-black) !important;
    margin: 0 0 8px 0 !important;
    text-transform: none;
}

.mx-insights .mx-insight-card__title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 200ms ease;
}
.mx-insights .mx-insight-card__title a:hover { color: var(--mx-green) !important; }

.mx-insights .mx-insight-card__excerpt {
    font-family: var(--mx-text);
    font-size: 14px;
    line-height: 1.65;
    color: var(--mx-body);
    margin: 0 0 10px 0;
}

.mx-insights .mx-insight-card__meta {
    font-family: var(--mx-text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mx-grey);
    margin: 0;
}


/* ---------- PLACEHOLDER WHEN NO FEATURED IMAGE ---------- */

.mx-insight-placeholder {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #e8eaed 0%, #d7dade 100%);
}
.mx-insight-feature__image-link .mx-insight-placeholder { height: 340px; }
.mx-insight-card__image-link .mx-insight-placeholder    { height: 128px; }
.mx-insight-tile__image-link .mx-insight-placeholder    { height: 210px; }


/* ---------- VIEW ALL ---------- */

.mx-insights__more {
    margin-top: 46px;
    text-align: center;
}


/* ---------- FILTER ROW ---------- */

.mx-insights__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--mx-line);
}

.mx-insights .mx-insights__filter {
    font-family: var(--mx-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mx-blue-dark) !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border: 1px solid var(--mx-line);
    line-height: 1.2;
    transition: all 200ms ease;
}
.mx-insights .mx-insights__filter:hover {
    border-color: var(--mx-green);
    color: var(--mx-green) !important;
}
.mx-insights .mx-insights__filter.is-active {
    background: var(--mx-blue-dark);
    border-color: var(--mx-blue-dark);
    color: #ffffff !important;
}


/* ---------- ARCHIVE LISTING ---------- */

.mx-insights__archive {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 46px 34px;
}

/* Flex column plus the auto margin on the meta line keeps the
   dates sitting on one baseline across a row, whatever length
   the headlines happen to be. */
.mx-insight-tile {
    margin: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mx-insight-tile__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.mx-insight-tile__image-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #f1f2f4;
    margin-bottom: 18px;
    text-decoration: none;
}

.mx-insight-tile__image-link img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    transition: transform 600ms ease;
}
.mx-insight-tile__image-link:hover img { transform: scale(1.05); }

.mx-insights .mx-insight-tile__title,
.mx-insights h3.mx-insight-tile__title {
    font-family: var(--mx-head) !important;
    font-size: 23px !important;
    font-weight: 400 !important;
    line-height: 1.28 !important;
    letter-spacing: 0.01em;
    color: var(--mx-black) !important;
    margin: 0 0 10px 0 !important;
    text-transform: none;
}

.mx-insights .mx-insight-tile__title a {
    color: inherit !important;
    text-decoration: none !important;
    transition: color 200ms ease;
}
.mx-insights .mx-insight-tile__title a:hover { color: var(--mx-green) !important; }

.mx-insights .mx-insight-tile__excerpt {
    font-family: var(--mx-text);
    font-size: 14px;
    line-height: 1.7;
    color: var(--mx-body);
    margin: 0 0 12px 0;
}

.mx-insights .mx-insight-tile__meta {
    font-family: var(--mx-text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mx-grey);
    margin: auto 0 0 0;
    padding-top: 14px;
}

.mx-insights .mx-insights__empty {
    font-family: var(--mx-text);
    font-size: 16px;
    color: var(--mx-grey);
    margin: 0;
    padding: 30px 0;
}


/* ---------- PAGINATION ---------- */

.mx-insights__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 56px;
}

.mx-insights__pagination .page-numbers {
    font-family: var(--mx-text);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--mx-blue-dark);
    text-decoration: none;
    padding: 11px 17px;
    border: 1px solid var(--mx-line);
    line-height: 1.2;
    transition: all 200ms ease;
}

.mx-insights__pagination a.page-numbers:hover {
    background: var(--mx-green);
    border-color: var(--mx-green);
    color: #ffffff;
}

.mx-insights__pagination .page-numbers.current {
    background: var(--mx-blue-dark);
    border-color: var(--mx-blue-dark);
    color: #ffffff;
}

.mx-insights__pagination .page-numbers.dots {
    border-color: transparent;
    padding: 11px 4px;
}


/* ---------- RESPONSIVE ---------- */

@media (max-width: 1200px) {
    .mx-insight-card { grid-template-columns: 155px 1fr; gap: 18px; }
    .mx-insight-card__image-link img,
    .mx-insight-card__image-link .mx-insight-placeholder { height: 108px; }
}

@media (max-width: 1024px) {
    .mx-insights__grid { grid-template-columns: 1fr; gap: 46px; }

    .mx-insight-feature__image-link img,
    .mx-insight-feature__image-link .mx-insight-placeholder { height: 300px; }

    .mx-insight-card { grid-template-columns: 200px 1fr; gap: 22px; }
    .mx-insight-card__image-link img,
    .mx-insight-card__image-link .mx-insight-placeholder { height: 130px; }

    .mx-insights__archive { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
}

@media (max-width: 768px) {
    .mx-insights .mx-insight-feature__title,
    .mx-insights h3.mx-insight-feature__title { font-size: 25px !important; }

    .mx-insights .mx-insight-tile__title,
    .mx-insights h3.mx-insight-tile__title { font-size: 20px !important; }

    .mx-insight-feature__image-link img,
    .mx-insight-feature__image-link .mx-insight-placeholder { height: 240px; }

    .mx-insight-card { grid-template-columns: 145px 1fr; gap: 16px; }
    .mx-insight-card__image-link img,
    .mx-insight-card__image-link .mx-insight-placeholder { height: 98px; }

    .mx-insight-tile__image-link img,
    .mx-insight-tile__image-link .mx-insight-placeholder { height: 190px; }
}

@media (max-width: 560px) {
    .mx-insights__archive { grid-template-columns: 1fr; gap: 36px; }

    .mx-insight-card { grid-template-columns: 1fr; gap: 14px; }
    .mx-insight-card__image-link img,
    .mx-insight-card__image-link .mx-insight-placeholder { height: 190px; }

    .mx-insights .mx-insight-card__title,
    .mx-insights h3.mx-insight-card__title { font-size: 20px !important; }

    .mx-insights .mx-insight-card__excerpt,
    .mx-insights .mx-insight-tile__excerpt { font-size: 15px; }

    .mx-insight-feature__image-link img,
    .mx-insight-feature__image-link .mx-insight-placeholder { height: 200px; }

    .mx-insights__filters { gap: 8px; margin-bottom: 32px; }
    .mx-insights .mx-insights__filter { padding: 9px 15px; font-size: 11px; }
}
