/**
 * SARV CATALYST / Persian sitewide shell + internal page hero.
 *
 * The approved desktop header and footer live across every FA route, not only
 * the homepage. Internal-page hero matches the approved R&D archive: pale
 * blue-grey field, breadcrumb above the title, red-accent eyebrow, strong
 * headline, readable lead and subtle watermark. The homepage hero remains its
 * approved industrial art direction; R&D archive/single remain editorial.
 *
 * EN/RU are not affected. No content/database mutation, no builder overrides.
 */
html[lang="fa-IR"] {
  --sc-fa-radius-control: 4px;
  --sc-fa-radius-surface: 10px;
  --sc-fa-hero-bg: #f4f8fa;
  --sc-fa-hero-ink: #122e47;
  --sc-fa-hero-muted: #536d7d;
  --sc-fa-hero-blue: #096d9e;
  --sc-fa-hero-red: #e52c37;
}

/* Consistent navigation and hover treatments on all FA routes.
   On tight laptops preserve the essential 1024px single row. */
@media(min-width:1024px) {
  html[lang="fa-IR"] .sc-site-header--editorial .sc-primary-nav__list {
    gap: clamp(14px, 1.3vw, 21px);
  }
  html[lang="fa-IR"] .sc-site-header--editorial .sc-primary-nav__list > li > a {
    padding: 8px 6px;
    border-radius: var(--sc-fa-radius-control);
    transition: background-color 140ms ease, color 140ms ease;
  }
  html[lang="fa-IR"] .sc-site-header--editorial .sc-primary-nav__list > li > a:is(:hover,:focus-visible) {
    background-color: rgb(15 118 181 / 9%);
  }
  html[lang="fa-IR"] .sc-site-header--editorial .sc-primary-nav__list > li > a:focus-visible {
    outline: 2px solid #1379b5;
    outline-offset: 2px;
  }
}
/* Footer is genuinely global and reads at the same size on every page. */
html[lang="fa-IR"] .sc-site-footer--editorial .sc-site-footer__list a {
  font-size: clamp(14px,1.08vw,15px);
  line-height: 1.65;
  padding-block: 5px;
  white-space: nowrap;
}

/* The common HTML hero rendered by PHP in every standard internal-page template. */
html[lang="fa-IR"] .sc-fa-inner-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--sc-fa-hero-bg);
  border-block-end: 1px solid #e1ebf1;
  color: var(--sc-fa-hero-ink);
}
html[lang="fa-IR"] .sc-fa-inner-hero::before {
  content:"";
  position:absolute;
  z-index: -1;
  inline-size: clamp(250px,31vw,460px);
  block-size: clamp(250px,31vw,460px);
  inset-inline-start: clamp(-165px,-8vw,-80px);
  inset-block-start: 45px;
  background: #96c8df;
  opacity: .15;
  -webkit-mask: url("../../images/brand/logo-mark.png") center/contain no-repeat;
  mask: url("../../images/brand/logo-mark.png") center/contain no-repeat;
  pointer-events: none;
}
html[lang="fa-IR"] .sc-fa-inner-hero__inner {
  position:relative;
  z-index:1;
  padding-block: clamp(25px,2.3vw,40px) clamp(62px,5vw,92px);
}
html[lang="fa-IR"] .sc-fa-inner-hero .sc-breadcrumbs {
  margin: 0 0 clamp(45px,5vw,78px);
  color: #718594;
  font-size: clamp(12px,.85vw,14px);
  line-height:1.8;
}
html[lang="fa-IR"] .sc-fa-inner-hero .sc-breadcrumbs__list {
  flex-wrap:wrap;
  row-gap:6px;
}
html[lang="fa-IR"] .sc-fa-inner-hero .sc-breadcrumbs :is(a,.sc-breadcrumbs__current) {
  color:#526e80;
}
html[lang="fa-IR"] .sc-fa-inner-hero__heading {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:clamp(14px,1.4vw,20px);
  max-width: min(100%, 1250px);
}
html[lang="fa-IR"] .sc-fa-inner-hero__eyebrow {
  display:flex;
  align-items:center;
  gap:13px;
  margin:0;
  color:var(--sc-fa-hero-blue);
  font-size: clamp(13px,1vw,16px);
  font-weight:700;
  line-height:1.8;
}
html[lang="fa-IR"] .sc-fa-inner-hero__accent {
  flex:none;
  width:38px;
  height:3px;
  background:var(--sc-fa-hero-red);
}
html[lang="fa-IR"] .sc-fa-inner-hero__title {
  max-width:100%;
  margin:0;
  color:var(--sc-fa-hero-ink);
  font-size:clamp(28px,2.65vw,42px);
  font-weight:780;
  line-height:1.52;
  letter-spacing:normal;
  text-wrap:balance;
}
html[lang="fa-IR"] .sc-fa-inner-hero__lead {
  max-width: min(100%, 1100px);
  margin:0;
  color:var(--sc-fa-hero-muted);
  font-size: clamp(14px,1.16vw,18px);
  line-height:1.95;
  text-wrap:pretty;
}
html[lang="fa-IR"] .sc-fa-inner-hero__after {
  width:100%;
  margin-block-start:12px;
}
/* Controls/categories passed by a real source template remain accessible. */
html[lang="fa-IR"] .sc-fa-inner-hero__after a:focus-visible {
  outline:2px solid var(--sc-fa-hero-blue);
  outline-offset:3px;
}

