/* Blog pages (blog.html, blog/*.html). Palette and header/footer follow index.html. */
:root {
  --bg: #F6F5F1; --bg2: #EFEDE6; --fg: #14211D; --muted: #5C6B66; --line: #E3DFD4; --card: #FFFFFF;
  --accent: #0E7C66; --accent-2: #12A383; --soft: #DCEFE9; --soft-fg: #0B5E4E;
  --ink: #0B1A16; --ink-fg: #EEF3F1; --ink-muted: #9FB3AC;
  --shadow: 0 30px 60px -20px rgb(14 60 50 / .28), 0 12px 24px -12px rgb(0 0 0 / .18);
  --font: 'IBM Plex Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0B110F; --bg2: #101815; --fg: #EEF3F1; --muted: #93A39D; --line: #22302A; --card: #141D19;
  --accent: #3CC29E; --accent-2: #2BA585; --soft: #173A31; --soft-fg: #7FE0C2;
  --ink: #07100D; --shadow: 0 30px 60px -20px rgb(0 0 0 / .6), 0 12px 24px -12px rgb(0 0 0 / .5); color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0B110F; --bg2: #101815; --fg: #EEF3F1; --muted: #93A39D; --line: #22302A; --card: #141D19;
  --accent: #3CC29E; --accent-2: #2BA585; --soft: #173A31; --soft-fg: #7FE0C2;
  --ink: #07100D; --shadow: 0 30px 60px -20px rgb(0 0 0 / .6), 0 12px 24px -12px rgb(0 0 0 / .5); color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 18px; line-height: 1.9; overflow-x: hidden; }
a { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: 20px; }
.icon { width: 1em; height: 1em; fill: currentColor; }

/* Header */
.nav { position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: 22px; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--fg); }
.store-badge { display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 16px; border-radius: 12px; background: var(--fg); color: var(--bg); text-decoration: none; line-height: 1.2; white-space: nowrap; }
.store-badge .icon { width: 22px; height: 22px; }
.store-badge small { display: block; font-size: 11px; opacity: .75; }
.store-badge b { display: block; font-size: 15px; font-weight: 600; }

/* Blog index */
.blog-head { padding: 64px 0 36px; }
.blog-head h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.3; margin: 0 0 10px; }
.blog-head p { color: var(--muted); font-size: 19px; margin: 0; max-width: 56ch; }
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; padding-bottom: 100px; }
.post-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; text-decoration: none; color: var(--fg); transition: transform .3s, box-shadow .3s; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card div { padding: 20px 22px 24px; }
.post-card h2 { font-size: 21px; line-height: 1.5; margin: 0 0 8px; }
.post-card p { color: var(--muted); font-size: 15.5px; line-height: 1.75; margin: 0; }
.post-card time { display: block; color: var(--muted); font-size: 13.5px; margin-top: 12px; }

/* Article */
.article { max-width: 760px; margin: 0 auto; padding: 48px 20px 40px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.article h1 { font-size: clamp(32px, 4.6vw, 46px); line-height: 1.35; margin: 0 0 14px; text-wrap: balance; }
.meta { color: var(--muted); font-size: 15px; margin-bottom: 28px; }
.cover { border-radius: 22px; box-shadow: var(--shadow); margin: 0 0 36px; width: 100%; }
.article h2 { font-size: 28px; line-height: 1.45; margin: 48px 0 12px; }
.article h3 { font-size: 21px; line-height: 1.5; margin: 30px 0 8px; }
.article p, .article li { color: var(--fg); }
.article p { margin: 0 0 18px; }
.article ul, .article ol { padding-inline-start: 26px; margin: 0 0 20px; }
.article li { margin-bottom: 8px; }
.article strong { font-weight: 600; }
.lead { font-size: 20px; color: var(--muted) !important; }
.note { background: var(--soft); color: var(--soft-fg); border-radius: 16px; padding: 16px 20px; margin: 24px 0; font-size: 16.5px; line-height: 1.8; }
.note p { color: inherit; margin: 0; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px 22px; margin: 0 0 32px; }
.toc b { display: block; margin-bottom: 6px; }
.toc ol { margin: 0; }
.toc a { text-decoration: none; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin: 28px 0 32px; }
.shots figure { margin: 0; text-align: center; }
.shots img { border-radius: 28px; border: 6px solid #111816; box-shadow: var(--shadow); margin: 0 auto 10px; width: 100%; max-width: 260px; }
.shots figcaption { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 20px; margin-bottom: 12px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 10px 0 2px; color: var(--muted); }

.cta-box { background: var(--ink); color: var(--ink-fg); border-radius: 26px; padding: 36px 32px; margin: 48px 0 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.cta-box h2 { color: var(--ink-fg); font-size: 26px; margin: 0 0 6px; }
.cta-box p { color: var(--ink-muted); margin: 0; font-size: 16px; }
.cta-box .store-badge { background: var(--ink-fg); color: var(--ink); }

footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--accent); }

@media (max-width: 760px) {
  .nav-links { display: none; }
  body { font-size: 17px; }
  .article h2 { font-size: 24px; }
  .cta-box { padding: 28px 22px; }
}
@media (max-width: 480px) {
  .nav .store-badge { display: none; }
}
