/*
 * MTB blog module
 *
 * All MTB-specific blog rules live in this file.  Keeping them below
 * themes/mtb/css/modules/ makes header.php load them only for /blog and
 * /blog/<slug>, after the global MTB stylesheet.
 */

#blog-page,
.cms-blog {
    --mtb-blog-accent: #0c297a;
    --mtb-blog-accent-dark: #081d5b;
    --mtb-blog-red: #da251c;
    --mtb-blog-ink: #151b22;
    --mtb-blog-muted: #68737d;
    --mtb-blog-line: #dfe4e8;
    --mtb-blog-paper: #ffffff;
    --mtb-blog-soft: #f3f6f8;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    color: var(--mtb-blog-ink);
    background: var(--mtb-blog-paper);
}

#blog-page *,
.cms-blog * {
    box-sizing: border-box;
}

#blog-page img,
.cms-blog img {
    max-width: 100%;
}

#blog-page section img:hover,
.cms-blog section img:hover {
    transform: none;
}

#blog-page .container,
.cms-blog .container {
    width: min(100% - 40px, 1120px);
    margin-right: auto;
    margin-left: auto;
}

/* Blog overview ---------------------------------------------------------- */

#blog-page .blog-hero {
    position: relative;
    overflow: hidden;
    color: var(--mtb-blog-ink);
    background:
        radial-gradient(circle at 85% 20%, rgba(12, 41, 122, .11), transparent 29%),
        linear-gradient(135deg, #fff 0%, #f3f6f8 100%);
}

#blog-page .blog-hero::before {
    content: "";
    position: absolute;
    top: -190px;
    right: -120px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(12, 41, 122, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(12, 41, 122, .025), 0 0 0 140px rgba(12, 41, 122, .015);
    pointer-events: none;
}

#blog-page .blog-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 360px;
    align-items: center;
    padding-top: clamp(60px, 7vw, 92px);
    padding-bottom: clamp(60px, 7vw, 92px);
}

#blog-page .blog-hero-copy {
    width: min(100%, 780px);
}

#blog-page .blog-overline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--mtb-blog-accent);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

#blog-page .blog-overline::before {
    content: "";
    width: 30px;
    height: 2px;
    background: var(--mtb-blog-red);
}

#blog-page .blog-hero h1 {
    max-width: 850px;
    margin: 18px 0 22px;
    color: var(--mtb-blog-ink);
    font-size: clamp(3rem, 6vw, 5.7rem);
    font-weight: 800;
    letter-spacing: -.055em;
    line-height: .94;
}

#blog-page .blog-hero h1 span {
    color: var(--mtb-blog-accent);
}

#blog-page .blog-hero-copy > p {
    max-width: 690px;
    margin: 0;
    color: var(--mtb-blog-muted);
    font-size: clamp(.98rem, 1.25vw, 1.12rem);
    line-height: 1.7;
}

#blog-page .blog-category-bar {
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(12, 41, 122, .06);
    border-bottom: 1px solid var(--mtb-blog-line);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 35px rgba(17, 28, 39, .05);
}

#blog-page .blog-category-inner {
    display: flex;
    min-width: 0;
    min-height: 76px;
    align-items: center;
    gap: 25px;
    overflow: hidden;
}

#blog-page .blog-category-inner > span {
    flex: 0 0 auto;
    color: var(--mtb-blog-muted);
    font-size: .69rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

#blog-page .blog-filters {
    display: flex;
    min-width: 0;
    max-width: 100%;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

#blog-page .blog-filter {
    flex: 0 0 auto;
    padding: 9px 15px;
    color: #515c66;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}

#blog-page .blog-filter:hover,
#blog-page .blog-filter.is-active {
    color: #fff;
    border-color: var(--mtb-blog-accent);
    background: var(--mtb-blog-accent);
}

#blog-page .blog-filter:focus-visible {
    outline: 3px solid rgba(12, 41, 122, .24);
    outline-offset: 2px;
}

#blog-page .blog-featured-section {
    padding: clamp(58px, 6vw, 88px) 0 clamp(48px, 5vw, 72px);
    background: #fff;
}

