/* ========================================================================== 
    Markedsmateriell.no — Blog styles (archive + single) 
    Brand: primary #0084D6 | text #181F25 | bg #F5F7F9/#F5F9FC | border #D3D3D3 
            primary button gradient #FFAB1A -> #FF7700 
    Loaded only on blog screens (see inc/mm-blog.php). 
========================================================================== */
.mm-blog {
    color: #181F25;
}

.mm-blog * {
    box-sizing: border-box;
}

/* shared button ----------------------------------------------------------- */
.mm-btn {
    display: inline-block;
    text-decoration: none;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 150%;
    padding: 13px 26px;
    border-radius: 6px;
    background-color: transparent;
    transition: transform .15s ease, box-shadow .15s ease;
    border: 2px solid transparent;
}

.mm-btn:hover {
    transform: translateY(-2px);
}

.mm-btn--primary {
    background-color: var( --e-global-color-ddf6cad );
    color: #fff;
    fill: #fff;
}

.mm-btn--primary:hover {
    background-color: var( --e-global-color-accent );
    color: #fff;
}

.mm-btn--secondary {
    background: #0084D6;
    color: #fff;
}

.mm-btn--secondary:hover {
    box-shadow: 0 8px 20px rgba(0, 132, 214, .28);
    color: #fff;
}

/* container + 2-col layout ------------------------------------------------ */
.mm-blog-container {
    max-width: 1260px;
    margin: 0 auto;
}

.mm-blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 44px;
    align-items: start;
    padding: 40px 20px 56px;
}

.mm-blog-main {
    min-width: 0;
}

/* ------------------------------ HERO (image) ----------------------------- */
.mm-hero {
    position: relative;
    background-color: #0b1622;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mm-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 16, 26, .88) 0%, rgba(8, 16, 26, .64) 46%, rgba(8, 16, 26, .22) 100%);
}

.mm-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 1260px;
    margin: 0 auto;
    padding: 88px 20px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    color: #fff;
}

.mm-hero .mm-blog-breadcrumb {
    font-size: .85rem;
    color: rgba(255, 255, 255, .8);
    margin-bottom: 16px;
}

.mm-hero .mm-blog-breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.mm-hero .mm-blog-breadcrumb a:hover {
    text-decoration: underline;
}

.mm-hero__eyebrow {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 132, 214, .92);
    padding: 5px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
    text-decoration: none;
}

.mm-hero__eyebrow--link:hover {
    background: #0084D6;
}

.mm-hero__title {
    color: #fff;
    font-size: clamp(2.1rem, 5vw, 3.4rem) !important;
    font-weight: 800;
    line-height: 1.1 !important;
    margin: 0 0 16px;
    max-width: 780px;
}

.mm-hero__subtitle {
    color: #fff;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 600;
    margin: 0 0 12px;
    max-width: 700px;
}

.mm-hero__desc {
    color: rgba(255, 255, 255, .9);
    font-size: 1rem;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 0 26px;
}

.mm-hero__desc p {
    margin: 0 0 10px;
}

.mm-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .92);
    font-size: .95rem;
}

.mm-hero__dot {
    color: rgba(255, 255, 255, .5);
}

.mm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.mm-btn--ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .85);
}

.mm-btn--ghost:hover {
    background: #fff;
    color: #0084D6;
    border-color: #fff;
    box-shadow: none;
}

/* -------------------------------- TOOLBAR -------------------------------- */
.mm-blog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.mm-blog-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mm-blog-filter__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    font-weight: 600;
    font-size: .92rem;
    color: #181F25;
    background: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 999px;
    padding: 8px 15px;
    transition: all .15s ease;
}

.mm-blog-filter__item:hover {
    border-color: #0084D6;
    color: #0084D6;
}

.mm-blog-filter__item.is-active {
    background: #0084D6;
    border-color: #0084D6;
    color: #fff;
}

