/* =============================================
   MODUS DIGITAL - BLOG
   Blog hero, body, share rail, pagination, CTA
   ============================================= */


/* =============================================
   1. BLOG HERO
   ============================================= */

#carouselBlogHeader.md-blog-hero .carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(29, 53, 70, 0) 34.69%, rgba(29, 53, 70, 0.5) 58.6%, #1D3546 100%);
    z-index: 1;
}

/* Merged: v2 base + ux hero container & alignment */
.md-blog-hero .carousel-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto;
    padding-top: clamp(9rem, 14vw, 13rem);
    padding-bottom: clamp(3rem, 8vw, 6rem);
    padding-left: 0;
    padding-right: 0;
    background-size: cover;
    background-position: center;
}

/* Merged: v2 base + ux caption positioning.
   Horizontal alignment is now driven by the Bootstrap container/col wrapper
   in post.html (col-lg-10 offset-lg-1), so the caption aligns with the
   article body below. The caption itself is just an in-flow block. */
#carouselBlogHeader.md-blog-hero .carousel-caption.md-blog-hero-caption {
    position: relative;
    top: unset;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: var(--md-content-max-width);
    padding: 0;
    margin: 0;
    text-align: left;
    z-index: 2;
}

/* Merged: v2 base + ux h1 sizing */
#carouselBlogHeader.md-blog-hero .carousel-caption.md-blog-hero-caption h1.md-title {
    font-size: var(--md-font-fluid-h1);
    line-height: 1.15;
    text-wrap: balance;
}

/* Badge in hero caption (from ux) */
.md-blog-hero-caption .md-badge {
    font-size: 1rem;
    line-height: 1;
}

.md-blog-hero-avatar {
}

.md-blog-hero-byline {
    line-height: 1.3;
}

.md-blog-hero-byline-sep {
    display: inline-block;
    margin: 0 6px;
    opacity: 0.3;
}

.md-blog-hero-date {
    font-size: 0.875rem;
    margin-top: 2px;
}

.md-badge-solid {
    background: var(--md-color-accent);
    color: var(--md-color-black);
    border-color: var(--md-color-accent);
    backdrop-filter: none;
}

/* When the byline / date wrap onto multiple lines (long names or roles),
   the avatar should sit at the top of the column rather than vertically
   centered against the multi-line text block. */
@media (max-width: 47.99rem) {
    .md-blog-hero-caption > .d-flex.align-items-center {
        align-items: flex-start !important;
    }
}



/* =============================================
   2. BLOG POST - Author Meta & Intro
   ============================================= */

.md-blog-post-meta {
    color: #6b7280;
    font-family: var(--md-font-body);
    font-size: 15px;
}

.md-blog-post-author {
    font-weight: 600;
    color: var(--md-color-dark);
}

.md-blog-post-date {
    color: #6b7280;
}

.md-blog-post-meta-sep {
    color: var(--md-color-gray-400);
}

/* Merged: v2 base + ux intro sizing */
p.md-blog-post-intro {
    font-family: var(--md-font-body);
    font-size: var(--md-font-fluid-intro);
    line-height: 1.5;
    color: var(--md-color-dark);
    margin-bottom: 0;
}


/* =============================================
   3. BLOG BODY - Rich Text Typography
   ============================================= */

.md-blog-body {
    font-family: var(--md-font-body);
    font-size: 17px;
    line-height: 1.75;
    color: #3d4550;
}

/* Merged: v2 base + ux h2 */
.md-blog-body h2 {
    font-family: var(--md-font-display);
    font-size: var(--md-font-fluid-h2);
    font-weight: 700;
    line-height: 1.25;
    color: var(--md-color-dark);
    margin-top: 3.5rem;
    margin-bottom: 1.25rem;
    max-width: var(--md-content-max-width);
    text-wrap: pretty;
}

/* Merged: v2 base + ux h3 */
.md-blog-body h3 {
    font-family: var(--md-font-display);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--md-color-dark);
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    max-width: var(--md-content-max-width);
}

.md-blog-body h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--md-color-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    max-width: var(--md-content-max-width);
}

/* Merged: v2 base + ux paragraph sizing */
.md-blog-body p {
    margin-bottom: 1.25rem;
    font-size: 16px;
    line-height: 27px;
    max-width: var(--md-content-max-width);
}