#blog-page .blog-featured-section[hidden],
#blog-page .blog-featured-section.is-filter-hidden,
#blog-page .blog-card.is-filter-hidden,
#blog-page .blog-card[hidden] {
    display: none !important;
}

#blog-page .blog-featured {
    display: grid;
    min-height: 490px;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    overflow: hidden;
    border: 1px solid var(--mtb-blog-line);
    border-radius: 22px;
    background: var(--mtb-blog-soft);
    box-shadow: 0 22px 60px rgba(17, 28, 39, .10);
}

#blog-page .blog-featured-image {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 490px;
    place-items: center;
    overflow: hidden;
    color: #fff;
    background: #1d252c;
}

#blog-page .blog-featured-image img:not(.blog-image-backdrop) {
    position: relative;
    z-index: 1;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: contain !important;
}

#blog-page .blog-featured-image .blog-image-backdrop {
    position: absolute;
    inset: -25px;
    display: block;
    width: calc(100% + 50px) !important;
    height: calc(100% + 50px) !important;
    max-width: none !important;
    object-fit: cover !important;
    filter: blur(22px);
    opacity: .38;
    transform: scale(1.05) !important;
}

#blog-page .blog-featured-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(34px, 4vw, 58px);
}

#blog-page .blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: var(--mtb-blog-muted);
    font-size: .71rem;
    font-weight: 600;
}

#blog-page .blog-meta > * + *::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 3px;
    margin: 0 14px 2px 0;
    border-radius: 50%;
    background: #929ba3;
}

#blog-page .blog-category {
    color: var(--mtb-blog-red);
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

#blog-page .blog-featured h2 {
    max-width: 100%;
    margin: 20px 0 18px;
    color: var(--mtb-blog-ink);
    font-size: clamp(2rem, 3.25vw, 3.15rem);
    font-weight: 800;
    hyphens: auto;
    overflow-wrap: anywhere;
    letter-spacing: -.04em;
    line-height: 1.06;
}

#blog-page .blog-featured-copy > p {
    margin: 0 0 26px;
    color: var(--mtb-blog-muted);
    font-size: .98rem;
    line-height: 1.72;
}

#blog-page .blog-read-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--mtb-blog-accent);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

#blog-page .blog-read-link i {
    color: var(--mtb-blog-red);
    transition: transform .2s ease;
}

#blog-page .blog-read-link:hover i {
    transform: translateX(4px);
}

#blog-page .blog-posts-section {
    padding: clamp(58px, 6vw, 88px) 0 clamp(75px, 8vw, 120px);
    background: var(--mtb-blog-soft);
}

#blog-page .blog-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 38px;
    padding-bottom: 23px;
    border-bottom: 1px solid #d8dee3;
}

#blog-page .blog-section-heading h2 {
    margin: 10px 0 0;
    color: var(--mtb-blog-ink);
    font-size: clamp(2.15rem, 4vw, 3.55rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.02;
}

#blog-page .blog-section-heading > p {
    flex: 0 0 auto;
    margin: 0;
    color: var(--mtb-blog-muted);
    font-size: .8rem;
    font-weight: 700;
}

#blog-page .blog-section-heading > p span {
    color: var(--mtb-blog-accent);
}

#blog-page .blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 24px;
}

#blog-page .blog-card {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--mtb-blog-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(17, 28, 39, .06);
    transition: transform .22s ease, box-shadow .22s ease;
}

#blog-page .blog-card:hover {
    box-shadow: 0 19px 45px rgba(17, 28, 39, .12);
    transform: translateY(-4px);
}

#blog-page .blog-card-image {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    flex: 0 0 auto;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-bottom: 1px solid var(--mtb-blog-line);
    color: var(--mtb-blog-accent);
    background: #e9edf0;
}

#blog-page .blog-card-image img {
    position: static;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
}

#blog-page .blog-card-body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 25px 25px 28px;
}

#blog-page .blog-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 16px 0 13px;
    color: var(--mtb-blog-ink);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.2;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