.mm-blog-filter__count {
    font-size: .72rem;
    font-weight: 700;
    background: rgba(0, 0, 0, .06);
    border-radius: 999px;
    padding: 1px 8px;
    line-height: 1.6;
}

.mm-blog-filter__item.is-active .mm-blog-filter__count {
    background: rgba(255, 255, 255, .25);
}

.mm-blog-search {
    display: flex;
    align-items: center;
    position: relative;
}

.mm-blog-search input {
    height: 42px;
    width: 220px;
    max-width: 60vw;
    border: 1px solid #D3D3D3;
    border-radius: 999px;
    padding: 0 44px 0 18px;
    font-size: .95rem;
    color: #181F25;
    background: #fff;
}

.mm-blog-search input:focus {
    outline: none;
    border-color: #0084D6;
    box-shadow: 0 0 0 3px rgba(0, 132, 214, .15);
}

.mm-blog-search button {
    position: absolute;
    right: 6px;
    height: 32px;
    width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #0084D6;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

.mm-blog-search button:hover {
    background: #006bb0;
}

/* --------------------------- HORIZONTAL CARD ----------------------------- */
.mm-blog-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-bottom: 40px;
}

.mm-blog-card {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 22px;
    background: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    padding: 0;
}

.mm-blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(24, 31, 37, .12);
    border-color: #0084D6;
}

.mm-blog-card__media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #F5F7F9;
    min-height: 190px;
}

.mm-blog-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.mm-blog-card:hover .mm-blog-card__img {
    transform: scale(1.05);
}

.mm-blog-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0084D6 0%, #005e9a 100%);
    padding: 18px;
}

.mm-blog-card__placeholder-text {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    opacity: .92;
}

.mm-blog-card__body {
    display: flex;
    flex-direction: column;
    padding: 22px 24px 22px 0;
}

.mm-blog-card__cat {
    align-self: flex-start;
    text-decoration: none;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #0084D6;
    margin-bottom: 8px;
}

.mm-blog-card__cat:hover {
    text-decoration: underline;
}

.mm-blog-card__title {
    font-size: 1.3rem !important;
    line-height: 1.3 !important;
    margin: 0 0 10px;
}

.mm-blog-card__title a {
    color: #181F25;
    text-decoration: none;
}

.mm-blog-card__title a:hover {
    color: #0084D6;
}

.mm-blog-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: #6a7480;
    margin-bottom: 10px;
}

.mm-blog-card__dot {
    color: #c2c9d1;
}

.mm-blog-card__excerpt {
    font-size: .96rem;
    line-height: 1.6;
    color: #4a545e;
    margin: 0 0 14px;
}

.mm-blog-card__more {
    margin-top: auto;
    align-self: flex-start;
    text-decoration: none;
    font-weight: 700;
    font-size: .95rem;
    color: #0084D6;
}

.mm-blog-card__more span {
    transition: transform .15s ease;
    display: inline-block;
}

.mm-blog-card__more:hover span {
    transform: translateX(4px);
}

/* ------------------------------ PAGINATION ------------------------------- */
.mm-blog-pagination {
    margin: 8px 0 0;
}

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

.mm-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #D3D3D3;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    color: #181F25;
    background: #fff;
    transition: all .15s ease;
}

.mm-blog-pagination .page-numbers:hover {
    border-color: #0084D6;
    color: #0084D6;
}

.mm-blog-pagination .page-numbers.current {
    background: #0084D6;
    border-color: #0084D6;
    color: #fff;
}

.mm-blog-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}

/* ------------------------------ EMPTY STATE ------------------------------ */
.mm-blog-empty {
    text-align: center;
    background: #F5F9FC;
    border: 1px solid #D3D3D3;
    border-radius: 12px;
    padding: 56px 24px;
}

.mm-blog-empty h2 {
    margin: 0 0 10px;
    color: #181F25;
}

