/* My GENYSIS blog — design/Blog.html */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600;700&display=swap');

.page-blog {
    --mg-teal: #0081e5;
    --mg-teal-dark: #006bbf;
    --mg-ink: #0f1f2b;
    --mg-ink-soft: #3d4757;
    --mg-muted: #6b7683;
    --mg-body: #4a5566;
    --mg-body-soft: #5c6675;
    --mg-muted-soft: #8a9c98;
    --mg-border: #eef1f4;
    --mg-border-card: #e6eaef;
    --mg-chip: #d6dee2;
    --mg-bg: #ffffff;
    --mg-bg-soft: #f5f9fc;
    --mg-bg-mint: #f0f6fc;
    --mg-placeholder: #eef3f8;
    --mg-placeholder-alt: #e6eef5;
    --mg-font: 'Space Grotesk', 'Instrument Sans', system-ui, sans-serif;
    --mg-body-font: 'Instrument Sans', 'Space Grotesk', system-ui, sans-serif;
}

.blog {
    font-family: var(--mg-body-font);
    color: var(--mg-ink);
    background: var(--mg-bg);
}

.blog a:not([class*="btn"]) {
    text-decoration: none;
    color: inherit;
}

.blog a[class*="btn"] {
    text-decoration: none;
}

/* —— Header —— */
.blog-header {
    background: var(--mg-bg-soft);
    border-bottom: 1px solid var(--mg-border);
    padding: 56px 24px;
}

.blog-header__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-header__eyebrow {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mg-teal-dark);
    font-weight: 700;
    margin-bottom: 12px;
}

.blog-header__title {
    font-family: var(--mg-font);
    font-size: clamp(32px, 4.5vw, 46px);
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    font-weight: 700;
    color: var(--mg-ink);
    line-height: 1.1;
}

.blog-header__lead {
    font-size: 18px;
    color: var(--mg-body);
    margin: 0;
    max-width: 680px;
    line-height: 1.6;
}

/* —— Featured —— */
.blog-featured-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 0;
}

.blog-featured {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    border: 1px solid var(--mg-border-card);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}

.blog-featured__media {
    display: block;
    aspect-ratio: 16 / 9;
    background: repeating-linear-gradient(
        135deg,
        var(--mg-placeholder),
        var(--mg-placeholder) 12px,
        var(--mg-placeholder-alt) 12px,
        var(--mg-placeholder-alt) 24px
    );
    position: relative;
    overflow: hidden;
}

.blog-featured__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-featured__placeholder {
    position: absolute;
    left: 16px;
    bottom: 16px;
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--mg-muted-soft);
    background: #fff;
    padding: 4px 8px;
    border-radius: 5px;
}

.blog-featured__body {
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.blog-pill {
    display: inline-flex;
    align-items: center;
    background: var(--mg-bg-mint);
    color: var(--mg-teal-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 100px;
}

.blog-featured__meta-text {
    font-size: 13px;
    color: var(--mg-muted);
}

.blog-featured__title {
    font-family: var(--mg-font);
    font-size: clamp(22px, 2.5vw, 28px);
    line-height: 1.2;
    margin: 0 0 12px;
    font-weight: 700;
    color: var(--mg-ink);
}

.blog-featured__title a:hover {
    color: var(--mg-teal);
}

.blog-featured__excerpt {
    margin: 0 0 20px;
    color: var(--mg-body-soft);
    font-size: 16px;
    line-height: 1.6;
}

.blog-featured__byline {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--mg-muted);
}

.blog-featured__byline strong {
    font-weight: 600;
    color: var(--mg-ink);
}

.blog-featured__dot {
    width: 4px;
    height: 4px;
    background: #c3ccd6;
    border-radius: 50%;
}

.blog-stats {
    display: flex;
    gap: 44px;
    margin-top: 24px;
    padding: 0 4px;
    flex-wrap: wrap;
}

.blog-stats__value {
    font-family: var(--mg-font);
    font-size: 24px;
    font-weight: 700;
    color: var(--mg-teal);
}

.blog-stats__label {
    font-size: 14px;
    color: var(--mg-muted);
}

/* —— Body / filters —— */
.blog-body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 44px 24px 72px;
}

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