#blog-page .blog-card p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 22px;
    color: var(--mtb-blog-muted);
    font-size: .9rem;
    line-height: 1.68;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

#blog-page .blog-empty {
    margin: 30px 0 0;
    padding: 36px;
    color: var(--mtb-blog-muted);
    border: 1px dashed #b9c2ca;
    border-radius: 15px;
    text-align: center;
}

#blog-page .blog-quote {
    color: #fff;
    background:
        radial-gradient(circle at 15% 25%, rgba(218, 37, 28, .14), transparent 28%),
        linear-gradient(135deg, #111821, #080c12);
}

#blog-page .blog-quote-inner {
    display: grid;
    min-height: 360px;
    place-items: center;
    align-content: center;
    padding-top: 65px;
    padding-bottom: 65px;
    text-align: center;
}

#blog-page .blog-quote i {
    color: #8ea8ff;
    font-size: 2rem;
}

#blog-page .blog-quote blockquote {
    max-width: 860px;
    margin: 20px auto 18px;
    color: #fff;
    font-size: clamp(1.65rem, 3.2vw, 3rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.18;
}

#blog-page .blog-quote span {
    color: rgba(255, 255, 255, .6);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

/* Single article --------------------------------------------------------- */

.cms-blog {
    --blog-accent: var(--mtb-blog-accent);
    --blog-ink: var(--mtb-blog-ink);
    --blog-muted: var(--mtb-blog-muted);
    --blog-line: var(--mtb-blog-line);
    color: var(--mtb-blog-ink) !important;
    background: #fff !important;
}

.cms-blog .cms-blog-article-header {
    padding: clamp(54px, 7vw, 90px) 0 clamp(38px, 5vw, 62px);
    color: var(--mtb-blog-ink);
    background:
        radial-gradient(circle at 82% 18%, rgba(12, 41, 122, .08), transparent 28%),
        #f1f5f4;
}

.cms-blog .cms-blog-article-header .container {
    max-width: 950px;
}

.cms-blog .cms-blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 25px;
    color: #7b878e;
    font-size: .72rem;
}

.cms-blog .cms-blog-breadcrumb a:hover,
.cms-blog .cms-blog-category,
.cms-blog .cms-blog-content a,
.cms-blog .cms-blog-gallery-heading small,
.cms-blog .cms-blog-event-details small {
    color: var(--mtb-blog-accent) !important;
}

.cms-blog .cms-blog-article-header h1 {
    max-width: 920px;
    color: var(--mtb-blog-ink);
    font-size: clamp(2.35rem, 4.7vw, 4.2rem);
    font-weight: 800;
    hyphens: auto;
    overflow-wrap: break-word;
    letter-spacing: -.035em;
    line-height: 1.08;
    text-wrap: balance;
    margin: 0;
}

.cms-blog .cms-blog-lead {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--mtb-blog-muted);
    font-size: 1.1rem;
    line-height: 1.65;
}

.cms-blog .cms-blog-byline,
.cms-blog .cms-blog-byline a {
    color: #738087;
}

.cms-blog .cms-blog-byline {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 24px;
    font-size: .78rem;
}

.cms-blog .cms-blog-byline span,
.cms-blog .cms-blog-byline time {
    display: flex;
    align-items: center;
    gap: 7px;
}

.cms-blog .cms-blog-hero-image {
    display: flex;
    width: min(100% - 40px, 1120px);
    max-width: 1120px;
    align-items: center;
    justify-content: center;
    margin-top: clamp(28px, 4vw, 48px);
    padding: 0;
}

.cms-blog .cms-blog-hero-image img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 680px;
    margin: 0 auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 18px 55px rgba(17, 28, 39, .12);
}

.cms-blog .cms-blog-article-layout {
    display: grid;
    width: min(100% - 40px, 950px);
    max-width: 950px;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 30px;
    padding-top: clamp(42px, 5vw, 68px);
}

.cms-blog .cms-blog-share {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
}

.cms-blog .cms-blog-share > span {
    margin-bottom: 3px;
    color: #7b878e;
    font-size: .62rem;
    text-transform: uppercase;
    writing-mode: vertical-rl;
}

