/*
  Blog Index — optimized, page-scoped stylesheet
  Path: fa/blog/assets/css/blog-index-optimized.css
*/

:root {
  --brand: #263b8f;
  --brand-strong: #17275f;
  --brand-soft: #eef3ff;
  --accent: #f59e0b;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #dfe6f1;
  --surface: #ffffff;
  --surface-soft: #f6f8fc;
  --page: #f2f5fa;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  --shadow-soft: 0 6px 18px rgba(15, 23, 42, 0.05);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.blog-index-page {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(37, 99, 235, 0.08), transparent 24rem),
    linear-gradient(180deg, #f8faff 0%, var(--page) 100%);
  font-size: 15px;
  line-height: 1.85;
}

body.blog-index-page h1,
body.blog-index-page h2,
body.blog-index-page h3,
body.blog-index-page p {
  margin-top: 0;
}

body.blog-index-page h1 {
  font-size: 20px;
  line-height: 1.7;
}

body.blog-index-page h2 {
  font-size: 18px;
  line-height: 1.75;
}

body.blog-index-page h3 {
  font-size: 16px;
  line-height: 1.8;
}

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

body.blog-index-page a:focus-visible,
body.blog-index-page button:focus-visible,
body.blog-index-page input:focus-visible,
body.blog-index-page summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

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

body.blog-index-page button,
body.blog-index-page input {
  font: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Shared header compatibility for assets/js/loader.js */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  color: #e5e7eb;
  background: rgba(2, 6, 23, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

.site-header .topbar,
.site-header .nav-inner {
  width: min(1140px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header .topbar,
.site-header .topbar-left,
.site-header .topbar-right,
.site-header .nav-inner,
.site-header .nav-links {
  display: flex;
  align-items: center;
}

.site-header .topbar {
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  font-size: 12px;
}

.site-header .topbar-left,
.site-header .topbar-right {
  gap: 10px;
}

.site-header .topbar-item,
.site-header .nav-links a,
.site-header .nav-drop-toggle {
  color: #e5e7eb;
}

.site-header .navbar {
  padding-block: 8px;
}

.site-header .nav-inner {
  justify-content: space-between;
  gap: 18px;
}

.site-header .brand img {
  width: auto;
  height: 40px;
}

.site-header .nav-links {
  gap: 18px;
  font-size: 13px;
}

.site-header .nav-dropdown {
  position: relative;
}

.site-header .nav-drop-toggle {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.site-header .nav-drop-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(6px);
  background: #020617;
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.35);
  transition: 0.18s ease;
}

.site-header .nav-dropdown:focus-within .nav-drop-menu,
.site-header .nav-dropdown:hover .nav-drop-menu,
.site-header .nav-drop-menu.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}

.site-header .nav-drop-menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
}

.site-header .nav-drop-menu a:hover {
  background: rgba(148, 163, 184, 0.14);
}

.site-header .nav-toggle {
  display: none;
}


/* Hero */
.blog-hero {
  position: relative;
  overflow: hidden;
  padding: 46px 0 28px;
  background:
    radial-gradient(circle at 10% 12%, rgba(56, 189, 248, 0.18), transparent 17rem),
    radial-gradient(circle at 100% 0%, rgba(38, 59, 143, 0.22), transparent 18rem),
    linear-gradient(135deg, #edf3ff 0%, #e3ebff 46%, #f4f7ff 100%);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.blog-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 35%),
    radial-gradient(circle at 82% 24%, rgba(245, 158, 11, 0.12), transparent 10rem);
  pointer-events: none;
}

.blog-hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(310px, 0.84fr);
  gap: 22px;
  align-items: stretch;
}

.blog-hero__copy,
.blog-hero__panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.blog-hero__copy {
  display: flex;
  flex-direction: column;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
}

.eyebrow,
.section-kicker,
.panel-kicker,
.article-type {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
}

.eyebrow {
  margin-bottom: 10px;
  padding: 5px 11px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
}

.blog-hero__copy h1 {
  margin-bottom: 10px;
  color: var(--brand);
}

.blog-hero__copy > p {
  max-width: 64ch;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 14px;
}

.hero-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.hero-focus-card {
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 12px 12px 11px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f7faff);
  box-shadow: var(--shadow-soft);
}

.hero-focus-card strong {
  color: var(--brand);
  font-size: 13px;
}

.hero-focus-card span {
  color: #475569;
  font-size: 11px;
  line-height: 1.9;
}

.audience-pills,
.hero-actions,
.filter-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audience-pills span {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #475569;
  background: #fff;
  font-size: 12px;
}

.hero-actions {
  margin-top: 16px;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--brand), #3652bd);
  box-shadow: 0 10px 22px rgba(38, 59, 143, 0.18);
}

