/*
 * M2 Projects Showcase — Blog templates v1.2
 * Proxima Nova for headings, Poppins for body copy.
 * Everything is scoped under .m2ps-blog-* to protect Elementor/theme styles.
 */

:root {
    --m2ps-blog-heading: "Proxima Nova", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --m2ps-blog-body: "Poppins", Arial, sans-serif;
    --m2ps-blog-black: #000;
    --m2ps-blog-white: #fff;
    --m2ps-blog-ink: #111;
    --m2ps-blog-muted: #6b6b6b;
    --m2ps-blog-line: #e8e8e8;
    --m2ps-blog-blue: #3e6489;
    --m2ps-blog-shell: 1220px;
}

.m2ps-blog-archive,
.m2ps-blog-single,
.m2ps-blog-parent-page {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff;
    color: var(--m2ps-blog-ink);
    font-family: var(--m2ps-blog-body);
}

.m2ps-blog-archive *,
.m2ps-blog-single *,
.m2ps-blog-parent-page * {
    box-sizing: border-box;
}

.m2ps-blog-shell {
    width: min(var(--m2ps-blog-shell), calc(100% - 40px));
    margin-inline: auto;
}

/* ---------- Parent hero ---------- */
.m2ps-blog-hero,
.m2ps-blog-single-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(430px, 53vw, 670px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 77% 20%, rgba(255,255,255,.12), transparent 30%),
        linear-gradient(125deg, #203a54 0%, #416889 50%, #172a3d 100%);
}

.m2ps-blog-hero.has-image,
.m2ps-blog-single-hero.has-image {
    background-image: var(--m2ps-blog-hero-image, var(--m2ps-blog-single-image));
    background-size: cover;
    background-position: center;
}

.m2ps-blog-hero__shade,
.m2ps-blog-single-hero__shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(0,0,0,.64), rgba(0,0,0,.34) 55%, rgba(0,0,0,.28));
}

.m2ps-blog-hero::after,
.m2ps-blog-single-hero::after {
    content: "";
    position: absolute;
    z-index: 2;
    left: 0;
    right: 0;
    bottom: -1px;
    height: clamp(78px, 9vw, 138px);
    background: #fff;
    clip-path: polygon(0 70%, 28% 58%, 70% 28%, 90% 0, 100% 38%, 100% 100%, 0 100%);
    pointer-events: none;
}

.m2ps-blog-hero__inner,
.m2ps-blog-single-hero__inner {
    width: min(1040px, calc(100% - 40px));
    margin: 0 auto;
    padding: 110px 0 160px;
    text-align: center;
    color: #fff;
}

.m2ps-blog-hero__eyebrow,
.m2ps-blog-kicker {
    display: block;
    margin-bottom: 12px;
    font-family: var(--m2ps-blog-body);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.m2ps-blog-hero__title,
.m2ps-blog-single-hero__title,
.m2ps-blog-listing__title,
.m2ps-blog-related h2,
.m2ps-blog-card__title,
.m2ps-blog-empty h3,
.m2ps-blog-article__content h1,
.m2ps-blog-article__content h2,
.m2ps-blog-article__content h3,
.m2ps-blog-article__content h4,
.m2ps-blog-article__content h5,
.m2ps-blog-article__content h6 {
    font-family: var(--m2ps-blog-heading) !important;
}

.m2ps-blog-hero__title {
    margin: 0;
    font-size: clamp(50px, 6.3vw, 86px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.02em;
    color: #fff;
}

.m2ps-blog-hero__text {
    max-width: 660px;
    margin: 20px auto 0;
    font-family: var(--m2ps-blog-body);
    font-size: clamp(14px, 1.45vw, 18px);
    font-weight: 400;
    line-height: 1.75;
    color: rgba(255,255,255,.94);
}

/* ---------- Parent listing ---------- */
.m2ps-blog-listing {
    padding: clamp(50px, 7vw, 92px) 0 clamp(72px, 8vw, 120px);
    background: #fff;
}

.m2ps-blog-listing__head {
    display: grid;
    grid-template-columns: .8fr 1.2fr;
    gap: 70px;
    align-items: end;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--m2ps-blog-line);
}

.m2ps-blog-kicker {
    margin: 0 0 8px;
    color: #777;
}

.m2ps-blog-listing__title,
.m2ps-blog-related h2 {
    margin: 0;
    color: #000;
    font-size: clamp(36px, 4vw, 56px);
    font-weight: 600;
    line-height: 1.04;
    letter-spacing: -.02em;
}

.m2ps-blog-listing__intro {
    max-width: 640px;
    margin: 0;
    font-size: 14px;
    line-height: 1.9;
    color: #626262;
}

.m2ps-blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 34px 0 42px;
}

