:root {
    --bg: #f5f1e8;
    --surface: #fffdf9;
    --surface-soft: #f1e8d8;
    --surface-deep: #e8dcc8;

    --text: #2d261f;
    --text-soft: #6a5f52;
    --text-faint: #8b7f70;

    --line: #ddd0bb;

    --primary: #8a5a3b;
    --primary-dark: #6f472d;
    --accent: #59706a;
    --accent-soft: rgba(89, 112, 106, 0.12);

    --shadow-sm: 0 6px 18px rgba(69, 47, 29, 0.06);
    --shadow-md: 0 12px 34px rgba(69, 47, 29, 0.10);

    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 28px;

    --container: 1180px;

    --space-1: 8px;
    --space-2: 12px;
    --space-3: 16px;
    --space-4: 20px;
    --space-5: 28px;
    --space-6: 40px;
    --space-7: 56px;
    --space-8: 80px;

    --transition: 0.25s ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html,
body,
button,
input,
textarea,
select {
    font-family: "Cairo", sans-serif;
}

body.site-body {
    margin: 0;
    font-size: 16px;
    line-height: 1.95;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(138, 90, 59, 0.06), transparent 24%),
        radial-gradient(circle at bottom left, rgba(89, 112, 106, 0.05), transparent 22%),
        var(--bg);
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

h1, h2, h3, h4, h5, h6,
p, a, li, blockquote, table, th, td {
    font-family: "Cairo", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-3);
    color: var(--text);
    line-height: 1.4;
    font-weight: 800;
}

p {
    margin: 0 0 var(--space-4);
    color: var(--text-soft);
}

ul, ol {
    margin: 0 0 var(--space-4);
    padding-right: 22px;
    color: var(--text-soft);
}

li {
    margin-bottom: 8px;
}

blockquote {
    margin: var(--space-5) 0;
    padding: 18px 20px;
    background: var(--surface-soft);
    border-right: 4px solid var(--primary);
    border-radius: var(--radius-md);
    color: var(--text);
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: var(--space-6) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-5);
    background: var(--surface);
    overflow: hidden;
    border-radius: var(--radius-md);
}

table th,
table td {
    padding: 12px 14px;
    border: 1px solid var(--line);
    text-align: right;
}

table th {
    background: var(--surface-soft);
    color: var(--text);
}

input,
textarea,
select,
button {
    font: inherit;
}

.container {
    width: min(var(--container), calc(100% - 32px));
    margin-inline: auto;
}

/* =========================
   Header
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(245, 241, 232, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(221, 208, 187, 0.75);
}

.site-header::after {
    content: "";
    display: block;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 90, 59, 0.22), transparent);
}

.header-inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 800;
    font-size: 1.08rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.site-logo:hover {
    color: var(--text);
}

.site-logo img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    padding: 4px;
    box-shadow: 0 4px 14px rgba(69, 47, 29, 0.06);
}

.site-logo span {
    color: var(--text);
}

/* Navigation */
.site-nav {
    margin-right: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    max-width: 760px;
    font-size: 0;
}

/* إخفاء أي فواصل يطبعها النظام */
.site-nav .separator,
.site-nav span.separator {
    display: none !important;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    position: relative;
    color: var(--text-soft);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 14px;
    text-decoration: none;
    transition: var(--transition);
}

.site-nav a:hover,
.site-nav a.current,
.site-nav a.active {
    color: var(--primary);
}

/* فاصل أنيق بين الروابط */
.site-nav a + a::before {
    content: "|";
    color: rgba(106, 95, 82, 0.35);
    position: absolute;
    right: -3px;
    font-weight: 400;
}

/* إلغاء أي خط سفلي قديم */
.site-nav a::after {
    display: none !important;
}

/* زر الجوال */
.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--text);
    margin: 5px 0;
    border-radius: 999px;
}

/* =========================
   Hero
========================= */

.hero {
    position: relative;
    padding: var(--space-8) 0 var(--space-7);
    border-bottom: 1px solid var(--line);
}

.hero::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.hero-inner {
    display: flex;
    justify-content: center;
}

.hero-text {
    max-width: 760px;
    text-align: center;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: var(--space-3);
    padding: 6px 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
}

.hero-title {
    font-size: clamp(2.3rem, 4vw, 4.3rem);
    margin-bottom: var(--space-4);
    letter-spacing: -0.5px;
}

.hero-desc {
    max-width: 720px;
    margin: 0 auto var(--space-5);
    font-size: 1.08rem;
    color: var(--text-soft);
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* =========================
   Buttons
========================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 145px;
    padding: 13px 22px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.btn-secondary:hover {
    background: var(--surface);
    color: var(--text);
}

/* =========================
   Main
========================= */

.site-main {
    padding: var(--space-7) 0;
}

.inner-page-head {
    text-align: center;
    margin-bottom: var(--space-6);
}

.inner-page-title {
    font-size: clamp(1.8rem, 3vw, 2.7rem);
    margin-bottom: 0;
}

/* =========================
   Layout
========================= */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: var(--space-5);
    align-items: start;
}