.button--secondary {
  color: var(--brand) !important;
  border-color: rgba(38, 59, 143, 0.18);
  background: #fff;
}

.button--accent {
  color: #111827 !important;
  background: linear-gradient(135deg, #f8b84b, var(--accent));
}

.blog-hero__panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0%, rgba(56, 189, 248, 0.18), transparent 16rem),
    linear-gradient(145deg, #0c1735, #1c377f);
}

.panel-kicker {
  margin-bottom: 6px;
  padding: 4px 9px;
  color: #dbeafe;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
}

.hero-visual-card {
  position: relative;
  overflow: hidden;
  min-height: 224px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: #152a60;
}

.hero-visual-card__media,
.hero-visual-card__media img {
  width: 100%;
  height: 100%;
}

.hero-visual-card__media img {
  object-fit: cover;
}

.hero-visual-card__overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 16px 16px;
  background: linear-gradient(180deg, rgba(12, 23, 53, 0.06), rgba(12, 23, 53, 0.88) 42%, rgba(12, 23, 53, 0.96));
}

.hero-visual-card__overlay h2 {
  margin-bottom: 6px;
  color: #fff;
}

.hero-visual-card__overlay p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.hero-metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero-metric {
  display: grid;
  gap: 2px;
  padding: 10px 10px 9px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
}

.hero-metric strong {
  color: #fff;
  font-size: 12px;
}

.hero-metric span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  line-height: 1.7;
}

.quick-links {
  display: grid;
  gap: 8px;
}

.quick-links a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.07);
  transition: 0.18s ease;
}

.quick-links a:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(-2px);
}

.quick-links strong {
  color: #fff;
  font-size: 13px;
}

.quick-links span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
}

/* Breadcrumb */
.breadcrumb-section {
  padding-block: 10px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb a {
  color: var(--brand) !important;
  font-weight: 700;
}

/* Main */
.main-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(260px, 0.9fr);
  gap: 22px;
  padding-block: 18px 34px;
  align-items: start;
}

.content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.featured-section,
.decision-paths,
.article-library,
.faq-section {
  content-visibility: auto;
  contain-intrinsic-size: 720px;
}

.section-heading {
  margin-bottom: 10px;
}

.section-heading--split {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.section-kicker {
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 11px;
}

.section-kicker--light {
  color: #bfdbfe;
}

.section-heading h2 {
  margin-bottom: 0;
  color: var(--brand);
}

.result-count {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Featured */
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.featured-card__media {
  min-height: 100%;
  background: #dfe7f5;
}

.featured-card__media img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
}

.featured-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
}

.article-type {
  margin-bottom: 7px;
  padding: 4px 9px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 11px;
}

.featured-card__body h3,
.article-card__body h3 {
  margin-bottom: 7px;
}

.featured-card__body h3 a,
.article-card__body h3 a {
  color: var(--ink);
}

.featured-card__body h3 a:hover,
.article-card__body h3 a:hover {
  color: var(--brand);
}

.featured-card__body p,
.article-card__body p {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 13px;
}

.check-list {
  display: grid;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  color: #334155;
  font-size: 12px;
}

.check-list li {
  position: relative;
  padding-inline-start: 16px;
}

.check-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.72em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.text-link {
  display: inline-flex;
  width: max-content;
  margin-top: auto;
  color: var(--brand) !important;
  font-size: 12px;
  font-weight: 900;
}

.text-link::after {
  content: "←";
  margin-inline-start: 6px;
}

/* Decision paths */
.decision-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.decision-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.decision-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #fff, #f8faff);
  box-shadow: var(--shadow-soft);
}

.decision-grid h3 {
  margin-bottom: 5px;
  color: var(--brand);
}

.decision-grid p {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
}

.decision-grid a {
  color: var(--brand) !important;
  font-size: 12px;
  font-weight: 800;
}

/* Search and filters */
.library-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.search-box input {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  color: var(--ink);
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
}

.search-box input::placeholder {
  color: #94a3b8;
}

.filter-row {
  align-items: center;
}