.mm-blog-empty p {
    color: #4a545e;
    margin: 0 0 22px;
}

/* ============================== SIDEBAR ================================== */
.mm-blog-sidebar {
    top: 24px;
}

.mm-sb-block {
    background: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 12px;
    padding: 22px 22px 24px;
    margin-bottom: 24px;
}

.mm-sb-block__title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #181F25;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e6ea;
    position: relative;
}

.mm-sb-block__title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 46px;
    height: 3px;
    background: #0084D6;
}

.mm-sb-form__inner {
    font-size: .95rem;
}

/* most read */
.mm-mostread {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: mr;
}

.mm-mostread li {
    padding: 12px 0;
    border-bottom: 1px solid #eceff2;
}

.mm-mostread li:first-child {
    padding-top: 0;
}

.mm-mostread li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mm-mostread a {
    display: block;
    color: #181F25;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.45;
}

.mm-mostread a:hover {
    color: #0084D6;
}

/* social */
.mm-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mm-social a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F5F7F9;
    color: #0084D6;
    border: 1px solid #D3D3D3;
    transition: all .15s ease;
}

.mm-social a:hover {
    background: #0084D6;
    color: #fff;
    border-color: #0084D6;
    transform: translateY(-2px);
}

.mm-social svg {
    width: 18px;
    height: 18px;
}

.mmpost .mmpost-card {
    margin: 0px !important;
}

/* ============================== SINGLE =================================== */
/* .mm-single-article {
    background: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 12px;
    padding: 30px 14px 32px;
} */

.mm-single-content {
    padding: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: #181F25;
}

.mm-single-content > div > div {
    padding: 0;
}

.mm-single-content > *:first-child {
    margin-top: 0;
}

.mm-single-content p {
    margin: 0 0 1.2em;
}

.mm-single-content h2 {
    font-size: 1.6rem;
    line-height: 1.3;
    margin: 1.6em 0 .5em;
    color: #181F25;
}

.mm-single-content h3 {
    font-size: 1.3rem;
    line-height: 1.3;
    margin: 1.4em 0 .45em;
    color: #181F25;
}

.mm-single-content a {
    color: #0084D6;
    text-decoration: underline;
}

.mm-single-content a:hover {
    color: #006bb0;
}

.mm-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.mm-single-content figure {
    margin: 1.6em auto;
    text-align: center;
    max-width: 100%;
}

.mm-single-content figcaption {
    font-size: 14px;
    color: #5a6470;
    margin-top: 8px;
    line-height: 1.5;
}

.mm-single-content ul,
.mm-single-content ol {
    margin: 0 0 1.2em;
    padding-left: 1.4em;
}

.mm-single-content li {
    margin-bottom: .5em;
}

.mm-single-content blockquote {
    margin: 1.5em 0;
    padding: 16px 22px;
    background: #F5F9FC;
    border-left: 4px solid #0084D6;
    border-radius: 0 8px 8px 0;
    color: #2c343c;
    font-style: italic;
}

.mm-single-tags {
    padding: 22px 20px 0;
}

.mm-single-tags a {
    display: inline-block;
    font-size: .82rem;
    color: #0084D6;
    background: #F5F9FC;
    border: 1px solid #D3D3D3;
    border-radius: 999px;
    padding: 4px 12px;
    margin: 0 6px 6px 0;
    text-decoration: none;
}

.mm-single-tags a:hover {
    background: #0084D6;
    color: #fff;
    border-color: #0084D6;
}

/* share */
.mm-share {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 22px 20px 0;
}

.mm-share__label {
    font-weight: 700;
    color: #181F25;
    margin-right: 4px;
}

.mm-share__btn {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F5F7F9;
    color: #181F25;
    border: 1px solid #D3D3D3;
    cursor: pointer;
    transition: all .15s ease;
}

.mm-share__btn svg {
    width: 18px;
    height: 18px;
}

.mm-share__btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

