/* ============================================================
   Shafiei Gold — استایل قالب
   طراحی و اجرا: آژانس دیجیتال مارکتینگ کالون — dmcalon.net
   نکته: رنگ‌ها و فونت‌ها در theme.json تعریف شده‌اند.
   این فایل فقط چیزهایی است که theme.json نمی‌تواند بسازد.
   ============================================================ */

/* ---------- پایه ---------- */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:where(a):focus-visible,
:where(button):focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 3px; }
::selection { background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink); }

/* ---------- نور محیطی — امضای بصری ---------- */
.ds-light { --ds-lx: 70%; --ds-ly: 4%; }
.ds-light::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(52% 42% at var(--ds-lx) var(--ds-ly), rgba(216,188,126,.12) 0%, rgba(216,188,126,.035) 40%, transparent 70%);
  transition: background .6s cubic-bezier(.2,.8,.2,1);
}
.ds-light > * { position: relative; z-index: 1; }

/* ---------- سربرگ ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(10,9,8,.75);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--wp--custom--hair);
}
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close { color: var(--wp--preset--color--gold); }
.site-header .wp-block-navigation-item__content { position: relative; padding-block: 6px; }
.site-header .wp-block-navigation-item__content::after {
  content: ""; position: absolute; bottom: 0; inset-inline-end: 0; width: 0; height: 1px;
  background: var(--wp--preset--color--gold); transition: width .3s;
}
.site-header .wp-block-navigation-item__content:hover::after { width: 100%; }
.site-header .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content { color: var(--wp--preset--color--text); }
.site-header .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content::after { width: 100%; }

/* منوی موبایل */
.wp-block-navigation__responsive-container.is-menu-open {
  background: var(--wp--preset--color--ink) !important;
  padding-top: 90px;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 20px; }

/* ---------- دکمه ---------- */
.wp-block-button__link { transition: transform .25s, box-shadow .35s, filter .25s; }
.wp-block-button__link:hover { transform: translateY(-2px); filter: brightness(1.08); }
.wp-block-button.is-style-outline .wp-block-button__link {
  background: var(--wp--custom--glass) !important;
  color: var(--wp--preset--color--text) !important;
  border: 1px solid var(--wp--custom--hair) !important;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  border-color: var(--wp--custom--line) !important;
  color: var(--wp--preset--color--gold) !important;
  box-shadow: none;
}

/* ---------- کارت شیشه‌ای (کلاس کمکی برای گروه‌ها) ---------- */
.ds-glass {
  background: var(--wp--custom--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--wp--custom--hair);
  border-radius: var(--wp--custom--radius);
  transition: border-color .35s, transform .35s, background .35s;
}
.ds-glass:hover {
  border-color: var(--wp--custom--line);
  background: var(--wp--custom--glass2);
  transform: translateY(-3px);
}

/* ---------- برچسب کوچک طلایی ---------- */
.ds-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 600; letter-spacing: .22em;
  color: var(--wp--preset--color--gold);
}
.ds-eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; opacity: .65; }

/* ---------- خط جداکننده‌ی محو ---------- */
.ds-divider {
  height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--wp--custom--line) 25%, var(--wp--custom--line) 75%, transparent);
}

/* ---------- محتوای مقاله ---------- */
.ds-content > * { max-width: 70ch; }
.ds-content > .alignwide, .ds-content > .alignfull,
.ds-content > figure, .ds-content > .wp-block-table { max-width: none; }

.ds-content h2 {
  margin-top: 64px; padding-inline-start: 20px; position: relative;
}
.ds-content h2::before {
  content: ""; position: absolute; inset-inline-start: 0; top: .34em; bottom: .24em;
  width: 3px; border-radius: 2px;
  background: linear-gradient(180deg, var(--wp--preset--color--gold-lite), var(--wp--preset--color--gold-deep));
}
.ds-content h3 { margin-top: 40px; }
.ds-content p { margin-block: 22px; }
.ds-content strong { color: var(--wp--preset--color--text); font-weight: 700; }

.ds-content a {
  border-bottom: 1px solid rgba(216,188,126,.35);
  transition: border-color .25s, color .25s; padding-bottom: 1px;
}
.ds-content a:hover { border-color: var(--wp--preset--color--gold); }
/* لینک خارجی خودکار آیکون می‌گیرد */
.ds-content a[target="_blank"]::after {
  content: "↗"; font-size: .75em; margin-inline-start: 3px; opacity: .6;
  display: inline-block; vertical-align: super;
}