.md-blog-body p,
.md-blog-body.with-list-styles ul > li,
.md-blog-body.with-list-styles ol > li {
    font-size: var(--md-font-fluid-body);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

/* Merged: v2 base + ux link color */
.md-blog-body a {
    color: var(--md-color-primary);
    text-decoration: underline;
    font-weight: 700;
}

.md-blog-body a:hover {
    color: var(--md-color-dark);
}

.md-blog-body ul,
.md-blog-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    max-width: var(--md-content-max-width);
}

.md-blog-body ul {
    list-style: none;
    padding-left: 0;
}

.md-blog-body li {
    margin-bottom: 0.4rem;
}

.md-blog-body ul > li {
    position: relative;
    padding-left: 2.5rem;
    list-style: none;
}

.md-blog-body ul > li::before {
    content: "";
    position: absolute;
    top: 0.2rem;
    left: 12px;
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3.3335 10H16.6668M16.6668 10L11.6668 5M16.6668 10L11.6668 15' stroke='%233B454F' stroke-width='1.66667' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.md-blog-body ol > li::marker {
    font-family: var(--md-font-display);
    font-size: 17px;
    line-height: 27px;
    left: 12px;
    font-weight: 700;
    color: var(--md-color-gray-800);
}

.md-blog-body.with-list-styles ul,
.md-blog-body.with-list-styles ol {
    margin-bottom: 1.5rem;
}

.with-list-styles ul>li {
    list-style: disc !important;
}

.md-blog-body.with-list-styles ul>li {
    display: block;
    list-style: none !important;
}

.md-blog-body.with-list-styles ul>li::marker {
    content: "";
}

.md-blog-body blockquote {
    border-left: 4px solid var(--md-color-accent);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: #f9f9f9;
    border-radius: 0 var(--md-radius-sm) var(--md-radius-sm) 0;
    font-style: italic;
    color: #4b5563;
    max-width: var(--md-content-max-width);
}

.md-blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--md-radius-md);
    margin: 1rem 0;
}


/* =============================================
   4. BLOG BODY - Tables
   ============================================= */

.md-blog-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 2rem;
    font-size: 16px;
    border-radius: var(--md-radius-lg);
    overflow: hidden;
    border: 1.5px solid #d8e4ed;
}

/* Merged: v2 base + ux table cell padding */
.md-blog-body table th,
.md-blog-body table td {
    padding: 1.25rem;
    min-width: 11.25rem;
    text-align: left;
    border-bottom: 1.5px solid #d8e4ed;
    color: #4a5a6a;
    background: var(--md-color-white);
    line-height: 1.4;
}

.md-blog-body table td:last-child {
    min-width: 15.625rem;
}

.md-blog-body table th {
    background: #2d4a5f;
    font-family: var(--md-font-display);
    font-weight: 700;
    color: var(--md-color-white);
    border-bottom: none;
    font-size: 18px;
    padding: 24px;
}

.md-blog-body table tr:nth-child(even) td {
    background: #edf3f7;
}

.md-blog-body table tr:last-child td {
    border-bottom: none;
}

.md-blog-body table td:first-child {
    font-weight: 700;
    color: #2c3e50;
}

/* CMS tables: no <thead>, first <tbody> row acts as header */
.md-blog-body figure.table tbody tr:first-child td {
    background: #2d4a5f;
    color: var(--md-color-white);
    font-family: var(--md-font-display);
    font-weight: 700;
    font-size: 18px;
    padding: 24px;
    border-bottom: none;
}

.md-blog-body figure.table tbody tr:first-child td:first-child {
    color: var(--md-color-white);
}

.md-blog-body figure.table tbody tr:nth-child(even) td {
    background: var(--md-color-white);
}

.md-blog-body figure.table tbody tr:nth-child(odd):not(:first-child) td {
    background: #edf3f7;
}