.mm-share__btn--fb:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.mm-share__btn--x:hover {
    background: #000;
    border-color: #000;
}

.mm-share__btn--in:hover {
    background: #0A66C2;
    border-color: #0A66C2;
}

.mm-share__btn--copy:hover {
    background: #0084D6;
    border-color: #0084D6;
}

.mm-share__btn--copy.is-copied {
    background: #1f9d55;
    border-color: #1f9d55;
    color: #fff;
}

/* prev / next */
.mm-postnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 28px;
}

.mm-postnav__item {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 10px;
    padding: 16px 18px;
    transition: all .15s ease;
}

.mm-postnav__item:hover {
    border-color: #0084D6;
    box-shadow: 0 8px 20px rgba(24, 31, 37, .08);
}

.mm-postnav__next {
    text-align: right;
}

.mm-postnav__label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: #0084D6;
    margin-bottom: 6px;
}

.mm-postnav__title {
    display: block;
    font-size: .98rem;
    line-height: 1.35;
    color: #181F25;
}

/* related */
.mm-related {
    margin-top: 44px;
}

.mm-related__title {
    font-size: 1.5rem !important;
    margin: 0 0 20px;
    color: #181F25;
}

.mm-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.mm-related__card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    border: 1px solid #D3D3D3;
    border-radius: 10px;
    overflow: hidden;
    transition: all .2s ease;
}

.mm-related__card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(24, 31, 37, .10);
    border-color: #0084D6;
}

.mm-related__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #F5F7F9;
}

.mm-related__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mm-related__cat {
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #0084D6;
    padding: 14px 16px 0;
}

.mm-related__name {
    font-size: 1.02rem;
    line-height: 1.35;
    margin: 6px 16px 0;
    color: #181F25;
}

.mm-related__date {
    font-size: .8rem;
    color: #6a7480;
    padding: 8px 16px 16px;
    margin-top: auto;
}

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

@media (max-width: 1024px) {
    .mm-hero__inner {
        padding: 40px 16px;
        justify-content: end;
        height: 650px;
    }

    .mm-blog-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 24px;
    }

    .mm-blog-card__cat {
        margin-bottom: 0px;
        line-height: 1;
    }

    .mm-blog-card__title {
        font-size: 18px !important;
        line-height: 1.3 !important;
        margin: 0 0 5px !important;
    }

    .mm-blog-card__meta {
        font-size: 12px;
        line-height: 1.5;
        margin-bottom: 5px;
    }

    .mm-blog-card__excerpt {
        font-size: 14px;
    }

    .mm-blog-card__more {
        font-size: 14px;
        line-height: 1;
    }
}

@media (max-width: 992px) {
    .mm-blog-layout {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .mm-blog-sidebar {
        position: static;
    }
}

@media (max-width: 680px) {
    .mm-hero__inner {
        min-height: 340px;
        padding: 58px 18px;
    }

    .mm-hero__scrim {
        background: linear-gradient(180deg, rgba(8, 16, 26, .72) 0%, rgba(8, 16, 26, .58) 100%);
    }

    .mm-blog-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mm-blog-search input {
        width: 100%;
        max-width: none;
    }

    .mm-blog-filter {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .mm-blog-filter__item {
        white-space: nowrap;
    }

    .mm-blog-card {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mm-blog-card__media {
        aspect-ratio: 16 / 10;
    }

    .mm-blog-card__body {
        padding: 20px 22px 22px;
    }

    .mm-postnav {
        grid-template-columns: 1fr;
    }

    .mm-postnav__next {
        text-align: left;
    }

    .mm-related__grid {
        grid-template-columns: 1fr;
    }

    .mmpost .mmpost-table td {
        padding: 13px !important;
        font-size: 14px !important;
        line-height: 1.1 !important;
    }

    .mmpost .mmpost-table {
        min-width: 600px !important;
        font-size: 14px !important;
        line-height: 1.1 !important;
    }
}