/* Special internal single-post headers: preserve semantics & content but bring
   them under the exact same editorial field, breadcrumb, and heading hierarchy.
   Research archive itself is an approved master and remains untouched. */
html[lang="fa-IR"] body:not(.home) :is(
  .sc-product__header,
  .sc-news-single__header,
  .sc-call-single__header
) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:var(--sc-fa-hero-bg);
  border-bottom:1px solid #e1ebf1;
}
html[lang="fa-IR"] body:not(.home) :is(
  .sc-product__header,
  .sc-news-single__header,
  .sc-call-single__header
)::before {
  content:"";
  position:absolute;
  z-index:-1;
  width:clamp(240px,31vw,460px);
  height:clamp(240px,31vw,460px);
  inset-inline-start:-8vw;
  inset-block-start:35px;
  background:#96c8df;
  opacity:.15;
  -webkit-mask:url("../../images/brand/logo-mark.png") center/contain no-repeat;
  mask:url("../../images/brand/logo-mark.png") center/contain no-repeat;
  pointer-events:none;
}
html[lang="fa-IR"] body:not(.home) :is(
  .sc-product__header,
  .sc-news-single__header,
  .sc-call-single__header
) .sc-breadcrumbs { margin-bottom: clamp(45px,5vw,76px); }
html[lang="fa-IR"] body:not(.home) :is(
  .sc-product__title,
  .sc-news-single__title,
  .sc-call-single__title
) {
  color: var(--sc-fa-hero-ink);
  font-size:clamp(28px,2.65vw,42px);
  font-weight:780;
  line-height:1.52;
  max-width: 100%;
  letter-spacing: normal;
}
html[lang="fa-IR"] body:not(.home) :is(
  .sc-product__lead,
  .sc-news-single__summary,
  .sc-call-single__summary
) {
  color:var(--sc-fa-hero-muted);
  font-size:clamp(14px,1.16vw,18px);
  line-height:1.95;
  max-width:1100px;
}
/* Avoid changing the media itself: on product detail, the customer must still
   see the product photo. It remains an intentional detail-page exception. */
@media (max-width:767px) {
  html[lang="fa-IR"] .sc-fa-inner-hero__inner {
    padding-block:25px 48px;
  }
  html[lang="fa-IR"] .sc-fa-inner-hero .sc-breadcrumbs {
    margin-bottom:38px;
  }
  html[lang="fa-IR"] .sc-fa-inner-hero__title {
    font-size:clamp(27px,7.4vw,34px);
    line-height:1.55;
  }
  html[lang="fa-IR"] .sc-fa-inner-hero__lead {
    font-size:14px;
    line-height:2;
  }
  html[lang="fa-IR"] .sc-fa-inner-hero::before {
    inset-inline-start:-110px;
    opacity:.1;
  }
}
@media(prefers-reduced-motion:reduce) {
  html[lang="fa-IR"] .sc-site-header--editorial .sc-primary-nav__list > li > a {
    transition:none;
  }
}

/* Single product: brand-consistent hero above, actual product imagery retained
 * below as a separate bounded figure so buyers never lose visual product proof. */