/* Merged: ux table figure wrapper */
.md-blog-body figure.table {
    margin: 1.5rem 0;
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for tables (from ux) */
.md-blog-body figure.table::-webkit-scrollbar {
    height: 6px;
}

.md-blog-body figure.table::-webkit-scrollbar-thumb {
    background: var(--md-color-blue-overlay);
    border-radius: 10px;
}

.md-blog-body figure.table::-webkit-scrollbar-track {
    background: var(--md-color-gray-100);
}


/* =============================================
   5. BLOG LAYOUT & GRID
   ============================================= */

/* Merged: v2 base + ux layout overrides.
   `justify-content: flex-start` so the article main column hugs the
   left edge of the body col (matching the hero caption above) rather
   than getting pushed right by the share-rail group being centered. */
.md-blog-content-layout {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 1rem 0;
}

.md-blog-body.col-lg-10,
.md-blog-hero .col-lg-10,
.md-blog-content-layout.container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

@media (min-width: 90rem) {
    .md-blog-content-layout {
        margin-left: auto;
        margin-right: auto;
        max-width: 75rem;
    }
}

@media (min-width: 62rem) {
    div.col-lg-10.offset-lg-1.md-blog-body {
        margin-left: 0;
    }
}

.md-blog-content-main {
    min-width: 0;
}


/* =============================================
   6. SHARING RAIL
   ============================================= */

/* Merged: v2 base + ux sharing rail */
.md-blog-share-rail {
    margin-left: 4rem;
    position: sticky;
    top: 7.5rem;
    height: fit-content;
    z-index: 10;
}

.md-blog-share-rail .sharebtn__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: max-content;
}

/* Override the sharebtn library's per-platform brand colors with a
   single light-gray pill + dark icon. On hover the pill flips to
   accent yellow with a black icon.
   The library renders each platform icon as a white SVG background-image
   on a brand-coloured circle. We hide that bg-image and re-render the
   icon via a ::before pseudo with `mask-image`, so its colour comes
   from the pseudo's background-color (controllable per state).
   `!important` is needed because the library applies its colours via
   element-level styles that beat plain class selectors. */
.md-blog-share-rail .sharebtn__button {
    margin: 0 !important;
    position: relative;
    background-color: var(--md-color-gray-150) !important;
    background-image: none !important;
    transition: background-color 200ms ease;
}

.md-blog-share-rail .sharebtn__button::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: var(--md-color-dark);
    -webkit-mask-position: 50% 50%;
            mask-position: 50% 50%;
    -webkit-mask-size: 24px 24px;
            mask-size: 24px 24px;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    transition: background-color 200ms ease;
}

/* Icon SVGs inlined as data URIs.
   sharebtn.com's icon CDN doesn't send Access-Control-Allow-Origin,
   so `mask-image: url(https://sharebtn.com/...)` is silently rejected
   by the browser even though the GET returns 200. Inlining avoids
   that cross-origin restriction entirely. */
.md-blog-share-rail .sharebtn__twitter::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z'/></svg>");
}
.md-blog-share-rail .sharebtn__linkedin::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z'/></svg>");
}
.md-blog-share-rail .sharebtn__whatsapp::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path d='M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z'/></svg>");
}
.md-blog-share-rail .sharebtn__email::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path d='M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48H48zM0 176V384c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V176L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z'/></svg>");
}
.md-blog-share-rail .sharebtn__copy::before {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path d='M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 512'><path d='M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z'/></svg>");
}

/* `filter` + `opacity` overrides neutralise whatever subtle darken
   effect the sharebtn library applies on hover (filter/brightness
   or opacity tweak via its own JS/CSS). */
.md-blog-share-rail .sharebtn__button:hover {
    background-color: var(--md-color-accent) !important;
    filter: none !important;
    opacity: 1 !important;
}

.md-blog-share-rail .sharebtn__button:hover::before {
    background-color: var(--md-color-black);
}


/* =============================================
   7. CARDS & PANELS (Blog Index)
   ============================================= */

.md-blog-panel {
    position: relative;
    background-size: cover;
    background-position: center;
    display: block;
    max-width: 100%;
    border-radius: var(--md-radius-3xl);
}

.md-blog-panel--featured {
    min-height: 407px;
    height: 100%;
}

.md-blog-panel-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Merged: v2 base + ux panel date */
.md-blog-panel-date {
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--md-font-body);
    font-size: 0.875rem;
}