.cms-blog .cms-blog-share a,
.cms-blog .cms-blog-share button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--mtb-blog-line);
    border-radius: 50%;
    color: var(--mtb-blog-accent);
    background: #fff;
    cursor: pointer;
}

.cms-blog .cms-blog-content {
    min-width: 0;
    max-width: 780px;
    color: #303a42;
    font-size: 1.04rem;
    line-height: 1.85;
}

.cms-blog .cms-blog-content > :first-child {
    margin-top: 0;
}

.cms-blog .cms-blog-content > :last-child {
    margin-bottom: 0;
}

.cms-blog .cms-blog-content h2,
.cms-blog .cms-blog-content h3,
.cms-blog .cms-blog-content h4 {
    color: var(--mtb-blog-ink);
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.18;
}

.cms-blog .cms-blog-content h2 {
    font-size: clamp(1.75rem, 2.8vw, 2.4rem);
}

.cms-blog .cms-blog-content h3 {
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
}

.cms-blog .cms-blog-content p {
    margin-bottom: 1.2rem;
}

.cms-blog .cms-blog-content ul,
.cms-blog .cms-blog-content ol {
    padding-left: 1.5rem;
}

.cms-blog .cms-blog-content img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    border-radius: 8px;
}

.cms-blog .cms-blog-content figure {
    max-width: 100%;
    margin-inline: auto;
}

.cms-blog .cms-blog-content iframe,
.cms-blog .cms-blog-content video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 1.5rem auto;
    aspect-ratio: 16 / 9;
}

.cms-blog .cms-blog-content table,
.cms-blog .cms-blog-content pre {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.cms-blog .cms-blog-content blockquote {
    padding: 20px 24px;
    margin: 28px 0;
    border-left: 4px solid var(--mtb-blog-accent);
    background: var(--mtb-blog-soft);
    color: var(--mtb-blog-ink);
}

.cms-blog .cms-blog-content a[data-pin-do] {
    display: block;
    max-width: 100%;
    margin: 2rem 0;
    overflow-x: auto;
}

.cms-blog .cms-blog-content .blog-inline-media {
    width: min(100%, 780px);
    margin: 2rem auto;
}

.cms-blog .cms-blog-content .blog-inline-media img,
.cms-blog .cms-blog-content .blog-inline-media video,
.cms-blog .cms-blog-content .blog-inline-media iframe {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: 0;
    border-radius: 8px;
    background: #edf2ef;
}

.cms-blog .cms-blog-content .blog-inline-media figcaption {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    padding-top: .65rem;
    color: var(--mtb-blog-muted);
    font-size: .76rem;
    line-height: 1.5;
}

.cms-blog .cms-blog-event {
    display: grid;
    max-width: 950px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    margin-top: 30px;
    padding: 24px 26px;
    border: 1px solid var(--mtb-blog-line);
    border-left-width: 4px;
    border-color: var(--mtb-blog-line);
    border-left-color: var(--mtb-blog-accent);
    border-radius: 15px;
    background: var(--mtb-blog-soft);
}

.cms-blog .cms-blog-event-icon {
    color: var(--mtb-blog-accent);
    background: #e2e9fa;
}

.cms-blog .cms-blog-event-cta {
    border-radius: 999px;
    background: var(--mtb-blog-accent);
}

.cms-blog .cms-blog-gallery {
    width: min(100% - 40px, 1120px);
    max-width: 1120px;
    margin-top: 50px;
}

.cms-blog .cms-blog-gallery-heading {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 18px;
}

.cms-blog .cms-blog-gallery-heading h2 {
    margin: 0;
    color: var(--mtb-blog-ink);
    font-size: 1.55rem;
}

.cms-blog .cms-blog-gallery-heading span {
    margin-left: auto;
    color: var(--mtb-blog-muted);
    font-size: .75rem;
}

.cms-blog .cms-blog-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 260px;
    gap: 14px;
}

.cms-blog .cms-blog-gallery-item {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #e9edf0;
}

.cms-blog .cms-blog-gallery-item.is-large {
    grid-column: span 2;
    grid-row: span 2;
}

