/**
 * Blog Warung Dwi — layout artikel & index
 */

.blog-main {
    background: linear-gradient(180deg, #fff7f9 0%, #ffffff 28%, #ffffff 100%);
}

html[data-theme="dark"] .blog-main,
html.dark .blog-main {
    background: linear-gradient(180deg, #1a1020 0%, #0f172a 40%, #0f172a 100%);
}

/* Filters */
.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    justify-content: center;
}

.blog-filter {
    border: 1px solid #fecdd3;
    background: #fff;
    color: #475569;
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.15s ease;
    font-family: inherit;
}

.blog-filter:hover {
    border-color: #fb7185;
    color: #e11d48;
}

.blog-filter.is-active {
    background: #e11d48;
    border-color: #e11d48;
    color: #fff;
}

html[data-theme="dark"] .blog-filter,
html.dark .blog-filter {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

html[data-theme="dark"] .blog-filter.is-active,
html.dark .blog-filter.is-active {
    background: #e11d48;
    border-color: #e11d48;
    color: #fff;
}

/* Grid cards */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.blog-card {
    background: #fff;
    border: 1px solid #ffe4e6;
    border-radius: 1.25rem;
    padding: 1.35rem 1.4rem 1.25rem;
    box-shadow: 0 10px 30px -18px rgba(225, 29, 72, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -16px rgba(225, 29, 72, 0.4);
}

html[data-theme="dark"] .blog-card,
html.dark .blog-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: none;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.blog-card__cat {
    display: inline-flex;
    align-items: center;
    background: #fff1f2;
    color: #e11d48;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
}

html[data-theme="dark"] .blog-card__cat,
html.dark .blog-card__cat {
    background: rgba(225, 29, 72, 0.15);
    color: #fb7185;
}

.blog-card__title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 0.55rem;
}

.blog-card__title a {
    color: inherit;
    text-decoration: none;
}

.blog-card__title a:hover {
    color: #e11d48;
}

html[data-theme="dark"] .blog-card__title,
html.dark .blog-card__title {
    color: #f1f5f9;
}

.blog-card__excerpt {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #64748b;
    margin: 0 0 0.9rem;
}

html[data-theme="dark"] .blog-card__excerpt,
html.dark .blog-card__excerpt {
    color: #94a3b8;
}

.blog-card__more {
    font-size: 0.85rem;
    font-weight: 800;
    color: #e11d48;
    text-decoration: none;
}

.blog-card__more:hover {
    text-decoration: underline;
}

.blog-empty {
    text-align: center;
    color: #94a3b8;
    font-weight: 600;
    padding: 2rem 0;
}

/* Article */
.blog-article {
    padding: 1.5rem 1rem 3.5rem;
}

.blog-article__inner {
    max-width: 46rem;
    margin: 0 auto;
}

.blog-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.blog-breadcrumb a {
    color: #e11d48;
    text-decoration: none;
}

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

.blog-article__header {
    margin-bottom: 1.75rem;
}

.blog-article__h1 {
    font-size: clamp(1.55rem, 3.5vw, 2.15rem);
    font-weight: 900;
    line-height: 1.25;
    color: #0f172a;
    margin: 0.75rem 0 0.65rem;
    letter-spacing: -0.02em;
}

html[data-theme="dark"] .blog-article__h1,
html.dark .blog-article__h1 {
    color: #f8fafc;
}

.blog-article__dates {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
    margin: 0 0 0.85rem;
}

.blog-article__lead {
    font-size: 1.05rem;
    line-height: 1.65;
    color: #475569;
    margin: 0;
    font-weight: 500;
}

html[data-theme="dark"] .blog-article__lead,
html.dark .blog-article__lead {
    color: #94a3b8;
}

/* Prose */
.blog-prose {
    font-size: 1.02rem;
    line-height: 1.75;
    color: #334155;
}

html[data-theme="dark"] .blog-prose,
html.dark .blog-prose {
    color: #cbd5e1;
}

.blog-prose h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.015em;
}

.blog-prose h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 1.5rem 0 0.5rem;
}

html[data-theme="dark"] .blog-prose h2,
html[data-theme="dark"] .blog-prose h3,
html.dark .blog-prose h2,
html.dark .blog-prose h3 {
    color: #f1f5f9;
}

.blog-prose p {
    margin: 0 0 1rem;
}

.blog-prose ul,
.blog-prose ol {
    margin: 0 0 1.1rem 1.15rem;
    padding: 0;
}

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

.blog-prose a {
    color: #e11d48;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-prose a:hover {
    color: #be123c;
}

.blog-prose strong {
    color: #0f172a;
    font-weight: 800;
}

html[data-theme="dark"] .blog-prose strong,
html.dark .blog-prose strong {
    color: #f8fafc;
}

