/* Blog pages. Uses the storefront colours (--navy, --blue, --line, --muted, --cream) and Vazirmatn. */
.blog-page { --b-radius: 16px; --b-card: #fff; --b-ink: var(--navy, #1b2a4a); --b-soft: #eef1f6; }
.blog-head { margin-bottom: 18px; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.blog-layout--post { grid-template-columns: minmax(0, 1fr) 300px; }
@media (max-width: 1000px) { .blog-layout, .blog-layout--post { grid-template-columns: 1fr; } .blog-side { order: 2; } }
.blog-main { min-width: 0; }

/* ---- cards ---- */
.bgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bgrid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bgrid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 700px) { .bgrid, .bgrid--3, .bgrid--4 { grid-template-columns: 1fr; } }
.bpost-card { background: var(--b-card); border: 1px solid var(--line, #e6e1d6); border-radius: var(--b-radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .18s ease, transform .18s ease; }
.bpost-card:hover { box-shadow: 0 10px 28px rgba(27, 42, 74, .12); transform: translateY(-2px); }
.bpost-cover { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--b-soft); overflow: hidden; }
.bpost-cover img, .bpost-cover picture { width: 100%; height: 100%; display: block; object-fit: cover; }
.bpost-ph { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 52px; font-weight: 900; color: #b8c1d1; background: linear-gradient(135deg, #e9edf5, #f6f4ef); }
.bpost-pin { position: absolute; top: 10px; inset-inline-start: 10px; background: var(--blue, #0078d1); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.bpost-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.bpost-cat { align-self: flex-start; font-size: 12px; font-weight: 700; color: var(--blue, #0078d1); background: rgba(0, 120, 209, .09); padding: 2px 10px; border-radius: 999px; }
.bpost-title { font-size: 18px; line-height: 1.7; font-weight: 800; margin: 0; }
.bpost-title a:hover { color: var(--blue, #0078d1); }
.bpost-excerpt { margin: 0; color: var(--muted, #6b7280); font-size: 14px; line-height: 1.9; }
.bpost-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted, #6b7280); margin-top: auto; padding-top: 6px; }
.bpost-rate { color: #d99a00; font-weight: 700; }
.bfeatured { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 22px; }
.bfeatured .is-big { grid-row: span 2; }
.bfeatured .is-big .bpost-title { font-size: 24px; }
@media (max-width: 800px) { .bfeatured { grid-template-columns: 1fr; } .bfeatured .is-big { grid-row: auto; } }

/* ---- sidebar ---- */
.blog-side { position: sticky; top: 90px; align-self: start; display: flex; flex-direction: column; gap: 16px; }
.blog-side-boxes { display: flex; flex-direction: column; gap: 16px; }
.bside-box { background: var(--b-card); border: 1px solid var(--line, #e6e1d6); border-radius: var(--b-radius); padding: 16px 18px; }
.bside-box h3 { font-size: 15px; font-weight: 800; margin: 0 0 10px; }
.bside-search { display: flex; gap: 8px; }
.bside-search .form-control { flex: 1; min-width: 0; }
.bside-list, .bside-popular { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bside-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.bside-list li span { color: var(--muted, #6b7280); font-size: 12px; background: var(--b-soft); border-radius: 999px; padding: 0 8px; }
.bside-popular { counter-reset: pop; }
.bside-popular li { counter-increment: pop; display: flex; gap: 10px; font-size: 14px; line-height: 1.8; }
.bside-popular li::before { content: counter(pop, persian); font-weight: 900; color: var(--blue, #0078d1); }
.bside-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.bside-tags a, .btags a { font-size: 13px; background: var(--b-soft); border-radius: 999px; padding: 3px 12px; }
.bside-tags a:hover, .btags a:hover { background: var(--blue, #0078d1); color: #fff; }
.btoc--side { max-height: calc(100vh - 140px); overflow: auto; }
.btoc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.btoc li.lv3 { padding-inline-start: 16px; font-size: 13px; color: var(--muted, #6b7280); }
.btoc a.on { color: var(--blue, #0078d1); font-weight: 800; }
.btoc--inline { display: none; background: var(--b-card); border: 1px solid var(--line, #e6e1d6); border-radius: var(--b-radius); padding: 14px 18px; margin: 0 0 22px; }
@media (max-width: 1000px) { .btoc--inline { display: block; } .btoc--side { display: none; } }

/* ---- post ---- */
.bpost { min-width: 0; }
.bpost-head .lead { font-size: 16px; color: var(--muted, #6b7280); line-height: 2; margin: 8px 0 12px; }
.bpost-head .page-title { font-size: 30px; line-height: 1.6; margin: 10px 0 6px; }
.bpost-hero { margin: 18px 0 22px; border-radius: var(--b-radius); overflow: hidden; background: var(--b-soft); }
.bpost-hero img, .bpost-hero picture { width: 100%; height: auto; display: block; }
.bpreview { background: #fff4d6; border: 1px solid #f1d98a; color: #7a5b00; border-radius: 12px; padding: 10px 16px; margin-bottom: 14px; font-size: 14px; }

.blog-content { font-size: 17px; line-height: 2.15; color: #1f2a44; overflow-wrap: anywhere; }
.blog-content > *:first-child { margin-top: 0; }
.blog-content h2 { font-size: 25px; font-weight: 900; margin: 2.1em 0 .6em; line-height: 1.7; scroll-margin-top: 90px; }
.blog-content h3 { font-size: 20px; font-weight: 800; margin: 1.8em 0 .5em; scroll-margin-top: 90px; }
.blog-content h4 { font-size: 17px; font-weight: 800; margin: 1.5em 0 .4em; }
.blog-content p { margin: 0 0 1.1em; }
.blog-content a { color: var(--blue, #0078d1); text-decoration: underline; text-underline-offset: 4px; }
.blog-content ul, .blog-content ol { margin: 0 0 1.2em; padding-inline-start: 1.6em; }
.blog-content li { margin-bottom: .35em; }
.blog-content blockquote { margin: 1.4em 0; padding: 12px 20px; border-inline-start: 4px solid var(--blue, #0078d1); background: var(--b-soft); border-radius: 12px; color: #34415f; }
.blog-content img, .blog-content video, .blog-content iframe { max-width: 100%; height: auto; border-radius: 12px; }
.blog-content figure { margin: 1.6em auto; text-align: center; }
.blog-content figcaption { font-size: 13.5px; color: var(--muted, #6b7280); margin-top: 8px; line-height: 1.8; }
.blog-content .blog-figure--md { max-width: 62%; } .blog-content .blog-figure--sm { max-width: 38%; }
.blog-content .blog-video video { width: 100%; background: #000; }
.blog-content .blog-video--embed { position: relative; aspect-ratio: 16 / 9; }
.blog-content .blog-video--embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.blog-content .table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line, #e6e1d6); border-radius: 12px; }
.blog-content table { border-collapse: collapse; width: 100%; font-size: 15px; }
.blog-content th, .blog-content td { border: 1px solid var(--line, #e6e1d6); padding: 9px 14px; text-align: start; }
.blog-content th { background: var(--b-soft); font-weight: 800; }
.blog-content pre { direction: ltr; text-align: left; background: #12192b; color: #e8edf7; padding: 16px 18px; border-radius: 12px; overflow: auto; font-size: 14px; line-height: 1.7; }
.blog-content code { direction: ltr; background: var(--b-soft); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.blog-content pre code { background: transparent; padding: 0; }
.blog-content hr { border: 0; border-top: 1px solid var(--line, #e6e1d6); margin: 2em 0; }
.blog-content .blog-callout { margin: 1.5em 0; padding: 14px 20px; border-radius: 12px; border-inline-start: 5px solid #3b82f6; background: rgba(59, 130, 246, .09); }
.blog-content .blog-callout p:last-child { margin-bottom: 0; }
.blog-content .blog-callout--tip { border-color: #10b981; background: rgba(16, 185, 129, .1); }
.blog-content .blog-callout--warn { border-color: #f59e0b; background: rgba(245, 158, 11, .12); }
.blog-content .blog-callout--danger { border-color: #ef4444; background: rgba(239, 68, 68, .09); }
.blog-content details.faq-item { border: 1px solid var(--line, #e6e1d6); border-radius: 12px; padding: 4px 18px; margin: 10px 0; background: var(--b-card); }
.blog-content details.faq-item summary { cursor: pointer; font-weight: 800; padding: 10px 0; }
.blog-content .blog-product { margin: 1.6em 0; max-width: 300px; line-height: 1.7; font-size: 15px; }
.blog-content .blog-product a { color: inherit; text-decoration: none; }
.blog-content .blog-product .btn-navy { color: #fff; }

.bgallery { margin: 28px 0 8px; }
.bgallery h2, .bproducts h2, .brelated h2, .bcomments h2 { font-size: 21px; font-weight: 900; margin: 0 0 14px; }
.bgallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.bgallery-grid figure { margin: 0; }
.bgallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; display: block; }
.bgallery-grid figcaption { font-size: 12.5px; color: var(--muted, #6b7280); margin-top: 4px; }
.btags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 22px 0 6px; font-size: 14px; }
.bpost-actions { display: flex; flex-wrap: wrap; gap: 16px 28px; justify-content: space-between; align-items: center; padding: 18px 20px; margin: 24px 0; background: var(--b-card); border: 1px solid var(--line, #e6e1d6); border-radius: var(--b-radius); }
.brate { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.brate-stars { display: inline-flex; gap: 2px; direction: ltr; }
.bstar { border: 0; background: transparent; font-size: 28px; line-height: 1; color: #cfd5e1; cursor: pointer; padding: 0 2px; transition: transform .1s; }
.bstar.on, .bstar.hov { color: #f5b400; }
.bstar:hover { transform: scale(1.15); }
.brate-info { font-size: 13px; color: var(--muted, #6b7280); }
.bshare { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; }
.bshare a, .bshare button { border: 1px solid var(--line, #e6e1d6); background: #fff; border-radius: 999px; padding: 4px 14px; font-size: 13px; cursor: pointer; color: inherit; }
.bshare a:hover, .bshare button:hover { background: var(--navy, #1b2a4a); color: #fff; }

.bproducts, .brelated { margin: 34px 0; }
.bproduct { position: relative; }
.bproduct-badge { position: absolute; z-index: 2; top: 10px; inset-inline-end: 10px; background: var(--ok, #1f8a4c); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 999px; }
.bproduct-note { font-size: 13px; color: var(--muted, #6b7280); margin: 6px 4px 0; line-height: 1.8; }
.bnav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 28px 0; }
.bnav a { display: flex; flex-direction: column; gap: 4px; background: var(--b-card); border: 1px solid var(--line, #e6e1d6); border-radius: var(--b-radius); padding: 14px 18px; font-weight: 800; line-height: 1.7; }
.bnav a small { color: var(--muted, #6b7280); font-weight: 500; }
.bnav a:hover { border-color: var(--blue, #0078d1); }
.bnav-prev { text-align: start; } .bnav-next { text-align: end; }
@media (max-width: 600px) { .bnav { grid-template-columns: 1fr; } }

/* ---- comments ---- */
.bcomments { margin: 38px 0 0; }
.bcomments h2 small { color: var(--muted, #6b7280); font-weight: 500; }
.bclist { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bclist--sub { margin: 14px 0 0; padding-inline-start: 22px; border-inline-start: 2px solid var(--line, #e6e1d6); }
.bc { background: var(--b-card); border: 1px solid var(--line, #e6e1d6); border-radius: var(--b-radius); padding: 14px 18px; }
.bclist--sub .bc { background: #fbfaf7; }
.bc--team { border-color: rgba(0, 120, 209, .45); }
.bc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bc-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--navy, #1b2a4a); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.bc-team { font-size: 11.5px; background: var(--blue, #0078d1); color: #fff; border-radius: 999px; padding: 1px 9px; }
.bc-date { margin-inline-start: auto; font-size: 12px; color: var(--muted, #6b7280); }
.bc-body { margin: 10px 0 6px; line-height: 2; font-size: 15px; overflow-wrap: anywhere; }
.bc-reply { border: 0; background: transparent; color: var(--blue, #0078d1); font-weight: 700; cursor: pointer; padding: 0; font-size: 13px; }
.bcform { background: var(--b-card); border: 1px solid var(--line, #e6e1d6); border-radius: var(--b-radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.bcform h3 { margin: 0; font-size: 17px; font-weight: 800; }
.bcform-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .bcform-row { grid-template-columns: 1fr; } }
.bcform textarea { resize: vertical; }
.bcform-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.bcform-foot small { color: var(--muted, #6b7280); }
.bcform-reply { margin: 0; background: var(--b-soft); border-radius: 10px; padding: 6px 12px; font-size: 14px; }
.bcform-reply button { border: 0; background: transparent; color: #c0392b; cursor: pointer; }
.bhp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bnote { border-radius: 12px; padding: 10px 16px; margin-bottom: 14px; font-size: 14px; }
.bnote--ok { background: #e6f6ec; color: #17653a; } .bnote--err { background: #fdecea; color: #a32e22; }

/* ---- places where the blog appears inside other pages ---- */
.home-blog { margin: 44px 0 20px; }
.home-blog-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.home-blog-head h2 { font-size: 22px; font-weight: 900; margin: 0; }
.home-blog-head a { color: var(--blue, #0078d1); font-weight: 700; }
.product-blog { margin: 36px 0 12px; }
.product-blog-title { font-size: 20px; font-weight: 900; margin: 22px 0 14px; }
.bintro { display: flex; gap: 18px; align-items: center; background: linear-gradient(135deg, #fff, #f1f6fd); border: 1px solid rgba(0, 120, 209, .35); border-radius: var(--b-radius); padding: 14px; }
.bintro-pic { width: 190px; flex-shrink: 0; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--b-soft); }
.bintro-pic img, .bintro-pic picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.bintro-body { display: flex; flex-direction: column; gap: 6px; line-height: 1.8; }
.bintro-body small { color: var(--ok, #1f8a4c); font-weight: 800; }
.bintro-body strong { font-size: 18px; }
.bintro-body span { color: var(--muted, #6b7280); font-size: 14px; }
.bintro-body em { color: var(--blue, #0078d1); font-style: normal; font-weight: 800; }
@media (max-width: 600px) { .bintro { flex-direction: column; align-items: stretch; } .bintro-pic { width: 100%; } }

/* simple lightbox */
.blb { position: fixed; inset: 0; z-index: 9999; background: rgba(5, 10, 20, .86); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.blb img { max-width: 94vw; max-height: 90vh; border-radius: 10px; }