.cms-blog .cms-blog-gallery-item a,
.cms-blog .cms-blog-gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
}

.cms-blog .cms-blog-gallery-item img {
    object-fit: cover;
}

.cms-blog .cms-blog-article-footer {
    display: flex;
    width: min(100% - 40px, 950px);
    max-width: 950px;
    justify-content: space-between;
    margin-top: 42px;
    padding-top: 22px;
    padding-bottom: 55px;
    border-top: 1px solid var(--mtb-blog-line);
}

.cms-blog .cms-blog-article-footer a {
    color: var(--mtb-blog-accent);
}

/* Reactions and comments ------------------------------------------------- */

.cms-blog .cms-blog-interactions {
    width: min(100% - 40px, 950px);
    max-width: 950px;
    margin-top: 58px;
    scroll-margin-top: 100px;
}

.cms-blog .cms-blog-interaction-message {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 13px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .86rem;
    font-weight: 650;
}

.cms-blog .cms-blog-interaction-message.is-success {
    border-color: #b7d9c3;
    color: #22623b;
    background: #edf8f1;
}

.cms-blog .cms-blog-interaction-message.is-error {
    border-color: #e5beb9;
    color: #8b3028;
    background: #fff1ef;
}

.cms-blog .cms-blog-reactions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    padding: 28px 30px;
    border: 1px solid var(--mtb-blog-line);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 15px 42px rgba(17, 28, 39, .07);
}

.cms-blog .cms-blog-interactions-copy small,
.cms-blog .cms-blog-comments-heading small {
    color: var(--mtb-blog-accent);
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .13em;
}

.cms-blog .cms-blog-interactions-copy h2,
.cms-blog .cms-blog-comments-heading h2 {
    margin: 4px 0 6px;
    color: var(--mtb-blog-ink);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.08;
}

.cms-blog .cms-blog-interactions-copy p {
    margin: 0;
    color: var(--mtb-blog-muted);
    font-size: .76rem;
}

.cms-blog .cms-blog-reaction-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.cms-blog .cms-blog-reaction-button {
    display: grid;
    min-width: 128px;
    min-height: 58px;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-content: center;
    column-gap: 9px;
    padding: 9px 16px;
    border: 1px solid #cfd6dc;
    border-radius: 999px;
    color: var(--mtb-blog-ink);
    background: var(--mtb-blog-soft);
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}

.cms-blog .cms-blog-reaction-button:hover {
    border-color: var(--mtb-blog-accent);
    transform: translateY(-2px);
}

.cms-blog .cms-blog-reaction-button > i {
    grid-row: 1 / 3;
    color: var(--mtb-blog-accent);
    font-size: 1.2rem;
}

.cms-blog .cms-blog-reaction-button > span {
    align-self: end;
    font-size: .7rem;
    font-weight: 750;
    line-height: 1;
}

.cms-blog .cms-blog-reaction-button > b {
    align-self: start;
    font-size: .88rem;
    line-height: 1;
}

.cms-blog .cms-blog-reaction-button.is-active {
    border-color: var(--mtb-blog-accent);
    color: #fff;
    background: var(--mtb-blog-accent);
    box-shadow: 0 8px 22px rgba(12, 41, 122, .22);
}

.cms-blog .cms-blog-reaction-button.is-active > i {
    color: #fff;
}

.cms-blog .cms-blog-reaction-button.is-dislike > i {
    color: #a44c45;
}

.cms-blog .cms-blog-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.cms-blog .cms-blog-comments {
    margin-top: 22px;
    padding: 30px;
    border: 1px solid var(--mtb-blog-line);
    border-radius: 17px;
    background: #fff;
}

.cms-blog .cms-blog-comments-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cms-blog .cms-blog-comments-heading > i {
    color: rgba(12, 41, 122, .14);
    font-size: 2rem;
}

.cms-blog .cms-blog-comment-form {
    display: grid;
    gap: 15px;
    margin-top: 20px;
    padding: 22px;
    border-radius: 13px;
    background: var(--mtb-blog-soft);
}

