/* Blog: ro'yxat va maqola sahifalari uchun umumiy stillar */
:root {
  --b-bg: #f6f7fb;
  --b-card: #ffffff;
  --b-text: #0f172a;
  --b-muted: #64748b;
  --b-border: #e5e7eb;
  --b-accent: #4f46e5;
  --b-accent-soft: rgba(79, 70, 229, .1);
  --b-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
  --b-radius: 16px;
}
[data-theme="dark"] {
  --b-bg: #0b1020;
  --b-card: #151b2e;
  --b-text: #e5e7eb;
  --b-muted: #94a3b8;
  --b-border: #263049;
  --b-accent: #818cf8;
  --b-accent-soft: rgba(129, 140, 248, .14);
  --b-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
body.blog-page {
  background: var(--b-bg);
  color: var(--b-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.blog-page a { color: inherit; }
.b-wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.b-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; align-items: start; }
@media (max-width: 960px) { .b-layout { grid-template-columns: minmax(0, 1fr); } }

/* Breadcrumb */
.b-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; color: var(--b-muted); margin-bottom: 14px; list-style: none; padding: 0; }
.b-crumbs a { color: var(--b-muted); text-decoration: none; }
.b-crumbs a:hover { color: var(--b-accent); }
.b-crumbs li + li::before { content: "›"; margin-right: 6px; opacity: .6; }
.b-crumbs li:last-child { color: var(--b-text); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Sarlavha, qidiruv, kategoriyalar */
.b-head { padding: 22px 24px; margin-bottom: 16px; border-radius: var(--b-radius); border: 1px solid var(--b-border);
  background: radial-gradient(circle at 100% 0, rgba(236, 72, 153, .14), transparent 45%), linear-gradient(135deg, var(--b-accent-soft), var(--b-card)); }
.b-head h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; margin: 0 0 6px; letter-spacing: -.02em; }
.b-head p { color: var(--b-muted); margin: 0; }
.b-head p b { color: var(--b-text); }
.b-search { display: flex; gap: 8px; margin-bottom: 14px; }
.b-search input {
  flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--b-border);
  background: var(--b-card); color: var(--b-text); font-size: 1rem;
}
.b-search input:focus { outline: 2px solid var(--b-accent); outline-offset: 1px; }
.b-search button { padding: 0 18px; border-radius: 12px; border: 0; background: var(--b-accent); color: #fff; font-weight: 600; }
.b-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.b-chips::-webkit-scrollbar { display: none; }
@media (min-width: 961px) { main > .b-chips { flex-wrap: wrap; overflow: visible; } }
.b-chip {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--b-border); background: var(--b-card);
  color: var(--b-text); text-decoration: none; font-size: .9rem; white-space: nowrap;
}
.b-chip small { color: var(--b-muted); margin-left: 4px; }
.b-chip:hover { border-color: var(--b-accent); }
.b-chip.is-active { background: var(--b-accent); border-color: var(--b-accent); color: #fff; }
.b-chip.is-active small { color: rgba(255, 255, 255, .8); }

/* Kartalar */
.b-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.b-card {
  display: flex; flex-direction: column; background: var(--b-card); border: 1px solid var(--b-border);
  border-radius: var(--b-radius); overflow: hidden; box-shadow: var(--b-shadow); text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.b-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15, 23, 42, .12); }
.b-card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--b-border); }
.b-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.b-card:hover .b-card-media img { transform: scale(1.04); }
.b-card-ph {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-size: 3rem; font-weight: 800; color: rgba(255, 255, 255, .9);
  background: linear-gradient(135deg, #6366f1, #a855f7 55%, #ec4899);
}
.b-new {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700;
  color: #fff; background: #16a34a; box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.b-read { color: var(--b-accent); font-weight: 700; font-size: .95rem; }

/* Asosiy (eng yangi) maqola */
.b-card.b-card--featured { flex-direction: row; margin-bottom: 22px; }
.b-card.b-card--featured .b-card-media { flex: 0 0 54%; aspect-ratio: auto; min-height: 260px; }
.b-card.b-card--featured .b-card-body { padding: 22px 24px; justify-content: center; gap: 12px; }
.b-card.b-card--featured h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.25; letter-spacing: -.01em; }
.b-card.b-card--featured p { -webkit-line-clamp: 4; font-size: 1rem; }
.b-card.b-card--featured .b-meta { margin-top: 0; }
@media (max-width: 720px) {
  .b-card.b-card--featured { flex-direction: column; }
  .b-card.b-card--featured .b-card-media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .b-card.b-card--featured .b-card-body { padding: 16px; }
}
.b-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.b-card h2, .b-card h3 { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin: 0; }
.b-card p { color: var(--b-muted); font-size: .92rem; line-height: 1.5; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.b-badge { align-self: flex-start; font-size: .75rem; font-weight: 600; color: var(--b-accent); background: var(--b-accent-soft); padding: 3px 10px; border-radius: 999px; }
.b-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--b-muted); font-size: .82rem; margin-top: auto; }
.b-ad { grid-column: 1 / -1; min-height: 0; }
.b-empty { text-align: center; padding: 48px 16px; background: var(--b-card); border-radius: var(--b-radius); border: 1px dashed var(--b-border); }
.b-empty div { font-size: 48px; }

