:root {
    --bg: #f5f7f2;
    --surface: #ffffff;
    --surface-muted: #eef3e6;
    --text: #101510;
    --muted: #5c665d;
    --line: rgba(16, 21, 16, 0.12);
    --accent: #b1ec71;
    --accent-dark: #17230a;
    --shadow: 0 18px 44px rgba(16, 21, 16, 0.08);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 999px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(177, 236, 113, 0.28), transparent 28%),
        linear-gradient(180deg, #fcfdf9 0%, #f2f6ea 100%);
    color: var(--text);
}

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

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

.site-header {
    padding: 24px 0 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 14px;
    gap: 20px;
    padding: 16px 0 30px;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-wrap: wrap;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand span {
    color: var(--accent-dark);
    background: var(--accent);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    margin-left: 6px;
}

.menu {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.03em;
}

.menu a:hover {
    color: var(--text);
}

.lang-switch {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
    max-width: min(420px, calc(100vw - 32px));
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.lang-switch::-webkit-scrollbar {
    display: none;
}

.lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 42px;
    border: 1px solid #111;
    color: #111;
    background: transparent;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.4px;
    padding: 8px 11px;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.lang-switch a.active,
.lang-switch a:hover {
    background: #111;
    color: #fff;
}

.post-body img {
    display: block;
    width: 100%;
    height: auto;
    margin: 22px 0;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
}

.video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin: 22px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] .post-detail .post-body ul {
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .category-link span {
    text-align: left;
}

[dir="rtl"] .post-date,
[dir="rtl"] .section-heading {
    text-align: right;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 24px;
    align-items: stretch;
}

.hero-copy,
.hero-panel {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.hero-copy {
    padding: 44px;
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.hero-text {
    margin: 18px 0 0;
    max-width: 680px;
    color: var(--muted);
    font-size: 1.05rem;
}

.hero-panel {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.metric {
    background: var(--surface-muted);
    border-radius: var(--radius-md);
    padding: 18px;
}

.metric strong {
    display: block;
    font-size: 1.45rem;
    margin-bottom: 4px;
}

.metric span {
    color: var(--muted);
}

.page {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 28px;
    padding-bottom: 56px;
}

.sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    display: grid;
    gap: 18px;
}

.search-box,
.sidebar-card,
.post-card,
.post-detail,
.empty-state {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.search-box,
.sidebar-card,
.empty-state {
    padding: 22px;
}

.label,
.sidebar-card h2,
.section-heading h2 {
    display: block;
    margin: 0 0 12px;
    font-size: 1rem;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    margin-bottom: 10px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    font-size: 0.98rem;
    background: #fbfcf8;
}

.search-box button,
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 13px 18px;
    border: 0;
    border-radius: 14px;
    background: var(--accent);
    color: var(--accent-dark);
    font-weight: 800;
    cursor: pointer;
}

.button-dark {
    background: #101510;
    color: #fff;
}

.category-link {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: var(--muted);
}

.category-link.active,
.category-link:hover {
    background: var(--surface-muted);
    color: var(--text);
}

.category-link span {
    min-width: 28px;
    text-align: right;
    font-weight: 700;
}

.cta-card p:last-of-type {
    color: var(--muted);
    line-height: 1.7;
}

.content {
    min-width: 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
    margin-bottom: 18px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.post-card {
    padding: 24px;
}

.post-card h3,
.post-detail h2 {
    margin: 0;
    letter-spacing: -0.03em;
}

.post-card h3 {
    font-size: 1.45rem;
    line-height: 1.15;
    margin-bottom: 14px;
}

.post-card p,
.post-detail p,
.post-detail li {
    color: var(--muted);
    line-height: 1.8;
}

.post-meta,
.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.post-meta span,
.post-categories a {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--surface-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.read-more {
    display: inline-flex;
    margin-top: 12px;
    font-weight: 800;
}

.post-detail {
    padding: 34px;
}

.post-detail .post-body h2 {
    margin: 28px 0 10px;
    font-size: 1.55rem;
}

.post-detail .post-body ul {
    padding-left: 20px;
}

.related-posts {
    margin-top: 24px;
}

.post-date {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.empty-state {
    text-align: center;
    padding: 44px 26px;
}

.empty-state h2 {
    margin-top: 0;
}

@media (max-width: 980px) {
    .hero,
    .page,
    .post-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 720px) {
    .topbar,
    .section-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-copy,
    .hero-panel,
    .post-card,
    .post-detail {
        padding: 22px;
    }

    .hero h1 {
        font-size: 2.3rem;
    }
}