.cms-blog .cms-blog-comment-form label {
    display: grid;
    gap: 7px;
    margin: 0;
}

.cms-blog .cms-blog-comment-form label > span {
    color: var(--mtb-blog-ink);
    font-size: .73rem;
    font-weight: 750;
}

.cms-blog .cms-blog-comment-form input,
.cms-blog .cms-blog-comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd3da;
    border-radius: 8px;
    outline: none;
    color: var(--mtb-blog-ink);
    background: #fff;
    font: inherit;
    font-size: .88rem;
}

.cms-blog .cms-blog-comment-form textarea {
    min-height: 125px;
    resize: vertical;
    line-height: 1.6;
}

.cms-blog .cms-blog-comment-form input:focus,
.cms-blog .cms-blog-comment-form textarea:focus {
    border-color: var(--mtb-blog-accent);
    box-shadow: 0 0 0 3px rgba(12, 41, 122, .12);
}

.cms-blog .cms-blog-comment-form > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cms-blog .cms-blog-comment-form > div > small {
    max-width: 430px;
    color: var(--mtb-blog-muted);
    font-size: .67rem;
    line-height: 1.45;
}

.cms-blog .cms-blog-comment-form button,
.cms-blog .cms-blog-comment-login a {
    padding: 11px 16px;
    border: 1px solid var(--mtb-blog-accent);
    border-radius: 999px;
    color: #fff;
    background: var(--mtb-blog-accent);
    font-size: .72rem;
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
}

.cms-blog .cms-blog-comment-form button i {
    margin-left: 6px;
}

.cms-blog .cms-blog-comment-identity {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: var(--mtb-blog-muted);
    font-size: .78rem;
}

.cms-blog .cms-blog-comment-login {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: 12px;
    background: var(--mtb-blog-soft);
}

.cms-blog .cms-blog-comment-login > i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--mtb-blog-accent);
    background: #fff;
}

.cms-blog .cms-blog-comment-login > div {
    min-width: 0;
}

.cms-blog .cms-blog-comment-login p {
    margin: 2px 0 0;
    color: var(--mtb-blog-muted);
    font-size: .75rem;
}

.cms-blog .cms-blog-comment-login a {
    margin-left: auto;
}

.cms-blog .cms-blog-comment-list {
    display: grid;
    gap: 0;
    margin-top: 24px;
}

.cms-blog .cms-blog-comment {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
    padding: 20px 0;
    border-top: 1px solid var(--mtb-blog-line);
}

.cms-blog .cms-blog-comment-avatar {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--mtb-blog-accent);
    font-weight: 800;
}

.cms-blog .cms-blog-comment header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px 12px;
}

.cms-blog .cms-blog-comment header > span {
    padding: 3px 7px;
    border-radius: 999px;
    color: var(--mtb-blog-accent);
    background: #e8edfb;
    font-size: .6rem;
    font-weight: 750;
}

.cms-blog .cms-blog-comment header > time {
    margin-left: auto;
    color: #879198;
    font-size: .66rem;
}

