:root {
    --em-bg: #f6f3ee;
    --em-surface: #ffffff;
    --em-surface-soft: #eee8dd;

    --em-text: #171411;
    --em-muted: #71685e;

    --em-primary: #111111;
    --em-primary-soft: #ece6dc;
    --em-accent: #b65f2a;

    --em-border: #ded6c9;

    --em-radius-sm: 12px;
    --em-radius-md: 18px;
    --em-radius-lg: 28px;

    --em-shadow: 0 28px 90px rgba(30, 24, 18, 0.12);
    --em-shadow-soft: 0 18px 56px rgba(30, 24, 18, 0.08);

    --em-container: 1180px;
    --em-font-main: Georgia, "Times New Roman", serif;
    --em-font-ui: Arial, Helvetica, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--em-bg);
    color: var(--em-text);
    font-family: var(--em-font-ui);
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.em-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.em-main {
    flex: 1;
}

.em-container {
    width: min(var(--em-container), calc(100% - 40px));
    margin: 0 auto;
}

/* Header */

.em-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 243, 238, 0.86);
    border-bottom: 1px solid var(--em-border);
    backdrop-filter: blur(18px);
}

.em-header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.em-logo,
.em-footer-logo {
    font-family: var(--em-font-main);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.em-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    color: var(--em-muted);
    font-size: 14px;
    font-weight: 700;
}

.em-nav a {
    transition: color 0.2s ease;
}

.em-nav a:hover {
    color: var(--em-accent);
}

/* Shared */

.em-kicker,
.em-card-label,
.em-article-meta {
    margin: 0 0 14px;
    color: var(--em-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.em-section-heading {
    max-width: 760px;
    margin-bottom: 34px;
}

.em-section-heading-row {
    max-width: none;
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-end;
}

.em-section-heading h2 {
    margin: 0;
    font-family: var(--em-font-main);
    font-size: clamp(34px, 5vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.em-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--em-primary);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    border: 1px solid var(--em-primary);
    transition: transform 0.2s ease, background 0.2s ease;
}

.em-button:hover {
    transform: translateY(-2px);
    background: var(--em-accent);
    border-color: var(--em-accent);
}

.em-button-secondary {
    background: transparent;
    color: var(--em-text);
    border-color: var(--em-border);
}

.em-button-secondary:hover {
    color: #ffffff;
}

.em-text-link,
.em-read-more {
    color: var(--em-accent);
    font-size: 14px;
    font-weight: 800;
}

.em-text-link:hover,
.em-read-more:hover {
    text-decoration: underline;
}

/* Home hero */

.em-hero {
    padding: 82px 0 64px;
    border-bottom: 1px solid var(--em-border);
}

.em-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) 420px;
    gap: 46px;
    align-items: stretch;
}

.em-hero-content h1 {
    max-width: 860px;
    margin: 0;
    font-family: var(--em-font-main);
    font-size: clamp(48px, 8vw, 110px);
    line-height: 0.92;
    letter-spacing: -0.075em;
}

.em-hero-description {
    max-width: 720px;
    margin: 28px 0 0;
    color: var(--em-muted);
    font-size: 20px;
}

.em-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 32px;
}

.em-hero-card {
    padding: 22px;
    border-radius: var(--em-radius-lg);
    background: var(--em-surface);
    border: 1px solid var(--em-border);
    box-shadow: var(--em-shadow);
}

.em-hero-card h2 {
    margin: 0 0 12px;
    font-family: var(--em-font-main);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.05em;
}

.em-hero-card p {
    color: var(--em-muted);
}

.em-hero-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin-bottom: 22px;
    border-radius: 22px;
    border: 1px solid var(--em-border);
    background: var(--em-surface-soft);
}

/* Feature cards */

.em-featured-section,
.em-articles-section,
.em-faq-section,
.em-page-section {
    padding: 74px 0;
}

.em-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.em-feature-card,
.em-content-block,
.em-faq-item,
.em-sidebar-card {
    background: var(--em-surface);
    border: 1px solid var(--em-border);
    border-radius: var(--em-radius-md);
    box-shadow: var(--em-shadow-soft);
}

.em-feature-card {
    padding: 28px;
}

.em-feature-number {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--em-accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.em-feature-card h3,
.em-content-block h2,
.em-faq-item h3 {
    margin: 0 0 14px;
    font-family: var(--em-font-main);
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.em-feature-card p,
.em-content-block p,
.em-faq-item p,
.em-sidebar-card p {
    margin: 0 0 16px;
    color: var(--em-muted);
}

.em-feature-card p:last-child,
.em-content-block p:last-child,
.em-faq-item p:last-child,
.em-sidebar-card p:last-child {
    margin-bottom: 0;
}

/* Articles */

.em-article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.em-article-card {
    overflow: hidden;
    border-radius: var(--em-radius-lg);
    background: var(--em-surface);
    border: 1px solid var(--em-border);
    box-shadow: var(--em-shadow-soft);
}

.em-article-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--em-surface-soft);
    border-bottom: 1px solid var(--em-border);
}

.em-article-card-body {
    padding: 24px;
}