.md-blog-panel-intro {
    font-family: var(--md-font-body);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 90%;
    margin-top: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-blog-panel-overlay {
    background: transparent linear-gradient(188deg, #272E3600 0%, #272E36FE 100%, var(--md-color-dark) 100%) 0% 0% no-repeat padding-box;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    border-radius: var(--md-radius-3xl);
    transition: opacity 0.55s ease-in-out;
    -moz-transition: opacity 0.5s ease-in-out;
    -webkit-transition: opacity 0.55s ease-in-out;
    padding: 42px 54px;
    z-index: 3;
}

.md-blog-panel:hover .md-blog-panel-overlay {
    background: transparent linear-gradient(188deg, #272E3600 0%, var(--md-color-blue-deep) 100%, #0077ff 100%) 0% 0% no-repeat padding-box;
    transition: background ease-in-out .3s;
}

.md-blog-panel-overlay span {
    color: #DBE6EF;
    font-family: var(--md-font-body);
    font-size: 14px;
    line-height: 19.5px;
    font-weight: 600;
}

/* Merged: v2 base + ux overlay-content */
.md-overlay-content {
    position: absolute;
    right: 2.25rem;
    left: 2.25rem;
    bottom: 0;
    padding-bottom: 1.5rem;
}

/* Merged: v2 base + ux panel title */
.md-blog-panel-title {
    font-family: var(--md-font-display);
    font-weight: 700;
    font-size: var(--md-font-fluid-panel);
    line-height: 120%;
    color: #fff;
    max-width: 438px;
}

/* Merged: v2 base + ux panel overlay p */
.md-blog-panel-overlay p {
    font-family: var(--md-font-body);
    font-weight: 400;
    font-size: clamp(1rem, 0.821rem + 0.476vw, 1.25rem);
    line-height: 140%;
    max-width: 438px;
}

/* Big Card (Panel) Padding Fix (from ux) */
.md-blog-panel-body {
    padding-left: 3rem;
    padding-bottom: 3rem;
}

/* Merged: v2 base + ux card badge sizing */
.md-blog-card .md-badge,
.md-blog-panel .md-badge {
    font-size: 0.875rem;
    line-height: 100%;
}

/* Desktop panels (from ux) */
.md-blog-panel-overlay {
    padding: 2.25rem 1.5rem;
}

/* White blog card */
.md-blog-card {
    display: flex;
    flex-direction: column;
    background: var(--md-color-white);
    border-radius: var(--md-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    height: 100%;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.md-blog-card:hover {
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px);
    color: inherit;
    text-decoration: none;
}

.md-blog-card-image-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    flex-shrink: 0;
}

.md-blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.md-blog-card:hover .md-blog-card-image {
    transform: scale(1.04);
}

/* Merged: v2 base + ux card body padding */
.md-blog-card-body {
    padding: 1.25rem 1.5rem 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.md-blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    /* Pin the meta row to the bottom of the flex-column card body so it
       lines up consistently across cards regardless of title/desc length. */
    margin-top: auto;
}

/* Merged: v2 base + ux card date */
.md-blog-card-date {
    color: #4C606E;
    font-family: var(--md-font-body);
    font-size: 0.875rem;
    line-height: 19.5px;
    white-space: nowrap;
    margin-left: auto;
}

/* Merged: v2 base + ux card title sizing */
.md-blog-card-title {
    font-family: var(--md-font-display);
    font-size: 1.375rem;
    line-height: 1.25;
    font-weight: 700;
    color: #353C44;
    margin-bottom: 0.375rem;
}

/* Merged: v2 base + ux card desc sizing */
.md-blog-card-desc {
    color: #4C606E;
    font-family: var(--md-font-body);
    font-size: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.md-blog-card-image-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(rgb(39, 46, 54), rgb(39, 46, 54));
    flex-shrink: 0;
}

/* Unified Hover Logic (from ux) */
.md-blog-card:hover,
.md-blog-panel:hover {
    transform: none;
}

.md-blog-card-image-wrap,
.md-blog-card-image-placeholder,
.md-blog-panel {
    position: relative;
    overflow: hidden;
}

.md-blog-card-image-wrap::after,
.md-blog-card-image-placeholder::after,
.md-blog-panel::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(55, 107, 142, 0) 0%, rgba(55, 107, 142, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.md-blog-card:hover .md-blog-card-image-wrap::after,
.md-blog-card:hover .md-blog-card-image-placeholder::after,
.md-blog-panel:hover::after {
    opacity: 1;
}


/* =============================================
   8. RELATED BLOGS
   ============================================= */

/* Merged: v2 base + ux section title sizing */
.md-related-blogs-title {
    font-family: var(--md-font-display);
    font-size: var(--md-font-fluid-section);
    line-height: 1.2;
    font-weight: 700;
    color: var(--md-color-dark);
}


/* =============================================
   9. PAGINATION
   ============================================= */

.md-pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.md-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.md-pagination .page-item {
    margin: 0;
}

/* Higher-specificity selector (li.page-item) needed to beat Bootstrap's
   .page-item:first-child / :last-child border-radius rules, which otherwise
   square off the first and last pagination links. */
.md-pagination li.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: #eef2f6;
    color: #2c3e50;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 0;
}

.md-pagination li.page-item.active .page-link,
.md-pagination li.page-item .page-link:hover {
    background-color: #30485c;
    color: var(--md-color-white);
}

.md-pagination li.page-item.disabled .page-link {
    background-color: transparent;
    color: #a0aec0;
    cursor: not-allowed;
}

/* Prev/next arrow buttons: transparent by default, dark pill with white
   icon on hover (matches the active page state). */
.md-pagination li.page-item .page-link-prev,
.md-pagination li.page-item .page-link-next {
    background-color: transparent;
    color: #5a6b7c;
    font-size: 18px;
}

.md-pagination li.page-item .page-link-prev:hover,
.md-pagination li.page-item .page-link-next:hover {
    background-color: #30485c;
    color: var(--md-color-white);
}

.md-pagination .page-item.ellipsis span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    background-color: transparent;
    border: none;
}


/* =============================================
   10. CTA BLOG (Blog Index Banner)
   ============================================= */

.md-cta-blog {
    background-color: var(--md-color-dark);
    padding-top: 79px;
    padding-bottom: 79px;
    position: relative;
    overflow: hidden;
}

.md-cta-blog::before {
    content: '';
    display: block;
    background: var(--md-gradient-carousel-bg);
    opacity: 0.8;
    width: 40%;
    height: 130%;
    top: -40px;
    right: -100px;
    position: absolute;
    transform: matrix(0.98, 0.21, -0.21, 0.98, 0, 0);
    animation: shrink 8s infinite alternate;
}

.md-cta-blog .container {
    position: relative;
    z-index: 1;
}

/* Merged: v2 base + ux eyebrow sizing */
.md-cta-blog__pretitle {
    font-family: var(--md-font-accent);
    font-size: var(--md-font-fluid-eyebrow);
    line-height: 1.2;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--md-color-accent);
    margin-bottom: 14px;
}

/* Merged: v2 base + ux title sizing */
.md-cta-blog__title {
    font-family: var(--md-font-display);
    font-size: var(--md-font-fluid-section);
    line-height: 1.2;
    font-weight: 700;
    color: var(--md-color-white);
    margin-bottom: 14px;
}

/* Merged: v2 base + ux body sizing */
.md-cta-blog__body {
    font-size: var(--md-font-fluid-intro);
    line-height: 1.5;
    color: #F4F6F7;
    margin-bottom: 0;
    max-width: 744px;
    font-weight: 500;
}

.md-cta-blog__btn {
    font-family: var(--md-font-accent);
    font-size: 17px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 14px 32px;
    white-space: nowrap;
}

/* Merged: v2 + ux eyebrow for md-title-alt */
.md-title-alt {
    font-size: var(--md-font-fluid-eyebrow);
    line-height: 1.2;
}


/* =============================================
   11. INLINE CTA (Blog Post)
   ============================================= */

.md-inline-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 24px;
    margin: 48px 0;
    border-radius: var(--md-radius-lg);
    background-color: #EDF3F7;
}