.blog-cats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.blog-cat {
    font-size: 14px;
    font-weight: 600;
    color: var(--mg-ink-soft);
    border: 1px solid var(--mg-chip);
    padding: 9px 18px;
    border-radius: 100px;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.blog-cat:hover {
    border-color: var(--mg-teal);
    color: var(--mg-teal);
}

.blog-cat.is-active {
    color: #fff;
    background: var(--mg-teal);
    border-color: var(--mg-teal);
}

.blog-cat__count {
    color: var(--mg-muted-soft);
    font-weight: 600;
}

.blog-cat.is-active .blog-cat__count {
    color: rgba(255, 255, 255, 0.75);
}

.blog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #dbe6e3;
    border-radius: 11px;
    padding: 0 14px;
    min-width: 260px;
}

.blog-search__icon {
    color: var(--mg-muted-soft);
    font-size: 16px;
    line-height: 1;
}

.blog-search input {
    border: 0;
    outline: 0;
    padding: 12px 0;
    font-size: 14px;
    width: 100%;
    background: transparent;
    color: var(--mg-ink);
    font-family: var(--mg-body-font);
}

.blog-search input::placeholder {
    color: #9aa7b2;
}

.blog-list-title {
    font-family: var(--mg-font);
    font-size: 24px;
    margin: 0 0 6px;
    font-weight: 700;
    color: var(--mg-ink);
}

.blog-list-count {
    margin: 0 0 24px;
    color: var(--mg-muted);
    font-size: 15px;
}

/* —— Cards —— */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.blog-card {
    border: 1px solid var(--mg-border-card);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover {
    border-color: #c5ddd8;
    box-shadow: 0 12px 28px -20px rgba(15, 43, 40, 0.35);
}

.blog-card__media {
    aspect-ratio: 16 / 9;
    background: repeating-linear-gradient(
        135deg,
        var(--mg-placeholder),
        var(--mg-placeholder) 10px,
        var(--mg-placeholder-alt) 10px,
        var(--mg-placeholder-alt) 20px
    );
    overflow: hidden;
}

.blog-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
}

.blog-card__badge {
    background: var(--mg-bg-mint);
    color: var(--mg-teal-dark);
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 100px;
}

.blog-card__time {
    color: var(--mg-muted-soft);
}

.blog-card__title {
    font-family: var(--mg-font);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.3;
    margin: 0 0 10px;
    flex: 1;
    color: var(--mg-ink);
}

.blog-card:hover .blog-card__title {
    color: var(--mg-teal);
}

.blog-card__excerpt {
    margin: 0 0 14px;
    color: var(--mg-muted);
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--mg-muted);
    padding-top: 12px;
    border-top: 1px solid var(--mg-border);
    margin-top: auto;
}

.blog-card__footer strong {
    font-weight: 600;
    color: var(--mg-ink);
}

.blog-empty-card {
    border: 1px dashed var(--mg-chip);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    color: var(--mg-muted-soft);
    font-size: 14px;
    min-height: 280px;
    background: #fff;
}

.blog-empty {
    border: 1px solid var(--mg-border-card);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    background: #fff;
}

.blog-empty h3 {
    font-family: var(--mg-font);
    font-size: 20px;
    margin: 0 0 8px;
    color: var(--mg-ink);
}

.blog-empty p {
    margin: 0;
    color: var(--mg-muted);
    font-size: 15px;
}

/* —— Article show —— */
.blog--article {
    background: var(--mg-bg);
}

.ba-hero {
    background: var(--mg-bg-soft);
    border-bottom: 1px solid var(--mg-border);
    padding: 40px 24px 48px;
}

.ba-hero__inner {
    max-width: 760px;
    margin: 0 auto;
}

.ba-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mg-muted);
    margin-bottom: 28px;
}

.ba-breadcrumb a {
    color: var(--mg-teal);
}

.ba-breadcrumb a:hover {
    text-decoration: underline;
}

.ba-breadcrumb__sep {
    color: #c3ccd6;
}