/* لیست‌ها */
.ds-content ul { list-style: none; padding-inline-start: 4px; }
.ds-content ul li { position: relative; padding-inline-start: 26px; }
.ds-content ul li::before {
  content: ""; position: absolute; inset-inline-start: 6px; top: .82em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--wp--preset--color--gold); opacity: .75;
}
.ds-content ol { list-style: none; counter-reset: dsn; padding-inline-start: 4px; }
.ds-content ol li { counter-increment: dsn; position: relative; padding-inline-start: 28px; }
.ds-content ol li::before {
  content: counter(dsn); position: absolute; inset-inline-start: 0; top: .1em;
  font-size: 13px; font-weight: 700; color: var(--wp--preset--color--gold);
  width: 20px; text-align: center;
}

/* ---------- باکس‌های الگو ---------- */
/* خلاصه‌ی پاسخ — برای استخراج در AI Overviews */
.ds-answer {
  border: 1px solid var(--wp--custom--line);
  border-radius: var(--wp--custom--radius);
  padding: 26px 28px;
  background: linear-gradient(150deg, rgba(216,188,126,.08), rgba(216,188,126,.02));
}
.ds-answer > p:first-child {
  font-size: 12px; letter-spacing: .18em; color: var(--wp--preset--color--gold);
  font-weight: 600; margin-block: 0 12px;
}
.ds-answer > p:last-child { margin: 0; color: var(--wp--preset--color--text); }

/* نکته‌ی بالینی — لمس انسانی E-E-A-T */
.ds-callout {
  border: 1px solid var(--wp--custom--line);
  border-radius: var(--wp--custom--radius);
  padding: 22px 24px;
  background: rgba(216,188,126,.05);
}
.ds-callout strong:first-child { color: var(--wp--preset--color--gold); }

/* ---------- پابرگ ---------- */
.site-footer { border-top: 1px solid var(--wp--custom--hair); }
.site-footer a { color: var(--wp--preset--color--muted); transition: color .25s, transform .25s; display: inline-block; }
.site-footer a:hover { color: var(--wp--preset--color--text); transform: translateX(-4px); }
.ds-credit a { color: var(--wp--preset--color--gold) !important; font-weight: 500; transform: none !important; }
.ds-credit a:hover { color: var(--wp--preset--color--gold-lite) !important; border-bottom: 1px solid currentColor; }

/* نوار دعوت به اقدام بالای پابرگ */
.ds-band { position: relative; overflow: hidden; }
.ds-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46% 80% at 50% 118%, rgba(216,188,126,.16) 0%, rgba(216,188,126,.04) 42%, transparent 72%);
}
.ds-band::after {
  content: ""; position: absolute; top: 0; inset-inline: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--wp--preset--color--gold) 50%, transparent); opacity: .55;
}
.ds-band > * { position: relative; z-index: 1; }

/* ---------- کمکی ---------- */
.ds-num { font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.skip-link:focus {
  position: fixed; top: 12px; inset-inline-start: 12px; z-index: 999;
  background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink);
  padding: 12px 20px; border-radius: 999px; clip: auto; width: auto; height: auto;
}

/* ---------- احترام به کاهش حرکت ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ============================================================
   صفحه‌ی اصلی — هیرو، چیپ‌های شناور، اسلایدر مقایسه
   ============================================================ */

/* ---------- صحنه‌ی هیرو ---------- */
.ds-stage { position: relative; }
.ds-portrait {
  position: relative; aspect-ratio: 4/5; border-radius: 22px; overflow: hidden;
  border: 1px solid var(--wp--custom--hair);
  background: linear-gradient(165deg, #17130E, #0A0908 68%);
}
.ds-portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-portrait figure { margin: 0; height: 100%; }
.ds-pline { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.ds-pline path {
  fill: none; stroke: var(--wp--preset--color--gold); stroke-width: 1.4; stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(216,188,126,.45));
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: ds-draw 2.8s .4s cubic-bezier(.6,.02,.2,1) forwards;
}
@keyframes ds-draw { to { stroke-dashoffset: 0; } }

/* ---------- چیپ‌های شیشه‌ای شناور ---------- */
.ds-chip {
  position: absolute; z-index: 3; display: flex !important; align-items: center; gap: 11px;
  padding: 12px 16px !important; border-radius: 999px !important;
  background: rgba(18,15,12,.62); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--wp--custom--line) !important;
  box-shadow: 0 18px 44px -14px rgba(0,0,0,.85), inset 0 1px 0 rgba(255,255,255,.06);
  white-space: nowrap; will-change: transform;
}
.ds-chip p { margin: 0 !important; line-height: 1.35; }
.ds-chip .ds-ico {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; color: var(--wp--preset--color--gold);
  background: radial-gradient(circle at 30% 25%, rgba(216,188,126,.22), rgba(216,188,126,.05));
  border: 1px solid rgba(216,188,126,.28);
}
.ds-ico svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }

.ds-chip-1 { top: 9%;    inset-inline-end: -6%;  animation: ds-float 7s ease-in-out infinite; }
.ds-chip-2 { top: 44%;   inset-inline-start: -12%; animation: ds-float 8.5s ease-in-out -1.5s infinite; }
.ds-chip-3 { bottom: 8%; inset-inline-end: 4%;   animation: ds-float 7.8s ease-in-out -3s infinite; }
@keyframes ds-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }

