:root {
  --brand-red: #e51c23;
  --brand-red-soft: rgba(229, 28, 35, 0.12);
  --bg: #f6f6f7;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: #e4e4e7;
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

body.rtl {
  direction: rtl;
}

a {
  color: var(--brand-red);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: inherit;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.footer-links {
  margin: 8px 0 0;
}

.footer-links a {
  color: var(--text-muted);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.lang-switch {
  position: relative;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.lang-button:hover,
.lang-button:focus-visible {
  border-color: var(--brand-red);
  outline: none;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

body.rtl .lang-menu {
  right: auto;
  left: 0;
}

.lang-menu.hidden {
  display: none;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: start;
  font: inherit;
  cursor: pointer;
}

.lang-option:hover,
.lang-option.active {
  background: var(--brand-red-soft);
}

main {
  flex: 1;
  width: min(100%, calc(var(--max-width) + 40px));
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.2;
}

.meta {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.lead {
  margin: 0 0 24px;
  font-size: 1.05rem;
}

.section + .section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  color: var(--brand-red);
}

.section p,
.section ul {
  margin: 0 0 12px;
}

.section ul {
  padding-inline-start: 1.25rem;
}

.section li + li {
  margin-top: 6px;
}

footer {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 600px) {
  .card {
    padding: 22px 18px;
  }

  .topbar {
    padding: 14px 16px;
  }
}