.m2ps-blog-filter,
.m2ps-blog-filter:link,
.m2ps-blog-filter:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 18px;
    border: 1px solid #161616;
    background: #fff;
    color: #161616;
    font-family: var(--m2ps-blog-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none !important;
    transition: background-color .2s ease, color .2s ease;
}

.m2ps-blog-filter:hover,
.m2ps-blog-filter:focus-visible,
.m2ps-blog-filter.is-active {
    background: #000;
    color: #fff;
}

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

.m2ps-blog-card {
    min-width: 0;
    background: #fff;
}

.m2ps-blog-card__media,
.m2ps-blog-card__media:link,
.m2ps-blog-card__media:visited {
    position: relative;
    display: block;
    aspect-ratio: 1.44 / 1;
    overflow: hidden;
    background: #d8d8d8;
    text-decoration: none !important;
}

.m2ps-blog-card__image,
.m2ps-blog-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s cubic-bezier(.22,.61,.36,1);
}

.m2ps-blog-card__placeholder {
    background: linear-gradient(135deg, #203a54, #567b9d 55%, #141f28);
}

.m2ps-blog-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.48), transparent 48%);
    pointer-events: none;
}

.m2ps-blog-card__category {
    position: absolute;
    left: 18px;
    bottom: 16px;
    display: inline-block;
    padding: 7px 10px 6px;
    background: rgba(255,255,255,.94);
    color: #000;
    font-family: var(--m2ps-blog-body);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.m2ps-blog-card__media:hover .m2ps-blog-card__image,
.m2ps-blog-card__media:focus-visible .m2ps-blog-card__image {
    transform: scale(1.035);
}

.m2ps-blog-card__body {
    padding-top: 18px;
}

.m2ps-blog-card__date {
    margin-bottom: 7px;
    color: #8b8b8b;
    font-size: 11px;
    line-height: 1.5;
}

.m2ps-blog-card__title {
    margin: 0 0 10px;
    font-size: clamp(24px, 2.15vw, 31px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.015em;
}

.m2ps-blog-card__title a,
.m2ps-blog-card__title a:visited {
    color: #0c0c0c;
    text-decoration: none !important;
}

.m2ps-blog-card__title a:hover {
    color: var(--m2ps-blog-blue);
}

.m2ps-blog-card__excerpt {
    margin: 0 0 14px;
    color: #666;
    font-family: var(--m2ps-blog-body);
    font-size: 13px;
    line-height: 1.75;
}

.m2ps-blog-card__read,
.m2ps-blog-card__read:link,
.m2ps-blog-card__read:visited {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    color: #000;
    font-family: var(--m2ps-blog-body);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.m2ps-blog-card__read span {
    transition: transform .2s ease;
}

.m2ps-blog-card__read:hover span {
    transform: translateX(4px);
}

.m2ps-blog-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 56px;
}

.m2ps-blog-page,
.m2ps-blog-page:link,
.m2ps-blog-page:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #111;
    color: #111;
    background: #fff;
    font-family: var(--m2ps-blog-body);
    font-size: 12px;
    text-decoration: none !important;
}

.m2ps-blog-page:hover,
.m2ps-blog-page.is-active {
    background: #000;
    color: #fff;
}

.m2ps-blog-empty {
    padding: 80px 20px;
    border: 1px solid var(--m2ps-blog-line);
    text-align: center;
}

.m2ps-blog-empty h3 {
    margin: 0 0 10px;
    font-size: 34px;
}

.m2ps-blog-empty p {
    margin: 0;
    color: #6b6b6b;
    font-size: 13px;
}

/* ---------- Single post ---------- */
.m2ps-blog-single-hero {
    min-height: clamp(500px, 60vw, 760px);
}

.m2ps-blog-single-hero.has-image {
    background-image: var(--m2ps-blog-single-image);
}

.m2ps-blog-single-hero__inner {
    width: min(1080px, calc(100% - 40px));
}

.m2ps-blog-single-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 18px;
    font-family: var(--m2ps-blog-body);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: .03em;
    color: rgba(255,255,255,.92);
}

.m2ps-blog-single-hero__meta a,
.m2ps-blog-single-hero__meta a:visited {
    color: #fff;
    text-decoration: none !important;
}

.m2ps-blog-single-hero__title {
    max-width: 980px;
    margin: 0 auto;
    color: #fff;
    font-size: clamp(42px, 5.5vw, 76px);
    font-weight: 400;
    line-height: 1.02;
    letter-spacing: -.02em;
    text-wrap: balance;
}