.ba-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--mg-muted);
}

.ba-hero__meta .blog-pill {
    background: var(--mg-bg-mint);
    color: var(--mg-teal-dark);
}

.ba-hero__meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c3ccd6;
}

.ba-hero__title {
    font-family: var(--mg-font);
    font-size: clamp(30px, 4.5vw, 44px);
    letter-spacing: -0.025em;
    margin: 0 0 16px;
    font-weight: 700;
    line-height: 1.12;
    color: var(--mg-ink);
}

.ba-hero__lead {
    font-size: 18px;
    color: var(--mg-body);
    margin: 0 0 28px;
    line-height: 1.65;
    max-width: 640px;
}

.ba-author {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ba-author__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(145deg, #0081e5, #0f2a3b);
    color: #fff;
    font-family: var(--mg-font);
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ba-author__name {
    font-weight: 700;
    font-size: 15px;
    color: var(--mg-ink);
    font-family: var(--mg-font);
}

.ba-author__role {
    font-size: 13px;
    color: var(--mg-muted);
    margin-top: 2px;
}

/* Cover */
.ba-cover-wrap {
    max-width: 960px;
    margin: -28px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.ba-cover {
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--mg-border-card);
    box-shadow: 0 24px 50px -28px rgba(15, 43, 40, 0.35);
    background: #fff;
    aspect-ratio: 16 / 9;
}

.ba-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-cover--placeholder {
    background: repeating-linear-gradient(
        135deg,
        var(--mg-placeholder),
        var(--mg-placeholder) 12px,
        var(--mg-placeholder-alt) 12px,
        var(--mg-placeholder-alt) 24px
    );
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.ba-cover--placeholder span {
    font-family: ui-monospace, monospace;
    font-size: 11px;
    color: var(--mg-muted-soft);
    background: #fff;
    padding: 4px 8px;
    border-radius: 5px;
}

/* Content column */
.ba-layout {
    max-width: 760px;
    margin: 0 auto;
    padding: 48px 24px 24px;
}

.ba-prose {
    font-size: 17px;
    line-height: 1.8;
    color: var(--mg-body-soft);
}

.ba-prose > *:first-child {
    margin-top: 0;
}

.ba-prose h2 {
    font-family: var(--mg-font);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--mg-ink);
    letter-spacing: -0.02em;
    margin: 2.4rem 0 0.9rem;
    padding-top: 0.4rem;
    border-top: 1px solid var(--mg-border);
}

.ba-prose h2:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}

.ba-prose h3 {
    font-family: var(--mg-font);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--mg-ink);
    margin: 1.8rem 0 0.7rem;
}

.ba-prose p {
    margin: 0 0 1.2rem;
}

.ba-prose ul,
.ba-prose ol {
    margin: 0 0 1.3rem;
    padding-left: 0;
    list-style: none;
}

.ba-prose li {
    position: relative;
    padding-left: 1.4rem;
    margin-bottom: 0.55rem;
}

.ba-prose ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mg-teal);
}

.ba-prose ol {
    counter-reset: ba-ol;
}

.ba-prose ol li {
    counter-increment: ba-ol;
}

.ba-prose ol li::before {
    content: counter(ba-ol);
    position: absolute;
    left: 0;
    top: 0.15em;
    font-family: var(--mg-font);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--mg-teal);
}

.ba-prose a {
    color: var(--mg-teal);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ba-prose a:hover {
    color: var(--mg-teal-dark);
}

.ba-prose strong {
    color: var(--mg-ink);
    font-weight: 700;
}

.ba-prose blockquote {
    margin: 1.8rem 0;
    padding: 18px 22px;
    border-left: 3px solid var(--mg-teal);
    background: var(--mg-bg-mint);
    border-radius: 0 14px 14px 0;
    color: var(--mg-ink);
    font-size: 1.05em;
}

.ba-prose blockquote p:last-child {
    margin-bottom: 0;
}

.ba-prose img {
    max-width: 100%;
    border-radius: 14px;
    margin: 1.5rem 0;
    border: 1px solid var(--mg-border-card);
}

.ba-prose hr {
    border: 0;
    border-top: 1px solid var(--mg-border);
    margin: 2.2rem 0;
}

.ba-prose code {
    font-family: ui-monospace, monospace;
    font-size: 0.9em;
    background: var(--mg-bg-soft);
    border: 1px solid var(--mg-border);
    padding: 0.1em 0.4em;
    border-radius: 5px;
    color: var(--mg-ink);
}

.ba-prose pre {
    background: var(--mg-ink);
    color: #dbe4ea;
    padding: 18px 20px;
    border-radius: 14px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.ba-prose pre code {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
}

.ba-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--mg-border);
}