.content-column {
    min-width: 0;
}

/* =========================
   Article card
========================= */

.article-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    padding: clamp(22px, 3vw, 40px);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.article-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 24px;
    width: 62px;
    height: 4px;
    background: var(--primary);
    border-radius: 999px;
}

.article-card h1 {
    font-size: 2rem;
}

.article-card h2 {
    margin-top: var(--space-6);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--line);
    font-size: 1.65rem;
}

.article-card h3 {
    margin-top: var(--space-5);
    font-size: 1.26rem;
    color: var(--primary-dark);
}

.article-card img {
    margin: var(--space-5) auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.article-card a {
    word-break: break-word;
}

/* =========================
   Sidebar
========================= */

.sidebar-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.sidebar-card {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.sidebar-card > * {
    box-shadow: var(--shadow-sm);
}

/* Featured story */
.sidebar-feature {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
}

.sidebar-feature::before {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    width: 52px;
    height: 4px;
    background: var(--accent);
    border-radius: 999px;
}

.sidebar-label {
    display: inline-block;
    margin-bottom: 14px;
    padding: 6px 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1;
}

.sidebar-feature-title {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 1.16rem;
    line-height: 1.7;
    font-weight: 800;
}

.sidebar-feature-text {
    margin: 0 0 18px;
    color: var(--text-soft);
    line-height: 1.9;
    font-size: 0.97rem;
}

.sidebar-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-weight: 700;
}

.sidebar-feature-link::after {
    content: "←";
    font-size: 0.95rem;
    transition: transform var(--transition);
}

.sidebar-feature-link:hover::after {
    transform: translateX(-3px);
}

/* Reflection card */
.sidebar-reflection {
    background: linear-gradient(180deg, #fffdf9 0%, #f6eee1 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
}

.sidebar-reflection::before {
    content: "";
    position: absolute;
    inset-inline: 22px;
    top: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(138, 90, 59, 0.28), transparent);
}

.sidebar-reflection-kicker {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
    background: #fffaf2;
    padding-left: 8px;
}

.sidebar-reflection-title {
    margin: 0 0 14px;
    color: var(--text);
    font-size: 1.08rem;
    line-height: 1.85;
    font-weight: 800;
}

.sidebar-reflection-text {
    margin: 0 0 18px;
    color: var(--text-soft);
    font-size: 0.96rem;
    line-height: 1.95;
}

.sidebar-reflection-note {
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--primary-dark);
    font-size: 0.94rem;
    line-height: 1.95;
    font-weight: 700;
}

/* =========================
   About page
========================= */

.about-page {
    max-width: 860px;
    margin: 0 auto;
}

.about-page h1 {
    margin-bottom: 22px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
}

.about-page p {
    font-size: 1.04rem;
    line-height: 2.05;
    color: var(--text-soft);
}

.about-page strong {
    color: var(--text);
    font-weight: 800;
}

/* =========================
   Footer
========================= */

.site-footer {
    margin-top: var(--space-7);
    padding: var(--space-7) 0 var(--space-5);
    background: #2d261f;
    color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.footer-about h3 {
    color: #fff;
}

.footer-about p {
    color: rgba(255, 255, 255, 0.76);
    max-width: 700px;
    margin-bottom: 0;
}

.footer-bottom {
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.60);
}

/* =========================
   Responsive
========================= */

@media (max-width: 980px) {
    .layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        min-height: 76px;
    }

    .menu-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        top: 76px;
        right: 12px;
        left: 12px;
        margin-right: 0;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 18px;
        box-shadow: var(--shadow-md);
        padding: 10px 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-width: none;
        font-size: initial;
        z-index: 1001;
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav a {
        display: block;
        padding: 13px 0;
        border-bottom: 1px solid rgba(221, 208, 187, 0.55);
        font-size: 0.96rem;
    }

    .site-nav a:last-child {
        border-bottom: 0;
    }

    .site-nav a + a::before {
        display: none;
    }

    .hero {
        padding: var(--space-7) 0 var(--space-6);
    }

    .hero-desc {
        font-size: 1rem;
    }

    .site-main {
        padding: var(--space-6) 0;
    }
}

@media (max-width: 480px) {
    body.site-body {
        font-size: 15px;
    }

    .container {
        width: min(var(--container), calc(100% - 20px));
    }

    .site-logo img {
        width: 46px;
        height: 46px;
    }

    .site-logo span {
        font-size: 0.95rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .article-card {
        padding: 18px;
        border-radius: 18px;
    }

    .sidebar-feature,
    .sidebar-reflection {
        padding: 18px;
        border-radius: 18px;
    }

    .sidebar-feature-title,
    .sidebar-reflection-title {
        font-size: 1.02rem;
    }

    .sidebar-feature-text,
    .sidebar-reflection-text,
    .sidebar-reflection-note {
        font-size: 0.93rem;
    }
}