/* Sahifalash */
.b-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 28px 0 8px; list-style: none; padding: 0; }
.b-pages a, .b-pages span {
  display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 10px; border: 1px solid var(--b-border); background: var(--b-card); color: var(--b-text); text-decoration: none;
}
.b-pages a:hover { border-color: var(--b-accent); }
.b-pages .is-current { background: var(--b-accent); border-color: var(--b-accent); color: #fff; font-weight: 700; }
.b-pages .is-gap { border: 0; background: none; }

/* Sidebar */
.b-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 76px; }
@media (max-width: 960px) { .b-side { position: static; } }
.b-box { background: var(--b-card); border: 1px solid var(--b-border); border-radius: var(--b-radius); padding: 16px; box-shadow: var(--b-shadow); }
.b-box h2 { font-size: 1rem; font-weight: 700; margin: 0 0 12px; }
.b-box ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.b-box li a { display: flex; gap: 10px; align-items: center; text-decoration: none; font-size: .9rem; line-height: 1.35; }
.b-box li a:hover { color: var(--b-accent); }
.b-box li img { width: 56px; height: 40px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.b-box .b-num { flex: 0 0 22px; height: 22px; border-radius: 6px; background: var(--b-accent-soft); color: var(--b-accent); font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.b-box .b-chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.b-rss { font-size: .85rem; color: var(--b-muted) !important; text-decoration: none; }

/* Tugmalar va taklif bloklari */
.b-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 12px;
  background: var(--b-accent); border: 1px solid var(--b-accent); color: #fff !important; font-weight: 700; text-decoration: none;
  transition: filter .15s, transform .15s;
}
.b-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.b-btn--tg { background: #229ed9; border-color: #229ed9; }
.b-btn--ghost { background: transparent; color: var(--b-accent) !important; }
.b-tg p { color: var(--b-muted); font-size: .9rem; line-height: 1.5; margin: 0 0 12px; }
.b-tg .b-btn { width: 100%; }
.b-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px;
  margin: 20px 28px 0; padding: 18px 20px; border-radius: var(--b-radius);
  background: linear-gradient(135deg, var(--b-accent-soft), rgba(236, 72, 153, .08)); border: 1px solid var(--b-border);
}
.b-cta--tg { background: linear-gradient(135deg, rgba(34, 158, 217, .12), var(--b-accent-soft)); }
.b-cta h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 4px; }
.b-cta p { margin: 0; color: var(--b-muted); font-size: .95rem; line-height: 1.5; }
.b-cta > div:first-child { flex: 1 1 260px; }
.b-cta-btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 600px) { .b-cta { margin: 16px 16px 0; } .b-cta-btns, .b-cta-btns .b-btn { width: 100%; } }

/* Mundarija */
.b-toc { margin: 18px 28px 0; border: 1px solid var(--b-border); border-radius: 12px; background: var(--b-bg); }
.b-toc summary { cursor: pointer; padding: 12px 16px; font-weight: 700; }
.b-toc ol { margin: 0; padding: 0 16px 14px; display: grid; gap: 6px; list-style: none; }
.b-toc li { padding-left: 14px; position: relative; }
.b-toc li::before { content: "›"; position: absolute; left: 0; color: var(--b-accent); font-weight: 700; }
.b-toc a { color: var(--b-text); text-decoration: none; font-size: .95rem; }
.b-toc a:hover { color: var(--b-accent); text-decoration: underline; }
@media (max-width: 600px) { .b-toc { margin: 16px 16px 0; } }
.b-content h2[id] { scroll-margin-top: 80px; }

