:root {
    --brand-forest: #244D35;
    --brand-green: #91B85A;
    --brand-lemon: #F4DC52;
    --brand-cream: #FAF8EF;
    --brand-dark: #19251E;

    --font-body: Arial, sans-serif;
    --font-heading: Georgia, serif;

    --container-width: 1440px;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    --transition: 180ms ease;
}

:root,
[data-theme="light"] {
    color-scheme: light;

    --background: #FAF8EF;
    --surface: #FFFFFF;
    --surface-alt: #F0F2E8;

    --text: #19251E;
    --text-muted: #657369;

    --primary: #244D35;
    --accent: #F4DC52;

    --border: #DDE3D7;
    --shadow: 0 8px 30px rgba(0,0,0,.06);
}

[data-theme="dark"] {
    color-scheme: dark;

    --background: #121C16;
    --surface: #19251E;
    --surface-alt: #24352A;

    --text: #F3F5EE;
    --text-muted: #A8B5AA;

    --primary: #91B85A;
    --accent: #F4DC52;

    --border: #34483B;
    --shadow: 0 8px 30px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: 24px;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; }

button { font: inherit; cursor: pointer; }

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

button:focus-visible, a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 4px;
}

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

[dir="rtl"] body {
    font-family: Tahoma, Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.2;
    margin: 0;
}

h1 { font-size: clamp(36px, 5vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: 24px; }

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1.6;
}

.eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 16px;
}

[dir="rtl"] .eyebrow { letter-spacing: 0; }

p { color: var(--text-muted); }

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    direction: ltr;
}

.brand strong {
    display: block;
    font: bold 34px Georgia, serif;
}

.brand strong span { color: var(--primary); }

.brand small {
    display: block;
    font-size: 10px;
    letter-spacing: 4px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.header-actions button,
.category-filters button {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 18px;
}

.header-actions button:hover,
.category-filters button:hover {
    border-color: var(--primary);
}

#menu-toggle { display: none; }

.site-navigation {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    padding-block: 16px;
}

.nav-inner a {
    font-size: 14px;
    font-weight: 600;
}

.nav-inner a:hover { color: var(--primary); }

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
    padding-block: 72px;
}

.hero-content p {
    font-size: 18px;
    max-width: 490px;
    margin-block: 24px 32px;
}

.hero-image {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.hero-image img {
    width: 100%;
    height: auto;
}

.articles-section { padding-block: 32px 80px; }

.section-heading {
    text-align: center;
    margin-bottom: 32px;
}

.about-section { padding-bottom: 80px; }

.about-panel {
    padding: 64px 32px;
    background: var(--surface-alt);
    border-radius: 24px;
    text-align: center;
}

.about-panel img { margin: 0 auto 24px; }

.about-panel p {
    max-width: 650px;
    margin-inline: auto;
}

.site-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-block: 40px;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-inner a {
    display: inline-block;
    margin-inline-end: 14px;
    font-size: 14px;
}

.primary-button {
    display: inline-flex;
    padding: 14px 28px;
    border-radius: 30px;
    background: var(--brand-forest);
    color: #FFFFFF;
    font-weight: 600;
    transition: var(--transition);
}

.primary-button:hover { opacity: .85; }

.category-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
}

.category-filters .selected {
    background: var(--brand-forest);
    color: white;
    border-color: var(--brand-forest);
}

dialog {
    width: min(720px, calc(100% - 32px));
    max-height: 85vh;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    color: var(--text);
    padding: 32px;
}

dialog::backdrop {
    background: rgba(0,0,0,.65);
}

#close-article {
    display: block;
    margin-inline-start: auto;
    margin-bottom: 16px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 30px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.article-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform var(--transition);
}

.article-card:hover { transform: translateY(-4px); }

.article-cover {
    display: grid;
    place-items: center;
    min-height: 190px;
    font-size: 76px;
    color: #244D35;
}

.article-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.article-category {
    color: var(--primary);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.article-body button {
    align-self: flex-start;
    margin-top: auto;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-weight: bold;
    padding: 10px 0;
}

@media (max-width: 1023px) {
    .hero { gap: 28px; }
    .article-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .nav-inner { gap: 18px; }
}

@media (max-width: 767px) {
    .container { width: calc(100% - 32px); }
    .header-inner { min-height: 72px; }
    .brand strong { font-size: 27px; }
    .brand img { width: 38px; height: 38px; }
    .brand small { font-size: 8px; }
    .header-actions { gap: 5px; }
    .header-actions button { padding: 6px 12px; }

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

    .site-navigation { display: none; }
    .site-navigation.is-open { display: block; }

    .nav-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero {
        grid-template-columns: 1fr;
        padding-block: 40px;
    }

    .hero-content p { font-size: 16px; }
    .article-grid { grid-template-columns: 1fr; }
    .about-panel { padding: 36px 20px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 360px) {
    .brand { gap: 5px; }
    .header-actions button { padding: 5px 9px; }
    .brand img { width: 30px; height: 30px; }
}