.cms-blog .cms-blog-comment p {
    margin: 8px 0 0;
    color: #404a52;
    font-size: .86rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.cms-blog .cms-blog-comments-empty {
    display: grid;
    justify-items: center;
    gap: 4px;
    margin: 24px 0 0;
    padding: 28px 18px;
    border-top: 1px solid var(--mtb-blog-line);
    color: var(--mtb-blog-muted);
    text-align: center;
}

.cms-blog .cms-blog-comments-empty i {
    margin-bottom: 5px;
    color: var(--mtb-blog-accent);
    font-size: 1.4rem;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 991.98px) {
    #blog-page .blog-featured {
        min-height: 0;
        grid-template-columns: 1fr;
    }

    #blog-page .blog-featured-image {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

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

@media (max-width: 700px) {
    #blog-page .container,
    .cms-blog .container {
        width: min(100% - 32px, 1120px);
    }

    #blog-page .blog-hero-inner {
        min-height: 320px;
        padding-top: 52px;
        padding-bottom: 52px;
    }

    #blog-page .blog-hero h1 {
        font-size: clamp(2.5rem, 12vw, 3.4rem);
        letter-spacing: -.045em;
    }

    #blog-page .blog-category-inner {
        display: block;
        min-height: 0;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    #blog-page .blog-category-inner > span {
        display: block;
        margin-bottom: 9px;
    }

    #blog-page .blog-featured-section {
        padding-top: 38px;
    }

    #blog-page .blog-featured {
        border-radius: 16px;
    }

    #blog-page .blog-featured-image {
        max-height: 260px;
    }

    #blog-page .blog-featured-copy {
        padding: 27px 22px 31px;
    }

    #blog-page .blog-featured h2 {
        font-size: clamp(1.8rem, 9vw, 2.4rem);
    }

    #blog-page .blog-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    #blog-page .blog-grid {
        grid-template-columns: 1fr;
    }

    #blog-page .blog-quote-inner {
        min-height: 320px;
    }

    .cms-blog .cms-blog-article-header {
        padding: 46px 0 34px;
    }

    .cms-blog .cms-blog-article-header h1 {
        font-size: clamp(2rem, 9vw, 2.7rem);
        overflow-wrap: anywhere;
        text-wrap: wrap;
    }

    .cms-blog .cms-blog-hero-image {
        width: min(100% - 32px, 520px);
        margin-top: 22px;
    }

    .cms-blog .cms-blog-hero-image img {
        max-height: 380px;
        border-radius: 8px;
    }

    .cms-blog .cms-blog-article-layout {
        width: min(100% - 32px, 950px);
        grid-template-columns: 1fr;
        gap: 0;
        padding-top: 30px;
    }

    .cms-blog .cms-blog-content {
        max-width: none;
        font-size: .97rem;
        line-height: 1.75;
    }

    .cms-blog .cms-blog-content,
    .cms-blog .cms-blog-content * {
        min-width: 0;
    }

    .cms-blog .cms-blog-share {
        width: 100%;
        justify-content: flex-start;
        flex-direction: row;
        margin-top: 24px;
        padding-top: 18px;
        border-top: 1px solid var(--mtb-blog-line);
    }

    .cms-blog .cms-blog-share > span {
        margin: 0 5px 0 0;
        writing-mode: horizontal-tb;
    }

    .cms-blog .cms-blog-interactions,
    .cms-blog .cms-blog-article-footer {
        width: min(100% - 32px, 950px);
    }

    .cms-blog .cms-blog-interactions {
        margin-top: 38px;
    }

    .cms-blog .cms-blog-reactions {
        grid-template-columns: 1fr;
        padding: 22px 20px;
    }

    .cms-blog .cms-blog-reaction-form {
        justify-content: flex-start;
    }

    .cms-blog .cms-blog-comments {
        padding: 22px 20px;
    }

    .cms-blog .cms-blog-comment-form {
        padding: 18px;
    }

    .cms-blog .cms-blog-comment-form > div {
        align-items: stretch;
        flex-direction: column;
    }

    .cms-blog .cms-blog-comment-form button {
        width: 100%;
    }

    .cms-blog .cms-blog-comment-login {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .cms-blog .cms-blog-comment-login a {
        width: 100%;
        margin-left: 0;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .cms-blog .cms-blog-reaction-form {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cms-blog .cms-blog-reaction-button {
        min-width: 0;
        padding-inline: 10px;
    }

    .cms-blog .cms-blog-reaction-form .cms-blog-reaction-button:only-of-type {
        grid-column: 1 / -1;
    }

    .cms-blog .cms-blog-comments {
        padding: 20px 16px;
    }

    .cms-blog .cms-blog-comment-form {
        padding: 16px 14px;
    }

    .cms-blog .cms-blog-comment {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
    }

    .cms-blog .cms-blog-comment-avatar {
        width: 36px;
        height: 36px;
    }

    .cms-blog .cms-blog-comment header > time {
        width: 100%;
        margin-left: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    #blog-page .blog-card,
    #blog-page .blog-read-link i,
    .cms-blog .cms-blog-reaction-button {
        transition: none;
    }
}