.em-article-card h3 {
    margin: 0 0 14px;
    font-family: var(--em-font-main);
    font-size: 30px;
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.em-article-card p {
    margin: 0 0 18px;
    color: var(--em-muted);
}

/* Page */

.em-page-hero {
    padding: 76px 0 54px;
    border-bottom: 1px solid var(--em-border);
}

.em-page-hero h1 {
    max-width: 980px;
    margin: 0;
    font-family: var(--em-font-main);
    font-size: clamp(46px, 7vw, 96px);
    line-height: 0.94;
    letter-spacing: -0.07em;
}

.em-page-hero p:last-child {
    max-width: 780px;
    margin: 24px 0 0;
    color: var(--em-muted);
    font-size: 19px;
}

.em-page-layout,
.em-article-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.em-page-sidebar,
.em-article-sidebar {
    position: sticky;
    top: 108px;
}

.em-sidebar-card {
    padding: 24px;
}

.em-sidebar-card h2 {
    margin: 0 0 12px;
    font-family: var(--em-font-main);
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.em-sidebar-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.em-sidebar-links a {
    padding: 14px 16px;
    border-radius: 999px;
    background: var(--em-surface);
    border: 1px solid var(--em-border);
    color: var(--em-muted);
    font-size: 14px;
    font-weight: 800;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.em-sidebar-links a:hover {
    color: var(--em-accent);
    border-color: var(--em-accent);
}

.em-page-content {
    display: grid;
    gap: 22px;
}

.em-content-block {
    padding: 34px;
}

/* Article page */

.em-article-hero {
    padding: 76px 0 54px;
    border-bottom: 1px solid var(--em-border);
}

.em-article-hero-inner {
    max-width: 980px;
}

.em-article-hero h1 {
    margin: 0;
    font-family: var(--em-font-main);
    font-size: clamp(46px, 7vw, 92px);
    line-height: 0.94;
    letter-spacing: -0.07em;
}

.em-article-hero p:not(.em-kicker) {
    max-width: 760px;
    margin: 26px 0 0;
    color: var(--em-muted);
    font-size: 19px;
}

.em-article-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    color: var(--em-muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.em-article-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
    margin: 46px 0;
    border-radius: var(--em-radius-lg);
    border: 1px solid var(--em-border);
    background: var(--em-surface-soft);
    box-shadow: var(--em-shadow);
}

.em-article-content {
    max-width: 820px;
}

.em-article-section {
    padding-bottom: 40px;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--em-border);
}

.em-article-section h2 {
    margin: 0 0 18px;
    font-family: var(--em-font-main);
    font-size: 42px;
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.em-article-section p {
    margin: 0 0 18px;
    color: var(--em-muted);
    font-size: 18px;
}

/* FAQ */

.em-faq-section-inner {
    padding: 34px 0 0;
}

.em-faq-list {
    display: grid;
    gap: 16px;
}

.em-faq-item {
    padding: 24px;
}

/* Footer */

.em-footer {
    padding: 56px 0 26px;
    border-top: 1px solid var(--em-border);
    background: var(--em-surface);
}

.em-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.em-footer h3 {
    margin: 0 0 16px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.em-footer-text,
.em-footer-links a,
.em-footer-bottom {
    color: var(--em-muted);
}

.em-footer-links {
    display: grid;
    gap: 10px;
}

.em-footer-links a:hover {
    color: var(--em-accent);
}

.em-footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid var(--em-border);
    font-size: 13px;
}

/* Responsive */

@media (max-width: 980px) {
    .em-hero-grid,
    .em-page-layout,
    .em-article-layout {
        grid-template-columns: 1fr;
    }

    .em-page-sidebar,
    .em-article-sidebar {
        position: static;
    }

    .em-feature-grid,
    .em-article-grid,
    .em-footer-grid {
        grid-template-columns: 1fr;
    }

    .em-section-heading-row {
        display: block;
    }
}

@media (max-width: 680px) {
    .em-container {
        width: min(var(--em-container), calc(100% - 28px));
    }

    .em-header-inner {
        min-height: auto;
        padding: 18px 0;
        display: grid;
        gap: 16px;
    }

    .em-nav {
        flex-wrap: wrap;
        gap: 14px;
    }

    .em-hero,
    .em-featured-section,
    .em-articles-section,
    .em-faq-section,
    .em-page-section {
        padding: 48px 0;
    }

    .em-hero-content h1,
    .em-page-hero h1,
    .em-article-hero h1 {
        letter-spacing: -0.055em;
    }

    .em-article-cover {
        aspect-ratio: 16 / 10;
        margin: 30px 0;
        border-radius: 18px;
    }

    .em-content-block,
    .em-feature-card,
    .em-faq-item {
        padding: 24px;
    }
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .mg-layout,
html[dir="rtl"] .cp-page-layout,
html[dir="rtl"] .cp-article-layout,
html[dir="rtl"] .sd-hero-layout,
html[dir="rtl"] .sd-doc-layout,
html[dir="rtl"] .sd-article-layout {
    direction: rtl;
}

html[dir="rtl"] .mg-nav,
html[dir="rtl"] .cp-nav,
html[dir="rtl"] .sd-nav {
    direction: rtl;
}

html[dir="rtl"] .mg-sidebar-inner,
html[dir="rtl"] .cp-sidebar-inner,
html[dir="rtl"] .cp-article-sidebar {
    border-right: 0;
    padding-right: 0;
    border-left: 1px solid var(--mg-border, var(--cp-border, rgba(0, 0, 0, 0.15)));
    padding-left: 22px;
}

html[dir="rtl"] .mg-question summary::after,
html[dir="rtl"] .cp-faq-item summary::after,
html[dir="rtl"] .sd-faq-item summary::after {
    float: left;
}

html[dir="rtl"] ol,
html[dir="rtl"] ul {
    padding-right: 1.25rem;
    padding-left: 0;
}

html[lang="ar"] body {
    font-family: Tahoma, Arial, Helvetica, sans-serif;
}