html[lang="fa-IR"] .sc-fa-product-detail__extras {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px 20px;
  margin-block-start:4px;
  color:var(--sc-fa-hero-blue);
  font-size:14px;
  line-height:1.6;
}
html[lang="fa-IR"] .sc-fa-product-detail__extras > a:not(.sc-button) {
  color:var(--sc-fa-hero-blue);
  text-decoration:underline;
  text-underline-offset:4px;
}
html[lang="fa-IR"] .sc-fa-product-detail__code {
  font:600 13px/1.6 system-ui,sans-serif;
  color:#45677d;
}
html[lang="fa-IR"] .sc-fa-product-detail__support {
  padding-block:32px 8px;
}
html[lang="fa-IR"] .sc-fa-product-detail__photo {
  width:min(100%, 460px);
  margin:0;
  overflow:hidden;
  border:1px solid #dce7ee;
  border-radius:var(--sc-fa-radius-surface);
  background:#f8fbfc;
}
html[lang="fa-IR"] .sc-fa-product-detail__photo img {
  display:block;
  width:100%;
  max-height:330px;
  height:auto;
  object-fit:contain;
}

/* Context data stays directly beneath a FA single call or news title. */
html[lang="fa-IR"] .sc-fa-inner-hero__after .sc-news-item__meta {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px 22px;
  margin:0;
  color:var(--sc-fa-hero-muted);
  font-size:14px;
  line-height:1.8;
}
html[lang="fa-IR"] .sc-fa-inner-hero__dates {
  display:grid;
  grid-template-columns:repeat(2,max-content);
  align-items:center;
  gap:8px 18px;
  margin:0;
  color:var(--sc-fa-hero-muted);
  font-size:14px;
  line-height:1.8;
}
@media(max-width:520px) {
  html[lang="fa-IR"] .sc-fa-inner-hero__dates {
    grid-template-columns:max-content minmax(0,1fr);
  }
}

/* Consistent optical social icon size in the Persian footer. */
html[lang="fa-IR"] .sc-site-footer__social {gap:12px;align-items:center}
html[lang="fa-IR"] .sc-site-footer__social-link {width:44px;height:44px;display:grid;place-items:center}
html[lang="fa-IR"] .sc-site-footer__social-link svg {width:28px!important;height:28px!important;max-width:28px;max-height:28px;display:block}

/* Single approved homepage CTA visual, reused on every Persian inner-page ending. */
html[lang="fa-IR"] .sc-fa-closing-cta.sc-final-cta--editorial {
 position:relative;isolation:isolate;overflow:hidden;background:#064982;
 color:#fff;padding-block:clamp(48px,6vw,90px);
}
html[lang="fa-IR"] .sc-fa-closing-cta.sc-final-cta--editorial::before {
 content:"";position:absolute;z-index:0;inset:0;pointer-events:none;
 background:#b8d7ee;opacity:.14;
 -webkit-mask-image:url('../../images/brand/logo-mark.png');
 mask-image:url('../../images/brand/logo-mark.png');
 -webkit-mask-size:min(54vw,740px) auto;mask-size:min(54vw,740px) auto;
 -webkit-mask-position:left center;mask-position:left center;
 -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;
}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__pattern {display:none!important}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-container {position:relative;z-index:1}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__grid {display:grid;grid-template-columns:20% 48% 32%;gap:0;align-items:center}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__copy {grid-column:2;padding-inline-end:clamp(15px,3vw,50px);gap:14px}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__title {font-size:clamp(25px,2.6vw,40px);line-height:1.35;color:#fff;margin:0}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__lead {font-size:15px;line-height:1.8;color:#dcecf6;margin:0}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__actions {grid-column:3;justify-items:start;margin:0}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-button--inverse {display:inline-flex;align-items:center;gap:12px;min-height:50px;padding:12px 20px;border-radius:4px;border:1px solid #fff;background:#fff;color:#064982!important;text-decoration:none}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-button--inverse :is(.sc-button__label,.sc-button__arrow) {color:inherit!important}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-button--inverse:is(:hover,:focus-visible) {background:#e9f4fa;border-color:#e9f4fa;color:#064982!important}
html[lang="fa-IR"] .sc-fa-closing-cta .sc-button--inverse:focus-visible {outline:3px solid #fff;outline-offset:3px}
@media(max-width:800px){html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__grid{grid-template-columns:1fr;gap:24px}html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__copy,html[lang="fa-IR"] .sc-fa-closing-cta .sc-final-cta__actions{grid-column:1;padding-inline-end:0}}

/* Persian readability: avoid expanded word gaps in justified text. */
html[lang="fa-IR"] :is(main, .site-main, .sc-site-main, .sc-main) :is(p,li,dd,blockquote) {
 text-align:start!important;text-align-last:auto!important;text-justify:auto!important;
 text-wrap:pretty;word-spacing:normal;letter-spacing:normal;
}
html[lang="fa-IR"] :is(main, .site-main, .sc-site-main, .sc-main) :is(h1,h2,h3,h4,h5,h6) {text-align:start;text-wrap:balance}