/* ---------- نوار اعتبار ---------- */
.ds-proof { border-block: 1px solid var(--wp--custom--hair); }
.ds-proof .ds-pi { display: flex; align-items: center; gap: 11px; }
.ds-proof .ds-pi svg { width: 19px; height: 19px; stroke: var(--wp--preset--color--gold);
  stroke-width: 1.4; fill: none; flex-shrink: 0; stroke-linecap: round; stroke-linejoin: round; }
.ds-proof .ds-pi p { margin: 0 !important; }

/* ---------- اسلایدر قبل/بعد ---------- */
.ds-compare {
  position: relative; aspect-ratio: 16/9; border-radius: var(--wp--custom--radius); overflow: hidden;
  border: 1px solid var(--wp--custom--hair); cursor: ew-resize; user-select: none; touch-action: none;
}
.ds-compare .ds-side { position: absolute; inset: 0; }
.ds-compare .ds-side img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-compare .ds-after { clip-path: inset(0 50% 0 0); }
.ds-compare .ds-tag {
  position: absolute; top: 16px; font-size: 11px; letter-spacing: .2em;
  color: var(--wp--preset--color--gold); border: 1px solid var(--wp--custom--line);
  padding: 5px 13px; border-radius: 999px; background: rgba(10,9,8,.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); z-index: 4;
}
.ds-compare .ds-before .ds-tag { inset-inline-end: 16px; }
.ds-compare .ds-after  .ds-tag { inset-inline-start: 16px; }
.ds-compare .ds-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--wp--preset--color--gold) 12%, var(--wp--preset--color--gold) 88%, transparent);
  box-shadow: 0 0 18px rgba(216,188,126,.5);
}
.ds-compare .ds-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--wp--preset--color--gold);
  background: rgba(10,9,8,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: grid; place-items: center; color: var(--wp--preset--color--gold); font-size: 14px;
}
.ds-ph { display: grid; place-items: center; height: 100%; font-size: 13px;
  color: var(--wp--preset--color--muted); }
.ds-before .ds-ph { background: linear-gradient(140deg,#1C1814,#0C0B09); }
.ds-after  .ds-ph { background: linear-gradient(140deg,#2A2318,#131110); }

/* ---------- کارت خدمت ---------- */
.ds-card-ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  color: var(--wp--preset--color--gold); background: rgba(216,188,126,.09);
  border: 1px solid rgba(216,188,126,.2); margin-bottom: 18px;
}
.ds-card-ico svg { width: 21px; height: 21px; stroke: currentColor; stroke-width: 1.4; fill: none;
  stroke-linecap: round; stroke-linejoin: round; }
.ds-feat-card { background: linear-gradient(180deg, transparent 30%, rgba(216,188,126,.09)) !important; }

/* ---------- ظاهرشدن با اسکرول ---------- */
.ds-rv { opacity: 0; transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1); }
.ds-rv.ds-in { opacity: 1; transform: none; }

/* ---------- دکمه‌ی شناور رزرو ---------- */
.ds-fab {
  position: fixed; bottom: 24px; inset-inline-start: 24px; z-index: 70;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--wp--preset--color--ink) !important;
  background: linear-gradient(135deg, var(--wp--preset--color--gold-lite), var(--wp--preset--color--gold) 50%, var(--wp--preset--color--gold-deep));
  box-shadow: 0 16px 44px -10px rgba(216,188,126,.55);
  opacity: 0; transform: translateY(20px); pointer-events: none;
  transition: .45s cubic-bezier(.2,.8,.2,1);
}
.ds-fab.ds-show { opacity: 1; transform: none; pointer-events: auto; }
.ds-fab svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.7; fill: none; }

@media (max-width: 900px) {
  .ds-stage { max-width: 390px; margin-inline: auto; }
  .ds-chip-1 { inset-inline-end: -4%; }
  .ds-chip-2 { inset-inline-start: -4%; }
}
@media (max-width: 560px) {
  .ds-chip { padding: 9px 12px !important; }
  .ds-chip .ds-ico { width: 28px; height: 28px; }
  .ds-fab { inset-inline: 16px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ds-pline path { stroke-dashoffset: 0; }
  .ds-rv { opacity: 1; transform: none; }
}

/* جای‌گاه پرتره‌ی هیرو (تا وقتی عکس واقعی گذاشته نشود) */
.ds-ph-portrait {
  position: absolute; inset: 0; padding: 24px; text-align: center; line-height: 1.9;
  color: var(--wp--preset--color--muted);
  background: linear-gradient(165deg, #17130E, #0A0908 68%);
}
.ds-ph-portrait small { opacity: .7; font-size: 11px; }
