@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@500;600;700&family=Vazirmatn:wght@400;500;600;700;800&display=swap");

:root {
  --ink-950: #05070a;
  --ink-900: #0b0f13;
  --text: #17202f;
  --muted: #667486;
  --line: #dce6ea;
  --teal: #0f7c91;
  --teal-light: #e8f6f7;
  --coral: #ff6048;
  --paper: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #f7f9fa;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  line-height: 2;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(43, 45, 45, 0.97);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
}

.nav {
  width: min(1160px, calc(100% - 40px));
  min-height: 102px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
}

.brand-logo {
  width: 98px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.34));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 27px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  font-weight: 700;
}

.nav-links a {
  padding: 8px 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: #73d8de;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #05070a;
  background: #ffffff;
}

.article-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 96px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumbs a:hover {
  color: var(--teal);
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  direction: rtl;
}

.article-main {
  min-width: 0;
  grid-column: 2;
  direction: rtl;
}

.latest-sidebar {
  position: sticky;
  top: 128px;
  grid-column: 1;
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(16, 42, 67, 0.08);
  direction: rtl;
}

.latest-sidebar h2 {
  margin: 0 0 22px;
  font-size: 1.25rem;
  line-height: 1.5;
}

.latest-sidebar nav {
  display: grid;
  gap: 14px;
}

.latest-sidebar a {
  position: relative;
  display: block;
  padding-right: 18px;
  color: #344254;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.85;
  transition: color 180ms ease, transform 180ms ease;
}

.latest-sidebar a::before {
  content: "‹";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--teal);
  font-weight: 900;
}

.latest-sidebar a:hover,
.latest-sidebar a[aria-current="page"] {
  color: var(--teal);
  transform: translateX(-2px);
}

.article-header {
  max-width: 820px;
  margin: 0 auto 34px;
  text-align: center;
}

.article-category {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 800;
}

.article-header h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 1.4;
}

.article-intro {
  max-width: 720px;
  margin: 0 auto 16px;
  color: #536174;
  font-size: clamp(1rem, 2vw, 1.15rem);
}

.article-meta {
  color: #7a8796;
  font-size: 0.86rem;
}

.article-cover {
  width: min(760px, 100%);
  margin: 0 auto 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #edf2f4;
  box-shadow: 0 24px 64px rgba(16, 42, 67, 0.12);
}

.article-cover img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-cover figcaption {
  padding: 10px 18px;
  color: var(--muted);
  background: #ffffff;
  font-size: 0.82rem;
}

.article-content {
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 22px 58px rgba(16, 42, 67, 0.07);
}

.article-content h2 {
  margin: 42px 0 14px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.55;
}

.article-content h2:first-child {
  margin-top: 0;
}

.article-content h3 {
  margin: 30px 0 10px;
  font-size: 1.2rem;
}

.article-content p {
  margin: 0 0 18px;
  color: #344254;
  text-align: justify;
  text-align-last: right;
}

.article-content ul,
.article-content ol {
  margin: 12px 0 24px;
  padding-right: 24px;
  color: #344254;
}

.article-content li {
  margin-bottom: 8px;
}

.article-note {
  margin: 28px 0;
  padding: 20px 22px;
  border-right: 4px solid var(--teal);
  border-radius: 10px;
  background: var(--teal-light);
  color: #244452;
}

.article-note strong {
  display: block;
  margin-bottom: 4px;
  color: #113647;
}

.article-cta {
  margin-top: 36px;
  padding: 24px;
  border-radius: 16px;
  background: var(--ink-950);
  color: #ffffff;
}

.article-cta p {
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.74);
}

.article-cta .btn {
  background: #ffffff;
  color: #05070a;
}

.related {
  margin-top: 42px;
}

.related h2 {
  margin: 0 0 18px;
  font-size: 1.45rem;
}

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

.related-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  font-weight: 700;
  line-height: 1.7;
  transition: transform 180ms ease, border-color 180ms ease;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 124, 145, 0.45);
}

.site-footer {
  padding: 44px 0 34px;
  background: var(--ink-950);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.footer-inner,
.footer-bottom {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
  gap: 30px;
}

.footer-address,
.footer-sitemap {
  display: grid;
  gap: 6px;
  font-style: normal;
}

.footer-address strong,
.footer-sitemap strong {
  color: #ffffff;
}

.footer-address a {
  color: #8fdce0;
}

.footer-sitemap nav {
  display: grid;
  gap: 5px;
}

.footer-sitemap a:hover {
  color: #73d8de;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  direction: ltr;
}

@media (max-width: 850px) {
  .nav {
    min-height: auto;
    padding: 16px 0;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 17px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .article-main,
  .latest-sidebar {
    grid-column: auto;
  }

  .latest-sidebar {
    position: static;
    order: -1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .nav,
  .article-shell,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 28px, 1240px);
  }

  .brand-logo {
    width: 86px;
  }

  .article-shell {
    padding-top: 32px;
  }

  .article-header {
    text-align: right;
  }

  .article-intro {
    font-size: 0.98rem;
  }

  .article-cover,
  .article-content {
    border-radius: 15px;
  }

  .article-content {
    padding: 23px 20px;
  }

  .article-content p {
    text-align: right;
  }
}
