/* =========================================================================
   Blog SEO Module — styles.
   Menggunakan design system existing (variables.css, article.css pattern).
   ========================================================================= */

.blogm-main {
    max-width: 1120px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ------------------------------ Hero ---------------------------------- */

.blogm-hero {
    text-align: center;
    padding: clamp(10px, 3vh, 30px) 0 clamp(22px, 4vh, 40px);
    animation: article-rise 0.8s var(--ease-out) both;
}

.blogm-hero-title {
    font-size: clamp(34px, 6vw, 58px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    line-height: 1.08;
    margin-bottom: 14px;
}

.blogm-hero-sub {
    max-width: 620px;
    margin: 0 auto 26px;
    font-size: clamp(13.5px, 1.8vw, 15.5px);
    line-height: 1.75;
    color: var(--text-secondary);
}

.blogm-search {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    padding: 6px 6px 6px 16px;
    border-radius: var(--radius-lg);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.blogm-search:focus-within {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: var(--shadow-glow-primary);
}

.blogm-search > svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--text-muted);
}

.blogm-search input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
}

.blogm-search input::placeholder {
    color: var(--text-muted);
}

.blogm-search-btn {
    flex-shrink: 0;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background: var(--gradient-main);
    cursor: pointer;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}

.blogm-search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-primary);
}

/* --------------------------- Context header --------------------------- */

.blogm-context {
    padding: clamp(6px, 2vh, 18px) 0 26px;
    animation: article-rise 0.8s var(--ease-out) both;
}

.blogm-context-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
    transition: color 0.3s ease;
}

.blogm-context-back svg {
    width: 14px;
    height: 14px;
    transition: transform 0.35s var(--ease-out);
}

.blogm-context-back:hover {
    color: var(--text-primary);
}

.blogm-context-back:hover svg {
    transform: translateX(-3px);
}

.blogm-context-title {
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 10px;
}

.blogm-context-desc {
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--text-secondary);
    max-width: 720px;
    margin-bottom: 22px;
}

/* ------------------------------ Layout -------------------------------- */

.blogm-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: clamp(20px, 3vw, 36px);
    align-items: start;
    animation: article-rise 0.9s var(--ease-out) 0.1s both;
}

.blogm-section-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.blogm-section-label svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
}

/* ---------------------------- Featured -------------------------------- */

.blogm-featured {
    margin-bottom: clamp(26px, 4vh, 40px);
}

.blogm-featured-card {
    display: grid;
    grid-template-columns: 46% 1fr;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(120% 60% at 85% 0%, rgba(99, 102, 241, 0.10), transparent 60%),
        var(--bg-secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    transition: border-color 0.3s ease, transform 0.35s var(--ease-out), box-shadow 0.3s ease;
}

.blogm-featured-card:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.blogm-featured-media img {
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
}

.blogm-featured-body {
    padding: clamp(18px, 2.6vw, 30px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.blogm-featured-title {
    font-size: clamp(19px, 2.6vw, 27px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

/* ------------------------------ Cards --------------------------------- */

.blogm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.blogm-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.35s var(--ease-out), box-shadow 0.3s ease;
}

.blogm-card:hover,
.blogm-card:focus-visible {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lift);
}

.blogm-card-media {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--bg-secondary);
}

.blogm-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out);
}

.blogm-card:hover .blogm-card-media img {
    transform: scale(1.05);
}

.blogm-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    flex: 1;
}

.blogm-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-size: 11.5px;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

.blogm-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.blogm-card-meta svg {
    width: 12px;
    height: 12px;
    vertical-align: -2px;
}

.blogm-chip {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 99px;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent) !important;
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.25);
}

.blogm-card-title {
    font-size: 16.5px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blogm-card-excerpt {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blogm-card-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 6px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.blogm-card-more svg {
    width: 13px;
    height: 13px;
    transition: transform 0.3s var(--ease-out);
}

.blogm-card:hover .blogm-card-more svg {
    transform: translate(3px, -3px);
}

/* ---------------------------- Pagination ------------------------------ */

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: clamp(26px, 4vh, 38px);
}

.blog-pagination .page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-out);
}

