:root {
    --primary: #4A90E2;
    --primary-dark: #357ABD;
    --secondary: #50C878;
    --dark: #2C3E50;
    --light: #ECF0F1;
    --white: #FFFFFF;
    --gray: #95A5A6;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--dark); line-height: 1.7; background: var(--white);
}
a { color: var(--primary); }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--gray); font-weight: 400; }
header.site {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--light);
    position: sticky; top: 0; background: var(--white); z-index: 10;
}
header.site .brand { font-weight: 700; font-size: 1.2rem; color: var(--primary); text-decoration: none; }
.btn {
    display: inline-block; background: var(--primary); color: var(--white);
    text-decoration: none; padding: 12px 22px; border-radius: var(--radius);
    font-weight: 600; border: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: var(--primary-dark); }
.btn.ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn.small { padding: 8px 14px; font-size: .9rem; }
.page-head { background: linear-gradient(180deg, #f4f9ff 0%, var(--white) 100%); padding: 48px 20px 32px; text-align: center; }
.page-head h1 { font-size: 2rem; margin-bottom: 12px; }
.page-head .lead { color: #5a6b7b; max-width: 620px; margin: 0 auto; }
main.wrap { padding-top: 36px; padding-bottom: 48px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.post-card {
    display: block; text-decoration: none; color: inherit;
    border: 1px solid var(--light); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.post-thumb { font-size: 2.2rem; margin-bottom: 10px; }
.post-card h2 { font-size: 1.2rem; color: var(--primary-dark); margin-bottom: 8px; }
.post-card p { color: #5a6b7b; font-size: .98rem; }
.post-card .read { display: inline-block; margin-top: 12px; color: var(--primary); font-weight: 600; }
/* Article layout */
article.post { padding: 36px 0 48px; }
article.post h1 { font-size: 2rem; margin-bottom: 8px; line-height: 1.25; }
article.post .meta { color: var(--gray); font-size: .9rem; margin-bottom: 28px; }
article.post h2 { font-size: 1.4rem; margin: 28px 0 10px; }
article.post p { margin-bottom: 16px; }
article.post ul { margin: 0 0 16px 22px; }
article.post li { margin-bottom: 8px; }
.callout {
    background: #f4f9ff; border-left: 4px solid var(--primary);
    border-radius: 8px; padding: 18px 20px; margin: 24px 0;
}
.cta-band { background: var(--primary); color: #fff; text-align: center; padding: 40px 20px; border-radius: var(--radius); margin: 32px 0; }
.cta-band .btn { background: #fff; color: var(--primary); margin-top: 14px; }
.backlink { display: inline-block; margin-bottom: 20px; color: var(--primary); text-decoration: none; }
footer.site-footer { background: var(--dark); color: #cfd8e0; padding: 28px 20px; text-align: center; font-size: .9rem; }
footer.site-footer a { color: #9ec7f5; }
/* Bilingual visibility */
[data-ar] { display: none; }
html[lang="ar"] [data-en] { display: none; }
html[lang="ar"] [data-ar] { display: inline; }
html[lang="ar"] [data-ar].block { display: block; }
html[dir="rtl"] article.post ul { margin: 0 22px 16px 0; }
html[dir="rtl"] .callout { border-left: none; border-right: 4px solid var(--primary); }
@media (max-width: 600px) { .page-head h1, article.post h1 { font-size: 1.6rem; } }