.blog-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 1.25rem;
    font-size: 0.92rem;
    overflow: hidden;
    border-radius: 0.75rem;
}

.blog-table th,
.blog-table td {
    border: 1px solid #e2e8f0;
    padding: 0.65rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.blog-table th {
    background: #fff1f2;
    color: #9f1239;
    font-weight: 800;
}

html[data-theme="dark"] .blog-table th,
html.dark .blog-table th {
    background: rgba(225, 29, 72, 0.12);
    color: #fda4af;
}

html[data-theme="dark"] .blog-table th,
html[data-theme="dark"] .blog-table td,
html.dark .blog-table th,
html.dark .blog-table td {
    border-color: #334155;
}

.blog-pre {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 0.85rem;
    padding: 1rem 1.1rem;
    font-size: 0.85rem;
    overflow-x: auto;
    margin: 0 0 1.25rem;
    line-height: 1.55;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* CTA boxes */
.blog-cta-box {
    background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 50%, #eff6ff 100%);
    border: 1px solid #fecdd3;
    border-radius: 1.15rem;
    padding: 1.15rem 1.25rem;
    margin: 1.5rem 0;
}

.blog-cta-box p {
    margin: 0 0 0.75rem;
    color: #334155;
    font-weight: 600;
    line-height: 1.55;
}

.blog-cta-box p:last-child {
    margin-bottom: 0;
}

.blog-cta-box--end {
    margin-top: 2rem;
}

html[data-theme="dark"] .blog-cta-box,
html.dark .blog-cta-box {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.12), rgba(30, 41, 59, 0.9));
    border-color: #334155;
}

html[data-theme="dark"] .blog-cta-box p,
html.dark .blog-cta-box p {
    color: #e2e8f0;
}

.blog-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #0f172a;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.7rem 1.15rem;
    border-radius: 999px;
    text-decoration: none !important;
    margin: 0.25rem 0.35rem 0.25rem 0;
    transition: transform 0.15s ease, background 0.15s ease;
}

.blog-cta-btn:hover {
    background: #e11d48;
    transform: translateY(-1px);
    color: #fff !important;
}

.blog-cta-btn--ghost {
    background: #fff;
    color: #e11d48 !important;
    border: 1px solid #fecdd3;
}

.blog-cta-btn--ghost:hover {
    background: #fff1f2;
    color: #be123c !important;
}

html[data-theme="dark"] .blog-cta-btn--ghost,
html.dark .blog-cta-btn--ghost {
    background: #1e293b;
    border-color: #475569;
    color: #fda4af !important;
}

/* FAQ */
.blog-faq {
    margin-top: 2.5rem;
}

.blog-faq > h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1rem;
}

html[data-theme="dark"] .blog-faq > h2,
html.dark .blog-faq > h2 {
    color: #f1f5f9;
}

.blog-faq__item {
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #fff;
    margin-bottom: 0.65rem;
    overflow: hidden;
}

html[data-theme="dark"] .blog-faq__item,
html.dark .blog-faq__item {
    background: #1e293b;
    border-color: #334155;
}

.blog-faq__item summary {
    cursor: pointer;
    font-weight: 800;
    padding: 0.9rem 1rem;
    color: #0f172a;
    list-style: none;
}

.blog-faq__item summary::-webkit-details-marker {
    display: none;
}

html[data-theme="dark"] .blog-faq__item summary,
html.dark .blog-faq__item summary {
    color: #f1f5f9;
}

.blog-faq__a {
    padding: 0 1rem 1rem;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.65;
}

html[data-theme="dark"] .blog-faq__a,
html.dark .blog-faq__a {
    color: #94a3b8;
}

.blog-faq__a p {
    margin: 0;
}

/* Related */
.blog-related {
    margin-top: 2.5rem;
}

.blog-related > h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 1rem;
    color: #0f172a;
}

html[data-theme="dark"] .blog-related > h2,
html.dark .blog-related > h2 {
    color: #f1f5f9;
}

.blog-related__grid {
    display: grid;
    gap: 0.75rem;
}

.blog-related__item {
    display: block;
    border: 1px solid #ffe4e6;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    text-decoration: none;
    background: #fff;
    transition: border-color 0.15s ease;
}

.blog-related__item:hover {
    border-color: #fb7185;
}

html[data-theme="dark"] .blog-related__item,
html.dark .blog-related__item {
    background: #1e293b;
    border-color: #334155;
}

.blog-related__cat {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    color: #e11d48;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.blog-related__title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

html[data-theme="dark"] .blog-related__title,
html.dark .blog-related__title {
    color: #e2e8f0;
}

.blog-back {
    margin-top: 2rem;
    font-weight: 800;
}

.blog-back a {
    color: #e11d48;
    text-decoration: none;
}

.blog-back a:hover {
    text-decoration: underline;
}