.m2ps-blog-article {
    padding: clamp(38px, 5vw, 64px) 0 clamp(72px, 8vw, 116px);
    background: #fff;
}

.m2ps-blog-article__shell {
    width: min(900px, calc(100% - 40px));
    margin: 0 auto;
}

.m2ps-blog-back,
.m2ps-blog-back:link,
.m2ps-blog-back:visited {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 34px;
    color: #111;
    font-family: var(--m2ps-blog-body);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
}

.m2ps-blog-article__content {
    color: #333;
    font-family: var(--m2ps-blog-body) !important;
    font-size: 15px;
    line-height: 1.95;
}

.m2ps-blog-article__content p,
.m2ps-blog-article__content li,
.m2ps-blog-article__content blockquote,
.m2ps-blog-article__content figcaption,
.m2ps-blog-article__content table,
.m2ps-blog-article__content td,
.m2ps-blog-article__content th {
    font-family: var(--m2ps-blog-body) !important;
}

.m2ps-blog-article__content p {
    margin: 0 0 1.45em;
}

.m2ps-blog-article__content h2,
.m2ps-blog-article__content h3,
.m2ps-blog-article__content h4 {
    margin: 1.55em 0 .55em;
    color: #0e0e0e;
    font-weight: 600;
    line-height: 1.12;
}

.m2ps-blog-article__content h2 { font-size: clamp(31px, 3.4vw, 44px); }
.m2ps-blog-article__content h3 { font-size: clamp(25px, 2.8vw, 34px); }
.m2ps-blog-article__content h4 { font-size: 23px; }

.m2ps-blog-article__content a {
    color: #2d5d87;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.m2ps-blog-article__content img {
    max-width: 100%;
    height: auto;
    margin: 22px 0;
}

.m2ps-blog-article__content blockquote {
    margin: 36px 0;
    padding: 24px 28px;
    border-left: 4px solid #000;
    background: #f6f6f6;
    color: #252525;
    font-size: 17px;
    line-height: 1.75;
}

.m2ps-blog-article__content ul,
.m2ps-blog-article__content ol {
    margin: 0 0 1.6em;
    padding-left: 1.5em;
}

.m2ps-blog-article__categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid var(--m2ps-blog-line);
    font-family: var(--m2ps-blog-body);
    font-size: 11px;
}

.m2ps-blog-article__categories > span {
    margin-right: 2px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.m2ps-blog-article__categories a,
.m2ps-blog-article__categories a:visited {
    padding: 7px 10px;
    background: #f1f1f1;
    color: #111;
    text-decoration: none !important;
}

/* ---------- Related posts ---------- */
.m2ps-blog-related {
    padding: clamp(68px, 8vw, 112px) 0;
    background: #050505;
    color: #fff;
}

.m2ps-blog-related__head {
    margin-bottom: 38px;
}

.m2ps-blog-related .m2ps-blog-kicker,
.m2ps-blog-related h2 {
    color: #fff;
}

.m2ps-blog-related .m2ps-blog-card {
    background: transparent;
}

.m2ps-blog-related .m2ps-blog-card__title a,
.m2ps-blog-related .m2ps-blog-card__read {
    color: #fff;
}

.m2ps-blog-related .m2ps-blog-card__date,
.m2ps-blog-related .m2ps-blog-card__excerpt {
    color: rgba(255,255,255,.7);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .m2ps-blog-listing__head {
        grid-template-columns: 1fr;
        gap: 20px;
        align-items: start;
    }

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

@media (max-width: 640px) {
    .m2ps-blog-shell,
    .m2ps-blog-hero__inner,
    .m2ps-blog-single-hero__inner,
    .m2ps-blog-article__shell {
        width: min(100% - 28px, var(--m2ps-blog-shell));
    }

    .m2ps-blog-hero,
    .m2ps-blog-single-hero {
        min-height: 480px;
    }

    .m2ps-blog-hero__inner,
    .m2ps-blog-single-hero__inner {
        padding: 88px 0 124px;
    }

    .m2ps-blog-hero::after,
    .m2ps-blog-single-hero::after {
        height: 78px;
        clip-path: polygon(0 58%, 60% 33%, 88% 0, 100% 25%, 100% 100%, 0 100%);
    }

    .m2ps-blog-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }

    .m2ps-blog-filters::-webkit-scrollbar {
        display: none;
    }

    .m2ps-blog-filter {
        flex: 0 0 auto;
    }

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

    .m2ps-blog-card__title {
        font-size: 28px;
    }

    .m2ps-blog-article__content {
        font-size: 14px;
        line-height: 1.9;
    }
}
