@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700&display=swap');

:root {
  --container: 1100px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.08);
  --bg: #f7f4ec;
  --panel: rgba(255, 255, 255, 0.92);
  --text: #1f2937;
  --muted: #4b5563;
  --accent: #15803d;
  --border: rgba(0, 0, 0, 0.05);
  --section-gap: 3rem;
  --grid-gap: 1.75rem;
  --card-padding: 1.5rem;
  --bar-h: 40px;
  --header-gap: 8px;
  --header-h: 72px;
  --main-pt: 3rem;
}

* {
  box-sizing: border-box;
}

.blog {
  margin: 0;
  font-family: 'Vazirmatn', sans-serif;
  background: linear-gradient(135deg, #f7f4ec, #ede7d7);
  color: var(--text);
}

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

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

.page {
  padding-top: var(--main-pt);
  padding-bottom: 8rem;
}

.header-logo {
  height: 36px;
}

.blog-listing {
  --main-pt: calc(var(--bar-h) + var(--header-gap) + var(--header-h));
}

.page-stack {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.text-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  padding: var(--card-padding);
}

.card-compact {
  padding: 1rem;
}

.meta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
}

.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  background: #111;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  width: fit-content;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  background: var(--panel);
  border: 2px solid #0f5132;
  color: #0f5132;
  font-weight: 700;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--muted);
  text-align: center;
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: center;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--grid-gap);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  padding: 0;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: var(--card-padding);
}

.post-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.post-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.section-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
}

.intro-title,
.article-title {
  font-size: 2rem;
  font-weight: 800;
  color: #111827;
  margin: 0 0 1rem;
}

.article {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.article-subtitle {
  font-size: 0.95rem;
  color: #4b5563;
  margin: 0;
}

.article p {
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}

.article ul {
  padding-right: 1.25rem;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.article li + li {
  margin-top: 0.25rem;
}

.cta-block {
  text-align: center;
  padding-top: 1rem;
}

.related-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 1.5rem;
}

.related-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  margin: 0;
}

.media-box {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f2eee2;
}

.media-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-media {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card-hero {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  box-shadow: none;
}

.content-media {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  z-index: 50;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
  transition: transform 0.35s ease;
}

.header-bar {
  position: fixed;
  top: calc(var(--bar-h) + var(--header-gap));
  left: 0;
  width: 100%;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 0 0 24px 24px;
  box-shadow: var(--shadow-card);
  z-index: 40;
  transition: transform 0.35s ease;
}

.header-inner {
  width: 100%;
  max-width: var(--container);
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-card {
  text-align: center;
}

.intro-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 48ch;
  margin: 0 auto;
}

.related-links {
  text-align: center;
}

.hide {
  transform: translateY(-130%);
}

.show {
  transform: translateY(0);
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --section-gap: 2.25rem;
  }

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

  .intro-title,
  .article-title {
    font-size: 1.85rem;
  }

  .hero-media,
  .card-hero {
    aspect-ratio: 4 / 5;
  }
}