.filter-button {
  min-height: 36px;
  padding: 7px 11px;
  color: #475569;
  border: 1px solid #d7dfec;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.filter-button.is-active,
.filter-button:hover {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

/* Article cards */
.article-card {
  display: grid;
  grid-template-rows: 190px 1fr;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.article-card[hidden] {
  display: none;
}

.article-card__media {
  overflow: hidden;
  background: #e6ebf3;
}

.article-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card__media img {
  transform: scale(1.025);
}

.article-card__body {
  display: flex;
  flex-direction: column;
  padding: 15px;
}

.empty-state {
  margin: 12px 0 0;
  padding: 16px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  font-size: 13px;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 8px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.faq-list summary {
  padding: 13px 15px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.faq-list p {
  margin: 0;
  padding: 0 15px 14px;
  color: var(--text);
  font-size: 12px;
}

/* Sidebar */
.sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 86px;
}

.widget {
  padding: 15px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.widget h2 {
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 15px !important;
}

.sidebar-links {
  display: grid;
  gap: 2px;
}

.sidebar-links a {
  padding: 7px 0;
  color: #334155 !important;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.24);
  font-size: 12px;
}

.sidebar-links a:last-child {
  border-bottom: 0;
}

.sidebar-links a:hover,
.ranked-links a:hover {
  color: var(--brand) !important;
}

.ranked-links {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-inline-start: 20px;
  color: var(--accent);
}

.ranked-links a {
  color: #334155 !important;
  font-size: 12px;
}

.widget--cta {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.18), transparent 12rem),
    linear-gradient(145deg, #0c1735, #1e3a86);
}

.widget--cta > span {
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 800;
}

.widget--cta h2 {
  margin-top: 5px;
  color: #fff;
}

.widget--cta p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

/* Industry strip */
.industry-strip {
  padding: 0 0 34px;
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

.industry-strip__shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 20px;
  padding: 22px;
  color: #fff;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0 100%, rgba(245, 158, 11, 0.16), transparent 18rem),
    linear-gradient(135deg, #0d1734, #2048a6);
  box-shadow: var(--shadow);
}

.industry-strip h2 {
  margin-bottom: 5px;
  color: #fff;
}

.industry-strip p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
}

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

.industry-strip__links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 9px 11px;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 700;
}

.industry-strip__links a:hover {
  background: rgba(255, 255, 255, 0.13);
}

/* Footer */
.site-footer {
  padding-block: 22px;
  color: #cbd5e1;
  background: #020617;
  border-top: 1px solid #1f2937;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 18px;
}

.footer-inner strong {
  color: #fff;
  font-size: 14px;
}

.footer-inner p {
  max-width: 62ch;
  margin: 3px 0 0;
  color: #94a3b8;
  font-size: 11px;
}

.footer-links a {
  color: #cbd5e1 !important;
  font-size: 11px;
}

.copyright {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 980px) {
  .main-layout,
  .industry-strip__shell {
    grid-template-columns: 1fr;
  }

  .blog-hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  }

  .hero-focus-grid,
  .decision-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

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

  .site-header .nav-toggle {
    display: inline-flex;
  }

  .site-header .nav-links {
    display: none;
  }

  .site-header .nav-links.open {
    display: flex;
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px;
    background: #020617;
  }
}

@media (max-width: 760px) {
  body.blog-index-page {
    font-size: 14px;
  }

  .container {
    width: min(100% - 22px, 1140px);
  }

  .blog-hero {
    padding-top: 28px;
  }

  .blog-hero__grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(220px, 0.9fr);
    gap: 14px;
  }

  .blog-hero__copy,
  .blog-hero__panel {
    padding: 18px;
  }

  .hero-focus-grid {
    grid-template-columns: 1fr;
  }

  .featured-card,
  .article-grid,
  .library-tools,
  .industry-strip__links {
    grid-template-columns: 1fr;
  }

  .featured-card__media img {
    min-height: 220px;
  }

  .section-heading--split {
    align-items: start;
    flex-direction: column;
  }

  .filter-row {
    width: 100%;
  }

  .filter-button {
    flex: 1 1 auto;
  }

  .article-card {
    grid-template-rows: 210px 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}


@media (max-width: 620px) {
  .blog-hero__grid {
    grid-template-columns: 1fr;
  }

  .blog-hero__copy,
  .blog-hero__panel {
    padding: 16px;
  }

  .hero-metric-row {
    grid-template-columns: 1fr;
  }

  .hero-visual-card {
    min-height: 200px;
  }
}
