/* Magazine body — layout from M1–M4. Header/footer stay the site shell. Peyda via youdube.css. */

#marketing-page.p.mag {
  background: #2d2d37;
  color: #eceaf4;
  font-family: Peyda, system-ui, sans-serif;
}

#marketing-page.p.mag .mag-w {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

#marketing-page.p.mag .mag-hero {
  padding-top: 28px;
  padding-bottom: 4px;
}

#marketing-page.p.mag .mag-kicker,
#marketing-page.p.mag .mag-topic {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  background: #4a3f73;
  color: #d3c2ff;
}

#marketing-page.p.mag .mag-hero h1 {
  font-size: 48px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
}

#marketing-page.p.mag .mag-accent {
  color: #b58cff;
}

/* Magazine header uses Asset 5 mark (مَگ یودوب); other pages keep studio wordmark. */
#marketing-page.p.mag .mkt-nav .brand--mag {
  flex: 0 0 auto;
}

#marketing-page.p.mag .mkt-nav nav a.l[href="/"] {
  color: #b58cff;
}

#marketing-page.p.mag .mkt-nav .brand-mag {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

#marketing-page.p.mag .mkt-nav .brand-mag .yd-word {
  display: block;
  height: 38px;
  width: auto;
  max-width: min(200px, 48vw);
}

@media (max-width: 720px) {
  #marketing-page.p.mag .mkt-nav .brand-mag .yd-word {
    height: 32px;
    max-width: min(168px, 44vw);
  }

  #marketing-page.p.mag .mag-w {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

#marketing-page.p.mag .mag-hero-lead {
  margin: 0;
  font-size: 19px;
  line-height: 1.8;
  max-width: 620px;
  color: #a9a5bd;
}

#marketing-page.p.mag .mag-feature-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: auto auto;
  gap: 12px 24px;
  align-items: start;
}

#marketing-page.p.mag .mag-feature-grid > .mag-aside-title {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  align-self: end;
}

/* Row height comes from the 4 fixed rail boxes; big card stretches to match. */
#marketing-page.p.mag .mag-feature-grid > .mag-rail {
  grid-column: 2;
  grid-row: 2;
}

#marketing-page.p.mag .mag-feature-grid > .mag-card {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  height: 0;
  min-height: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

#marketing-page.p.mag .mag-feature-grid .mag-card-cover {
  flex: 1 1 auto;
  min-height: 120px;
  aspect-ratio: auto;
}

#marketing-page.p.mag .mag-feature-grid .mag-card-body {
  flex: 0 0 auto;
  padding: 18px 22px 20px;
}

#marketing-page.p.mag .mag-feature-grid .mag-card-body h2 {
  font-size: 26px;
  margin: 10px 0 8px;
}

#marketing-page.p.mag .mag-feature-grid .mag-card-body p {
  font-size: 15px;
  line-height: 1.7;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#marketing-page.p.mag .mag-card {
  display: block;
  background: #3a3a46;
  border: 1px solid #5a5668;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

#marketing-page.p.mag .mag-card:hover {
  border-color: #6d3bd9;
}

#marketing-page.p.mag .mag-card-cover {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #3f3560;
}

#marketing-page.p.mag .mag-card-cover img,
#marketing-page.p.mag .mag-rail-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#marketing-page.p.mag .mag-card-body {
  padding: 28px 32px 32px;
}

#marketing-page.p.mag .mag-card-body h2 {
  font-size: 34px;
  font-weight: 900;
  margin: 14px 0 12px;
  line-height: 1.5;
}

#marketing-page.p.mag .mag-card-body p,
#marketing-page.p.mag .mag-grid .mag-card-body p {
  margin: 0 0 16px;
  color: #a9a5bd;
}

#marketing-page.p.mag .mag-card-body p {
  font-size: 18px;
  line-height: 1.8;
}

#marketing-page.p.mag .mag-meta {
  font-size: 14px;
  color: #a9a5bd;
}

#marketing-page.p.mag .mag-aside-title {
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 12px;
}

#marketing-page.p.mag .mag-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#marketing-page.p.mag .mag-rail-item {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: #3a3a46;
  border: 1px solid #5a5668;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}

#marketing-page.p.mag .mag-rail-item:hover {
  border-color: #6d3bd9;
}

#marketing-page.p.mag .mag-rail-thumb {
  width: 132px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  flex: none;
  background: #3f3560;
}

#marketing-page.p.mag .mag-rail-item h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 8px 0 4px;
  line-height: 1.6;
}

#marketing-page.p.mag .mag-section {
  padding-top: 56px;
}

#marketing-page.p.mag .mag-section h2 {
  font-size: 30px;
  font-weight: 900;
  margin: 0 0 20px;
}

/* Related / تازه‌ها under article: hub hero rail chrome, 3 horizontal cards per row. */
#marketing-page.p.mag .mag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

#marketing-page.p.mag .mag-grid .mag-rail-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid #5a5668;
  background: #3a3a46;
  transition: border-color 0.2s ease;
}