.ba-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--mg-teal);
}

.ba-back:hover {
    text-decoration: underline;
}

.ba-footer__cat {
    font-size: 14px;
    font-weight: 600;
    color: var(--mg-ink-soft);
    border: 1px solid var(--mg-chip);
    padding: 9px 16px;
    border-radius: 100px;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.ba-footer__cat:hover {
    border-color: var(--mg-teal);
    color: var(--mg-teal);
}

/* Related */
.ba-related {
    background: var(--mg-bg-soft);
    border-top: 1px solid var(--mg-border);
    border-bottom: 1px solid var(--mg-border);
    padding: 56px 24px;
}

.ba-related__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.ba-related__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.ba-related__title {
    font-family: var(--mg-font);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--mg-ink);
}

.ba-related__all {
    font-size: 14px;
    font-weight: 600;
    color: var(--mg-teal);
}

.ba-related__all:hover {
    text-decoration: underline;
}

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

/* CTA */
.ba-cta {
    background: var(--mg-ink);
    color: #fff;
    padding: 64px 24px;
    text-align: center;
}

.ba-cta__inner {
    max-width: 560px;
    margin: 0 auto;
}

.ba-cta__title {
    font-family: var(--mg-font);
    font-size: clamp(26px, 3.5vw, 34px);
    font-weight: 700;
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    color: #fff;
}

.ba-cta__lead {
    color: #a9c4bf;
    font-size: 16px;
    margin: 0 0 28px;
    line-height: 1.55;
}

.ba-cta__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.ba-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 26px;
    border-radius: 11px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ba-cta__btn--primary,
a.ba-cta__btn--primary {
    background: #7ec8f5;
    color: #05201d !important;
}

.ba-cta__btn--primary:hover,
a.ba-cta__btn--primary:hover {
    background: #99f6e4;
    color: #05201d !important;
}

.ba-cta__btn--ghost,
a.ba-cta__btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff !important;
}

.ba-cta__btn--ghost:hover,
a.ba-cta__btn--ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
}

@media (max-width: 900px) {
    .blog-featured {
        grid-template-columns: 1fr;
    }

    .blog-grid,
    .ba-related__grid {
        grid-template-columns: 1fr;
    }

    .blog-stats {
        gap: 24px;
    }

    .ba-cover-wrap {
        margin-top: -20px;
    }

    .ba-hero {
        padding: 28px 24px 40px;
    }
}

@media (max-width: 640px) {
    .blog-header,
    .blog-featured-wrap,
    .blog-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .blog-header__title {
        font-size: clamp(1.6rem, 7vw, 2rem);
        line-height: 1.2;
    }

    .blog-header__lead {
        font-size: 15px;
    }

    .blog-featured__title {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    .blog-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .blog-cats {
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        max-width: 100%;
        padding-bottom: 4px;
    }

    .blog-cat {
        flex-shrink: 0;
    }

    .ba-hero {
        padding: 24px 16px 32px;
    }

    .ba-hero__title {
        font-size: clamp(1.5rem, 7vw, 1.85rem);
        line-height: 1.2;
    }

    .ba-hero__lead {
        font-size: 15px;
    }

    .ba-hero__meta {
        flex-wrap: wrap;
        gap: 8px;
        row-gap: 6px;
    }

    .ba-layout,
    .ba-related__inner,
    .ba-cta__inner,
    .ba-cover-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ba-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (min-width: 901px) and (max-width: 1100px) {
    .blog-grid,
    .ba-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