.blog-pagination .page-btn svg {
    width: 14px;
    height: 14px;
}

.blog-pagination a.page-btn:hover {
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.5);
    transform: translateY(-2px);
}

.blog-pagination .page-btn.is-active {
    color: #fff;
    background: var(--gradient-main);
    border-color: transparent;
}

.blog-pagination .page-btn.is-disabled,
.blog-pagination .page-btn.is-gap {
    opacity: 0.4;
    pointer-events: none;
}

/* ----------------------------- Sidebar -------------------------------- */

.blogm-aside {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 86px;
}

.blogm-widget {
    padding: 22px;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border);
}

.blogm-widget-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 16px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.blogm-widget-title svg {
    width: 15px;
    height: 15px;
    color: var(--accent);
}

.blogm-cat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blogm-cat-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: var(--radius-sm);
    transition: background 0.3s ease;
}

.blogm-cat-list li:hover {
    background: var(--bg-glass);
}

.blogm-cat-list a {
    flex: 1;
    padding: 9px 12px;
    font-size: 13.5px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.blogm-cat-list a:hover {
    color: var(--text-primary);
}

.blogm-cat-count {
    flex-shrink: 0;
    min-width: 26px;
    height: 22px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(34, 211, 238, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.22);
}

.blogm-popular {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    counter-reset: popular;
}

.blogm-popular li {
    display: flex;
    gap: 13px;
    align-items: flex-start;
}

.blogm-popular-num {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    color: transparent;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blogm-popular a {
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text-secondary);
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blogm-popular a:hover {
    color: var(--text-primary);
}

/* ------------------------------- CTA ---------------------------------- */

.blogm-cta {
    margin-top: clamp(34px, 6vh, 56px);
}

.blogm-cta-inner {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: clamp(30px, 5vw, 54px) clamp(20px, 4vw, 48px);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(90% 120% at 50% 0%, rgba(99, 102, 241, 0.16), transparent 60%),
        var(--bg-secondary);
    border: 1px solid rgba(99, 102, 241, 0.28);
    box-shadow: var(--shadow-card);
}

.blogm-cta-inner h2 {
    font-size: clamp(20px, 3.4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.blogm-cta-inner p {
    max-width: 620px;
    margin: 0 auto 24px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-secondary);
}

.blogm-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.blogm-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 26px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
}

.blogm-btn svg {
    width: 15px;
    height: 15px;
}

.blogm-btn-primary {
    color: #fff;
    background: var(--gradient-main);
}

.blogm-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow-primary);
}

.blogm-btn-ghost {
    color: var(--text-primary);
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

.blogm-btn-ghost:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.5);
}

.blogm-cta-inline {
    margin-top: 38px;
}

/* ------------------------------ Empty --------------------------------- */

.blogm-empty {
    text-align: center;
    padding: clamp(36px, 7vh, 64px) 20px;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px dashed var(--border-strong);
    margin-bottom: 26px;
}

.blogm-empty svg {
    width: 34px;
    height: 34px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.blogm-empty h2 {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 8px;
}

.blogm-empty p {
    font-size: 13.5px;
    color: var(--text-secondary);
    max-width: 460px;
    margin: 0 auto;
}

/* --------------------------- Post detail ------------------------------ */

.blogm-post-main {
    max-width: 860px;
}

.blogm-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.blogm-breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.blogm-breadcrumb a:hover {
    color: var(--text-primary);
}

.blogm-breadcrumb-current {
    color: var(--text-secondary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blogm-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.blogm-toc {
    margin: 0 0 28px;
    padding: 20px 22px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

.blogm-toc-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-primary);
}

.blogm-toc-title svg {
    width: 14px;
    height: 14px;
    color: var(--accent);
}

.blogm-toc ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 7px;
    counter-reset: toc;
}

.blogm-toc li {
    counter-increment: toc;
    font-size: 13.5px;
    line-height: 1.5;
}

.blogm-toc li::before {
    content: counter(toc, decimal-leading-zero);
    margin-right: 10px;
    font-family: var(--font-display);
    font-size: 11px;
    color: var(--accent);
}

.blogm-toc a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.blogm-toc a:hover {
    color: var(--text-primary);
}

.blogm-toc-l3 {
    padding-left: 26px;
}

.blogm-toc-l3::before {
    content: "–";
    color: var(--text-muted);
}

/* Body extras untuk konten kaya (list, table, code) */
.blogm-body ul,
.blogm-body ol {
    margin: 0 0 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blogm-body ul {
    list-style: none;
}

.blogm-body ul > li {
    position: relative;
    padding-left: 6px;
}

.blogm-body ul > li::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 0.62em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--gradient-main);
}