#marketing-page.p.mag .mag-grid .mag-rail-item:hover {
  border-color: #6d3bd9;
}

#marketing-page.p.mag .mag-grid .mag-rail-thumb {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  flex: none;
}

#marketing-page.p.mag .mag-grid .mag-rail-item > div {
  min-width: 0;
  flex: 1;
}

#marketing-page.p.mag .mag-grid .mag-rail-item h3 {
  margin: 6px 0 4px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

#marketing-page.p.mag .mag-grid .mag-topic {
  font-size: 13px;
  padding: 3px 10px;
}

#marketing-page.p.mag .mag-banner-wrap {
  padding-top: 64px;
  padding-bottom: 80px;
}

#marketing-page.p.mag .mag-feature-grid + .mag-banner-wrap.mag-banner-duo {
  padding-top: 40px;
  padding-bottom: 36px;
}

#marketing-page.p.mag .mag-hub-more {
  padding-top: 36px;
  padding-bottom: 28px;
}

#marketing-page.p.mag .mag-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 24px;
  padding-bottom: 88px;
  font-size: 15px;
}

#marketing-page.p.mag .mag-pager-link {
  color: #eceaf4;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #5a5668;
  background: #3a3a46;
  transition: border-color 0.2s ease, color 0.2s ease;
}

#marketing-page.p.mag .mag-pager-link:hover {
  border-color: #6d3bd9;
  color: #fff;
}

#marketing-page.p.mag .mag-pager-status {
  color: #a9a5bd;
  font-weight: 600;
}

#marketing-page.p.mag .mag-archive-head {
  padding-top: 28px;
  padding-bottom: 8px;
}

#marketing-page.p.mag .mag-hub-more .mag-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

#marketing-page.p.mag .mag-hub-more .mag-card--hub {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 20px;
}

#marketing-page.p.mag .mag-hub-more .mag-card-cover {
  aspect-ratio: 16 / 9;
  flex: none;
}

#marketing-page.p.mag .mag-hub-more .mag-card-body {
  padding: 16px 18px 18px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#marketing-page.p.mag .mag-hub-more .mag-card-body h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 10px 0 8px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

#marketing-page.p.mag .mag-hub-more .mag-card-body p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 12px;
  color: #a9a5bd;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
}

#marketing-page.p.mag .mag-hub-more .mag-meta {
  margin-top: auto;
  padding-top: 4px;
}

#marketing-page.p.mag .mag-banner-wrap.mag-banner-duo:last-child {
  padding-bottom: 88px;
}

#marketing-page.p.mag .mag-pager:last-child {
  padding-bottom: 88px;
}

#marketing-page.p.mag .mag-banner-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

#marketing-page.p.mag .mag-banner-duo .mag-banner {
  height: 100%;
  box-sizing: border-box;
  flex-direction: row;
  align-items: center;
  padding: 18px 22px;
  gap: 14px;
}

#marketing-page.p.mag .mag-banner-duo .mag-banner > div {
  flex: 1 1 auto;
  min-width: 0;
}

#marketing-page.p.mag .mag-banner-duo .mag-banner h2 {
  font-size: 19px;
  line-height: 1.35;
}

#marketing-page.p.mag .mag-banner-duo .mag-banner p {
  font-size: 13px;
  line-height: 1.55;
  margin-top: 4px;
}

#marketing-page.p.mag .mag-banner-duo .mag-banner .btn {
  flex: 0 0 auto;
  align-self: center;
  white-space: nowrap;
  min-height: 42px;
  padding: 0 16px;
  font-size: 14px;
}

#marketing-page.p.mag .mag-hero + .mag-feature-grid {
  padding-top: 8px;
}

#marketing-page.p.mag .mag-banner {
  background: #3f3560;
  border: 1px solid #6d3bd9;
  border-radius: 24px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

#marketing-page.p.mag .mag-banner h2 {
  font-size: 28px;
  font-weight: 900;
  margin: 0;
}

#marketing-page.p.mag .mag-banner p {
  margin: 6px 0 0;
  font-size: 16px;
  color: #a9a5bd;
}

#marketing-page.p.mag .mag-crumb {
  font-size: 14px;
  color: #a9a5bd;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 36px;
}

#marketing-page.p.mag .mag-crumb a {
  color: #c9c5db;
  text-decoration: none;
}

#marketing-page.p.mag .mag-crumb a:hover {
  color: #b58cff;
}

#marketing-page.p.mag .mag-article-head {
  margin-top: 18px;
}

#marketing-page.p.mag .mag-article-head h1 {
  font-size: 48px;
  font-weight: 900;
  margin: 14px 0;
  line-height: 1.5;
  max-width: 900px;
}

#marketing-page.p.mag .mag-article-lead {
  margin: 0;
  font-size: 21px;
  max-width: 820px;
  line-height: 1.9;
  color: #a9a5bd;
  text-align: justify;
  text-justify: inter-word;
}

#marketing-page.p.mag .mag-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

#marketing-page.p.mag .mag-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: #6d3bd9;
}

#marketing-page.p.mag .mag-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#marketing-page.p.mag .mag-cover {
  padding-top: 32px;
}