/* Maqola */
.b-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg, #6366f1, #ec4899); z-index: 2000; transition: width .1s; }
.b-article { background: var(--b-card); border: 1px solid var(--b-border); border-radius: var(--b-radius); box-shadow: var(--b-shadow); overflow: hidden; }
.b-article-head { padding: 24px 28px 0; }
.b-article h1 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); font-weight: 800; line-height: 1.2; letter-spacing: -.02em; margin: 10px 0 12px; }
.b-hero { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; margin-top: 18px; background: var(--b-border); }
.b-lead { font-size: 1.15rem; line-height: 1.6; font-weight: 500; padding: 22px 28px 0; margin: 0; }
.b-note { margin: 18px 28px 0; padding: 10px 14px; border-radius: 10px; background: var(--b-accent-soft); color: var(--b-text); font-size: .92rem; }
.b-content { padding: 8px 28px 8px; font-size: 1.08rem; line-height: 1.75; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .b-article-head, .b-lead, .b-content { padding-left: 16px; padding-right: 16px; }
  .b-note { margin-left: 16px; margin-right: 16px; }
  .b-content { font-size: 1.03rem; }
}
.b-content p { margin: 0 0 1.1em; }
.b-content h2, .b-content h3, .b-content h4 { font-weight: 700; line-height: 1.3; margin: 1.6em 0 .6em; }
.b-content h2 { font-size: 1.45rem; }
.b-content h3 { font-size: 1.25rem; }
.b-content img { max-width: 100%; height: auto; border-radius: 12px; margin: .6em 0; }
.b-content a { color: var(--b-accent); text-decoration: underline; text-underline-offset: 2px; }
.b-content ul, .b-content ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.b-content li { margin-bottom: .35em; }
.b-content blockquote { margin: 1.2em 0; padding: 10px 18px; border-left: 4px solid var(--b-accent); background: var(--b-accent-soft); border-radius: 0 10px 10px 0; }
.b-content pre { background: #0f172a; color: #e2e8f0; padding: 14px 16px; border-radius: 12px; overflow-x: auto; font-size: .9rem; }
.b-content code { font-size: .92em; }
.b-content table { width: 100%; border-collapse: collapse; margin: 1em 0; display: block; overflow-x: auto; }
.b-content th, .b-content td { border: 1px solid var(--b-border); padding: 8px 10px; text-align: left; overflow-wrap: normal; }
.b-content th { background: var(--b-accent-soft); }
.b-content td code { white-space: nowrap; }
.b-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; }
.b-content .b-ad { margin: 1.4em 0; }
.b-source { padding: 0 28px 4px; color: var(--b-muted); font-size: .9rem; }
.b-source a { color: var(--b-accent); }
@media (max-width: 600px) { .b-source { padding: 0 16px 4px; } }

.b-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 28px 24px; border-top: 1px solid var(--b-border); margin-top: 16px; }
@media (max-width: 600px) { .b-share { padding: 16px; } }
.b-share strong { margin-right: 4px; }
.b-share a, .b-share button {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--b-border);
  background: var(--b-bg); color: var(--b-text); text-decoration: none; font-size: .9rem; cursor: pointer;
}
.b-share a:hover, .b-share button:hover { border-color: var(--b-accent); }
.b-share .tg { background: #229ed9; border-color: #229ed9; color: #fff; }

.b-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
@media (max-width: 600px) { .b-nav { grid-template-columns: 1fr; } }
.b-nav a { display: block; padding: 14px 16px; border-radius: var(--b-radius); border: 1px solid var(--b-border); background: var(--b-card); text-decoration: none; }
.b-nav a:hover { border-color: var(--b-accent); }
.b-nav small { display: block; color: var(--b-muted); margin-bottom: 4px; }
.b-nav .is-next { text-align: right; }
.b-related h2 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 14px; }

.b-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: .9rem; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 2000; }
.b-toast.show { opacity: 1; }

.b-footer { text-align: center; color: var(--b-muted); font-size: .88rem; padding: 24px 16px 32px; }
.b-footer a { color: var(--b-muted); }
.b-comments { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* Maqola ichidagi skrinshotlar to'plami va ilovani yuklab olish bloki */
.b-content .b-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1.2em 0; }
.b-content .b-shots figure { margin: 0; text-align: center; }
.b-content .b-shots img { margin: 0 0 6px; border: 1px solid var(--b-border); border-radius: 14px; }
.b-content .b-shots figcaption { font-size: .85rem; line-height: 1.35; color: var(--b-muted); }
@media (max-width: 600px) { .b-content .b-shots { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.b-content .b-app {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin: 1.2em 0; padding: 14px 16px;
  border: 1px solid var(--b-border); border-radius: var(--b-radius); background: var(--b-accent-soft);
}
.b-content .b-app img { width: 72px; height: 72px; margin: 0; border-radius: 16px; flex: 0 0 auto; }
.b-content .b-app > div { flex: 1 1 180px; display: flex; flex-direction: column; line-height: 1.35; }
.b-content .b-app > div > span { color: var(--b-muted); font-size: .9rem; }
.b-content a.b-btn { text-decoration: none; }
@media (max-width: 600px) { .b-content .b-app .b-btn { width: 100%; } }