.blogm-body ol {
    list-style: decimal;
}

.blogm-body ol > li::marker {
    color: var(--accent);
    font-weight: 600;
}

.blogm-body a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: rgba(34, 211, 238, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.3s ease;
}

.blogm-body a:hover {
    text-decoration-color: var(--accent);
}

.blogm-body img {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    max-width: 100%;
    height: auto;
}

.blogm-body table {
    width: 100%;
    margin: 22px 0;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.blogm-body th,
.blogm-body td {
    padding: 11px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.blogm-body th {
    font-family: var(--font-display);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-primary);
    background: var(--bg-glass);
}

.blogm-body tr:last-child td {
    border-bottom: none;
}

.blogm-body pre {
    margin: 22px 0;
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-primary);
}

.blogm-body code {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    font-size: 0.92em;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.12);
    color: #C7D2FE;
}

.blogm-body pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.blogm-body figure {
    margin: 24px 0;
}

.blogm-body figcaption {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.blogm-body hr {
    margin: 30px 0;
    border: none;
    height: 1px;
    background: var(--border);
}

/* ------------------------------- FAQ ---------------------------------- */

.blogm-faq {
    margin-top: 34px;
    padding: 24px;
    border-radius: var(--radius-md);
    background: var(--bg-glass);
    border: 1px solid var(--border);
}

.blogm-faq-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
}

.blogm-faq-title svg {
    width: 17px;
    height: 17px;
    color: var(--accent);
}

.blogm-faq-item {
    border-bottom: 1px solid var(--border);
}

.blogm-faq-item:last-child {
    border-bottom: none;
}

.blogm-faq-item summary {
    padding: 14px 4px;
    cursor: pointer;
    list-style: none;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.blogm-faq-item summary::-webkit-details-marker {
    display: none;
}

.blogm-faq-item summary::before {
    content: "+";
    display: inline-block;
    width: 22px;
    font-family: var(--font-display);
    color: var(--accent);
}

.blogm-faq-item[open] summary::before {
    content: "–";
}

.blogm-faq-item p {
    padding: 0 4px 16px 26px;
    font-size: 13.5px;
    line-height: 1.8;
    color: var(--text-secondary);
}

/* ------------------------------- Tags --------------------------------- */

.blogm-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.blogm-tags > svg {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.blogm-tag {
    padding: 5px 13px;
    border-radius: 99px;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-glass);
    border: 1px solid var(--border);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.blogm-tag:hover {
    color: var(--text-primary);
    border-color: rgba(99, 102, 241, 0.5);
}

/* ----------------------------- Related -------------------------------- */

.blogm-related {
    margin-top: 34px;
}

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

@media (max-width: 980px) {
    .blogm-layout {
        grid-template-columns: 1fr;
    }

    .blogm-aside {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .blogm-aside .blogm-widget {
        flex: 1 1 300px;
    }
}

@media (max-width: 720px) {
    .blogm-featured-card {
        grid-template-columns: 1fr;
    }

    .blogm-featured-media img {
        min-height: 0;
        aspect-ratio: 16 / 9;
    }

    .blogm-aside {
        flex-direction: column;
    }

    .blogm-body table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .blogm-search-btn {
        padding: 10px 16px;
    }
}
