/* =========================================================
   MandiKhata Blog — list, post page, reading typography
   ========================================================= */
.bl-tools { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; align-items: center; justify-content: space-between; margin-top: 1.4rem; }
.bl-cats { display: flex; flex-wrap: wrap; gap: .45rem; }
.bl-cats a { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); text-decoration: none; font-weight: 700; font-size: .88rem; }
.bl-cats a small { color: var(--text-dim); font-weight: 600; margin-left: .15rem; }
.bl-cats a.on { background: var(--gradient-1); color: #fff; border-color: transparent; }
.bl-cats a.on small { color: rgba(255,255,255,.8); }
.bl-search { position: relative; flex: 0 1 300px; }
.bl-search i { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-dim); font-size: .85rem; }
.bl-search .mk-input { padding-left: 2.3rem; }
html[data-theme="light"] .bl-search .mk-input { background: #fff; }

.bl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.3rem; }
.bl-lead { margin-bottom: 1.4rem; }
.bl-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--glass); border: 1px solid var(--glass-border); box-shadow: 0 18px 40px -30px rgba(15,23,42,.5); transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.bl-card:hover { transform: translateY(-4px); border-color: rgba(16,185,129,.4); box-shadow: 0 26px 50px -28px rgba(16,185,129,.5); }
.bl-card.big { display: grid; grid-template-columns: 1.15fr 1fr; }
.bl-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, rgba(16,185,129,.25), rgba(245,158,11,.2)); }
.bl-card.big .bl-media { aspect-ratio: auto; min-height: 280px; }
.bl-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.bl-card:hover .bl-media img { transform: scale(1.04); }
.bl-ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 3rem; color: rgba(4,120,87,.55); }
.bl-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .5rem; }
.bl-card.big .bl-body { padding: 1.8rem 2rem; justify-content: center; }
.bl-cat { align-self: flex-start; font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #047857; background: rgba(16,185,129,.12); padding: .25rem .6rem; border-radius: 999px; text-decoration: none; }
html:not([data-theme="light"]) .bl-cat { color: #6ee7b7; }
.bl-body h2, .bl-body h3 { font-weight: 800; line-height: 1.3; }
.bl-body h3 { font-size: 1.12rem; }
.bl-body h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.bl-body h2 a, .bl-body h3 a { color: var(--text); text-decoration: none; }
.bl-body h2 a:hover, .bl-body h3 a:hover { color: var(--primary-light); }
.bl-body p { color: var(--text-muted); font-size: .93rem; line-height: 1.6; }
.bl-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--text-dim); font-size: .8rem; margin-top: auto; }
.bl-meta i { margin-right: .25rem; }
.bl-meta.big { font-size: .9rem; margin-top: 1rem; color: var(--text-muted); }
.bl-empty { text-align: center; padding: 3rem 1.5rem; border: 1px dashed var(--glass-border); border-radius: 22px; background: var(--glass); display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.bl-empty > span { font-size: 3rem; }
.bl-empty h3 { font-size: 1.35rem; font-weight: 800; }
.bl-empty p { color: var(--text-muted); }
.bl-pager { display: flex; justify-content: center; gap: .4rem; margin-top: 1.8rem; flex-wrap: wrap; }
.bl-pager a { min-width: 40px; text-align: center; padding: .5rem .7rem; border-radius: 10px; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); text-decoration: none; font-weight: 700; }
.bl-pager a.on { background: var(--gradient-1); color: #fff; border-color: transparent; }

.bl-cta { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding: 1.4rem 1.6rem; border-radius: 20px; border: 1px solid rgba(16,185,129,.3); background: radial-gradient(ellipse at 0% 0%, rgba(16,185,129,.16), transparent 60%), var(--glass); margin-top: 2rem; }
.bl-cta b { display: block; font-size: 1.1rem; margin-bottom: .2rem; }
.bl-cta span { color: var(--text-muted); font-size: .92rem; }

/* Post page */
.bl-narrow { max-width: 780px; margin: 0 auto; }
.bl-head { padding-bottom: 1.4rem; }
.bl-head h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); line-height: 1.15; margin: .6rem 0 .8rem; }
.bl-head .lead { font-size: 1.12rem; }
.bl-preview { margin-bottom: 1rem; padding: .7rem 1rem; border-radius: 12px; background: rgba(245,158,11,.12); border: 1px dashed rgba(245,158,11,.6); font-weight: 700; font-size: .9rem; }
.bl-article > .bl-narrow { padding: 0 2rem; }
.bl-cover { margin: 0 0 1.8rem; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 60px -36px rgba(15,23,42,.6); }
.bl-cover img { width: 100%; height: auto; display: block; }
.bl-toc { margin: 0 0 1.8rem; padding: 1rem 1.3rem; border-radius: 16px; background: var(--glass); border: 1px solid var(--glass-border); }
.bl-toc b { display: block; margin-bottom: .5rem; }
.bl-toc ol { padding-left: 1.2rem; display: grid; gap: .3rem; }
.bl-toc a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.bl-toc a:hover { color: var(--primary-light); }
.bl-content { font-size: 1.08rem; line-height: 1.8; color: var(--text); overflow-wrap: anywhere; }
.bl-content > * + * { margin-top: 1.1em; }
.bl-content h2 { font-size: 1.6rem; line-height: 1.3; margin-top: 1.9em; scroll-margin-top: 140px; }
.bl-content h3 { font-size: 1.28rem; line-height: 1.35; margin-top: 1.6em; }
.bl-content h4 { font-size: 1.08rem; margin-top: 1.4em; }
.bl-content a { color: var(--primary-light); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bl-content ul, .bl-content ol { padding-left: 1.4rem; }
.bl-content li + li { margin-top: .35em; }
.bl-content blockquote { border-left: 4px solid var(--primary); padding: .6rem 1.1rem; background: rgba(16,185,129,.07); border-radius: 0 12px 12px 0; color: var(--text-muted); font-style: italic; }
.bl-content img { max-width: 100%; height: auto; border-radius: 14px; display: block; margin: 0 auto; }
.bl-content figure { margin: 1.4em 0; }
.bl-content figcaption { text-align: center; color: var(--text-dim); font-size: .88rem; margin-top: .5rem; }
.bl-content table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.bl-content th, .bl-content td { border: 1px solid var(--glass-border); padding: .55rem .7rem; text-align: left; }
.bl-content th { background: rgba(16,185,129,.08); }
.bl-content pre { background: rgba(15,23,42,.88); color: #e2e8f0; padding: 1rem; border-radius: 12px; overflow-x: auto; font-size: .9rem; }
.bl-content code { font-size: .92em; }
.bl-content iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; }
.bl-content hr { border: none; border-top: 1px solid var(--glass-border); margin: 2em 0; }
.bl-tags { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 2rem; }
.bl-tags a { font-size: .84rem; font-weight: 700; color: var(--text-muted); background: rgba(148,163,184,.13); padding: .3rem .7rem; border-radius: 999px; text-decoration: none; }
.bl-tags a:hover { color: var(--primary-light); }
.bl-share { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--glass-border); }
.bl-share span { font-weight: 700; margin-right: .3rem; }
.bl-share a, .bl-share button { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid var(--glass-border); background: var(--glass); color: var(--text); cursor: pointer; text-decoration: none; font-size: 1rem; }
.bl-share a:hover, .bl-share button:hover { border-color: var(--primary-light); color: var(--primary-light); }
.bl-share .fa-whatsapp { color: #25d366; }

@media (max-width: 900px) {
    .bl-card.big { grid-template-columns: 1fr; }
    .bl-card.big .bl-media { min-height: 0; aspect-ratio: 16 / 9; }
    .bl-card.big .bl-body { padding: 1.2rem; }
}
@media (max-width: 640px) {
    .bl-article > .bl-narrow { padding: 0 1rem; }
    .bl-search { flex: 1 1 100%; }
    .bl-content { font-size: 1.02rem; }
    .bl-content h2 { font-size: 1.35rem; }
}