.md-inline-cta__content {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--md-color-dark);
}

.md-inline-cta__content > :last-child {
    margin-bottom: 0;
}

/* Merged: v2 base + ux inline CTA content sizing */
.md-inline-cta__content,
.md-inline-cta__content p,
.md-inline-cta__content span,
.md-inline-cta__content strong {
    font-family: var(--md-font-body);
    font-size: clamp(1.125rem, 1.071rem + 0.143vw, 1.2rem);
    line-height: 1.6;
    font-weight: 700;
    color: var(--md-color-dark);
}

.md-inline-cta__button {
    flex: 0 0 auto;
    border-radius: var(--md-radius-pill);
    padding: 16px 40px;
    text-decoration: none;
    white-space: nowrap;
    text-transform: unset !important;
    font-weight: 500 !important;
}


/* =============================================
   12. LOADING STATE
   ============================================= */

.md-entry-date--loading {
    position: relative;
    display: inline-block;
    min-width: 9ch;
    color: transparent !important;
}

.md-entry-date--loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 0.9em;
    border-radius: var(--md-radius-pill);
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%);
}


/* =============================================
   13. RESPONSIVE - Tablet & Mobile
   ============================================= */

/* Tablet + mobile: stack share rail at the end of the post */
@media (max-width: 61.99rem) {
    .md-blog-content-layout {
        flex-direction: column;
    }
    .md-blog-content-main {
        width: 100%;
        max-width: 100%;
    }

    .md-blog-share-rail {
        position: static;
        order: 2;
        margin: 2.5rem 0 0 0;
        width: 100%;
    }

    .md-blog-share-rail .sharebtn__container {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
}

/* Mobile-only body tweaks */
@media (max-width: 47.93rem) {
    .md-blog-body h2,
    .md-blog-body h3 {
        margin-bottom: 0.625rem;
        margin-top: 2rem;
    }

    .md-blog-body table td,
    .md-blog-body table th {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* The faux-header row from the CMS (tbody tr:first-child td) carries
       a desktop `padding: 24px` shorthand whose selector is more specific
       than the rule above. At mobile, restore the body-cell horizontal
       padding so header cells line up with the rows below them. */
    .md-blog-body figure.table tbody tr:first-child td {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Unclip table scroll for mobile */
    .md-blog-body figure.table {
        margin-left: -1rem;
        margin-right: -1rem;
        width: calc(100% + 2rem);
        padding-left: 1rem;
        padding-right: 1rem;
        display: block;
        overflow-x: auto;
    }
}

/* Panel/card responsive at 1024px (from ux) */
@media screen and (max-width: 64rem) {
    .md-blog-panel-overlay span.md-blog-panel-date {
        font-size: 0.875rem;
        margin-left: 0;
        padding-top: 0;
        line-height: 1;
    }

    .md-blog-panel-intro {
        margin-left: 0;
        font-size: 1.125rem;
    }

    .md-overlay-content {
        left: 1.5rem;
        right: 1.5rem;
    }
}

/* Panel responsive at max-width 1024px (from v2) */
@media screen and (max-width: 1024px) {
    .md-blog-panel .md-blog-panel-overlay {
        opacity: 1;
        top: auto;
        bottom: 0px;
        overflow: hidden;
        top: 0;
    }

    .md-blog-panel-overlay span {
        text-align: left;
        padding-top: 20px;
        font-size: 20px;
        line-height: 24px;
    }

    .md-blog-panel-overlay p {
        text-align: left;
        padding-top: 2px;
        margin-left: 20px;
        font-size: 16px;
        line-height: 19px;
        padding-left: 0px;
    }
}

/* Panel/card responsive at max-width 1199.98px (from v2) */
@media screen and (max-width: 1199.98px) {
    .md-blog-panel {
        /* max-height: 300px; */
    }
}

/* Mobile panel (from ux merged w/ v2 767px) */
@media (max-width: 47.93rem) {
    .md-overlay-content {
        left: 1rem;
        right: 1rem;
        padding-bottom: 1.25rem;
    }

    .md-blog-panel-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 767px) {
    .md-blog-panel-overlay {
        padding: 0 !important;
    }

    .md-blog-panel--featured {
        min-height: 320px;
    }

    .md-blog-card-title {
        font-size: 20px;
    }

    /* Tighter card density on mobile: 1rem body padding all round, no
       gap below the meta row (badge + date). The .md-blog-card-desc
       mb-4 -> mb-3 swap is done via responsive utility classes on the
       markup (`mb-3 mb-md-4`). */
    .md-blog-card-body {
        padding: 1rem;
    }

    .md-blog-card-meta {
        margin-bottom: 0;
    }
}

/* Blog panel on mobile (from v2 575.98px) */
@media screen and (max-width: 575.98px) {
    .md-blog-panel {
        position: relative;
        background-size: cover;
        background-position: center;
        display: block;
        width: 100%;
    }
}

/* Blog layout responsive at 991.98px (from v2) */
@media (max-width: 991.98px) {
    .md-inline-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
        border-radius: var(--md-radius-3xl);
        gap: 20px;
    }

    .md-inline-cta__content,
    .md-inline-cta__content p,
    .md-inline-cta__content span,
    .md-inline-cta__content strong {
        font-size: 22px;
    }

    .md-inline-cta__button {
        width: 100%;
        text-align: center;
    }

    .md-cta-blog {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .md-cta-blog__btn {
        margin-top: 8px;
    }
}

@media screen and (max-width: 768px) {
    .md-pagination-wrapper {
        gap: 16px;
    }
}

/* Top spacing for paginated /blog/P{N} pages where the title + intro
   are hidden -- gives filter pills room to clear the navbar. */
.md-blog-listing-pt {
    padding-top: 10rem;
}

@media (max-width: 991px) {
    .md-blog-listing-pt {
        padding-top: 6rem;
    }
}