#marketing-page.p.mag .mag-cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: unset;
  border-radius: 24px;
  border: 1px solid #5a5668;
  box-sizing: border-box;
}

#marketing-page.p.mag .mag-article-layout {
  padding-top: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: start;
}

#marketing-page.p.mag .mag-prose {
  max-width: 700px;
  font-size: 18px;
  line-height: 2;
  text-align: justify;
  text-justify: inter-word;
}

#marketing-page.p.mag .mag-prose > p {
  margin: 0 0 1.15em;
}

#marketing-page.p.mag .mag-prose h2 {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.4;
  margin: 2.1em 0 0.55em;
}

#marketing-page.p.mag .mag-prose h3 {
  font-size: 22px;
  font-weight: 900;
  line-height: 1.4;
  margin: 1.7em 0 0.45em;
}

#marketing-page.p.mag .mag-prose h2:first-child,
#marketing-page.p.mag .mag-prose h3:first-child {
  margin-top: 0;
}

#marketing-page.p.mag .mag-prose ul,
#marketing-page.p.mag .mag-prose ol {
  margin: 0 0 1.15em;
  padding-inline-start: 1.3em;
}

#marketing-page.p.mag .mag-prose li {
  margin: 0.35em 0;
}

#marketing-page.p.mag .mag-prose a {
  color: #d3c2ff;
}

#marketing-page.p.mag .mag-prose blockquote {
  margin: 8px 0 28px;
  padding: 20px 24px;
  border-inline-start: 4px solid #6d3bd9;
  background: #3a3a46;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.8;
}

#marketing-page.p.mag .mag-prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.9em;
}

#marketing-page.p.mag .mag-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
}

#marketing-page.p.mag .mag-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 8px;
}

#marketing-page.p.mag .mag-side {
  position: sticky;
  /* Clear sticky marketing header (nav pad 18+18 + logo 36 ≈ 4.5rem). */
  top: calc(4.5rem + env(safe-area-inset-top, 0px) + 1rem);
  align-self: start;
}

#marketing-page.p.mag .mag-side-cta {
  background: #3f3560;
  border: 1px solid #6d3bd9;
  border-radius: 20px;
  padding: 20px 22px;
}

#marketing-page.p.mag .mag-side-cta h2 {
  font-size: 18px;
  font-weight: 900;
  margin: 0;
}

#marketing-page.p.mag .mag-side-cta p {
  font-size: 14px;
  color: #a9a5bd;
  margin: 6px 0 14px;
}

#marketing-page.p.mag .mag-side-cta .btn {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  #marketing-page.p.mag .mag-hero h1 {
    font-size: 36px;
  }

  #marketing-page.p.mag .mag-feature-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  #marketing-page.p.mag .mag-feature-grid > .mag-aside-title,
  #marketing-page.p.mag .mag-feature-grid > .mag-card,
  #marketing-page.p.mag .mag-feature-grid > .mag-rail {
    grid-column: auto;
    grid-row: auto;
  }

  #marketing-page.p.mag .mag-feature-grid > .mag-aside-title {
    order: 2;
    margin-top: 8px;
  }

  #marketing-page.p.mag .mag-feature-grid > .mag-rail {
    order: 3;
  }

  #marketing-page.p.mag .mag-feature-grid > .mag-card {
    order: 1;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto;
    min-height: 0;
    overflow: hidden;
  }

  #marketing-page.p.mag .mag-feature-grid .mag-card-cover {
    aspect-ratio: 16 / 9;
    flex: none;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 23px 23px 0 0;
  }

  #marketing-page.p.mag .mag-feature-grid .mag-card-body {
    padding: 28px 32px 32px;
  }

  #marketing-page.p.mag .mag-feature-grid .mag-card-body h2 {
    font-size: 26px;
  }

  #marketing-page.p.mag .mag-feature-grid .mag-card-body p {
    font-size: 18px;
    line-height: 1.8;
    -webkit-line-clamp: unset;
    display: block;
    overflow: visible;
  }

  #marketing-page.p.mag .mag-article-layout {
    grid-template-columns: 1fr;
  }

  #marketing-page.p.mag .mag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #marketing-page.p.mag .mag-hub-more .mag-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #marketing-page.p.mag .mag-article-head h1 {
    font-size: 32px;
  }

  #marketing-page.p.mag .mag-prose {
    font-size: 17px;
    line-height: 1.95;
    max-width: none;
  }

  #marketing-page.p.mag .mag-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
  }

  #marketing-page.p.mag .mag-banner-duo-grid {
    grid-template-columns: 1fr;
  }

  #marketing-page.p.mag .mag-side {
    display: none;
  }

  #marketing-page.p.mag .mag-card-body h2 {
    font-size: 26px;
  }
}

@media (max-width: 720px) {
  #marketing-page.p.mag .mag-grid {
    grid-template-columns: 1fr;
  }

  #marketing-page.p.mag .mag-hub-more .mag-grid {
    grid-template-columns: 1fr;
  }
}
