/**
 * Phase 25 — Reading UX single + sticky B2B CRO sidebar
 * Desktop: ~70% / 30% · Mobile: 1 column
 */

.ar-single {
  position: relative;
  overflow: clip;
  background:
    radial-gradient(ellipse 50% 35% at 100% 0%, rgba(161, 34, 115, 0.08) 0%, transparent 55%),
    linear-gradient(180deg, #faf9fc 0%, #f3eef8 40%, #faf9fc 100%);
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/* Top reading progress */
.ar-single-progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 120;
  height: 3px;
  pointer-events: none;
  background: rgba(161, 34, 115, 0.08);
}

.ar-single-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: right center;
  background: linear-gradient(90deg, #A12273, #A12273 55%, #c9a227);
  transition: transform 0.08s linear;
  will-change: transform;
}

html[dir="ltr"] .ar-single-progress__bar,
[dir="ltr"] .ar-single-progress__bar {
  transform-origin: left center;
}

.ar-single__shell {
  padding-top: clamp(1.75rem, 4vw, 2.75rem);
}

.ar-single__layout {
  display: grid;
  gap: 1.75rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .ar-single__layout {
    grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
    gap: 2rem;
  }
}

/* Article */
.ar-single-article {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: 1.25rem;
  border: 1px solid rgba(161, 34, 115, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 36px rgba(61, 13, 40, 0.06);
}

.ar-single-breadcrumbs {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  color: #7a5a8c;
  line-height: 1.6;
}

.ar-single-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ar-single-breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-inline-start: 0.4rem;
  opacity: 0.45;
}

.ar-single-breadcrumbs a {
  color: #A12273;
  text-decoration: none;
  font-weight: 600;
}

.ar-single-breadcrumbs a:hover,
.ar-single-breadcrumbs a:focus-visible {
  color: #A12273;
}

.ar-single-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.ar-single-cat {
  display: inline-flex;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #A12273;
  background: transparent;
  color: #A12273;
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.ar-single-cat:hover,
.ar-single-cat:focus-visible {
  background: rgba(161, 34, 115, 0.1);
  text-decoration: none;
}

.ar-single-title {
  margin: 0 0 0.75rem;
  font-family: var(--ar-font-display), "Playfair Display", Georgia, serif;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #1a0033;
}

.ar-single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.45rem;
  margin: 0 0 1rem;
  color: #7a5a8c;
  font-size: 0.84rem;
}

.ar-single-meta__read {
  color: #A12273;
  font-weight: 600;
}

.ar-single-meta__sep {
  opacity: 0.5;
}

/* Micro progress under title */
.ar-single-readbar {
  margin: 0 0 1.25rem;
}

.ar-single-readbar__track {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(161, 34, 115, 0.1);
  overflow: hidden;
}

.ar-single-readbar__fill {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #A12273, #c9a227);
  transition: width 0.08s linear;
}

.ar-single-hero-media {
  margin: 0 0 1.5rem;
  overflow: hidden;
  border-radius: 1rem;
  background: #1a0033;
}

.ar-single-hero-media__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Typography — Iranian webfont reading UX */
.ar-single-content.entry-content {
  font-family: "Vazirmatn", var(--ar-font-body), sans-serif;
  font-size: 1.0625rem;
  line-height: 1.85;
  color: #2a0a3d;
}

.ar-single-content.entry-content > *:first-child {
  margin-top: 0;
}

.ar-single-content.entry-content h2,
.ar-single-content.entry-content h3 {
  color: #A12273;
  font-weight: 800;
  line-height: 1.4;
  margin: 1.75rem 0 0.75rem;
}

.ar-single-content.entry-content h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(161, 34, 115, 0.18);
}

.ar-single-content.entry-content h3 {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: #8B1C62;
}

.ar-single-content.entry-content p {
  margin: 0 0 1.15rem;
}

.ar-single-content.entry-content a {
  color: #A12273;
  text-decoration-color: rgba(161, 34, 115, 0.45);
}

.ar-single-content.entry-content a:hover {
  color: #A12273;
}

.ar-single-content.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-inline-start: 3px solid #A12273;
  border-radius: 0 0.85rem 0.85rem 0;
  background: linear-gradient(90deg, rgba(161, 34, 115, 0.08), rgba(255, 255, 255, 0.4));
  color: #3b1460;
  font-style: normal;
  font-weight: 500;
}

.ar-single-content.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

.ar-single-content.entry-content ul,
.ar-single-content.entry-content ol {
  margin: 0 0 1.15rem;
  padding-inline-start: 1.35rem;
}

.ar-single-content.entry-content li + li {
  margin-top: 0.35rem;
}

.ar-single-content.entry-content img {
  border-radius: 0.75rem;
  margin: 1.25rem 0;
}

.ar-single-content.entry-content figure {
  margin: 1.25rem 0;
}

.ar-single-content.entry-content figcaption {
  margin-top: 0.45rem;
  color: #7a5a8c;
  font-size: 0.85rem;
  text-align: center;
}

/* Seeded article callouts + animated icons */
.ar-post-callout {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 1.5rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: 1rem;
  border: 1px solid rgba(161, 34, 115, 0.28);
  background:
    linear-gradient(135deg, rgba(161, 34, 115, 0.08), rgba(201, 162, 39, 0.06));
}

.ar-post-callout__ico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  color: #A12273;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.ar-post-ico {
  width: 1.75rem;
  height: 1.75rem;
}

.ar-post-callout__body {
  min-width: 0;
}

.ar-post-callout__body strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #A12273;
  font-size: 0.95rem;
}

.ar-post-callout__body p {
  margin: 0 !important;
  color: #5c3a6e;
  font-size: 0.92rem;
  line-height: 1.7;
}

@media (prefers-reduced-motion: no-preference) {
  .ar-post-ico__pulse {
    transform-origin: center;
    animation: ar-post-ico-pulse 2.2s ease-in-out infinite;
  }

  .ar-post-ico__flow {
    stroke-dasharray: 40;
    animation: ar-post-ico-flow 2.8s linear infinite;
  }

  .ar-post-ico__draw {
    stroke-dasharray: 28;
    animation: ar-post-ico-draw 1.8s ease-in-out infinite alternate;
  }
}

@keyframes ar-post-ico-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes ar-post-ico-flow {
  to { stroke-dashoffset: -80; }
}

@keyframes ar-post-ico-draw {
  from { stroke-dashoffset: 28; opacity: 0.45; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

.ar-single-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 1.5rem;
  font-weight: 700;
  color: #A12273;
}

.ar-single-footer {
  margin-top: 2rem;
  padding-top: 1.35rem;
  border-top: 1px solid rgba(161, 34, 115, 0.1);
}

.ar-single-tags {
  margin-bottom: 1.25rem;
}

.ar-single-tags__label {
  display: block;
  margin-bottom: 0.45rem;
  color: #5c3a6e;
  font-size: 0.82rem;
  font-weight: 700;
}

.ar-single-tags ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ar-single-tags a {
  display: inline-flex;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(161, 34, 115, 0.06);
  color: #A12273;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
}

.ar-single-tags a:hover {
  background: rgba(161, 34, 115, 0.12);
}

.ar-single-back a {
  display: inline-flex;
  text-decoration: none !important;
  min-height: 2.5rem;
  padding: 0.5rem 1.15rem !important;
  font-size: 0.88rem !important;
}

/* Sticky CRO sidebar */
.ar-single-aside {
  min-width: 0;
}

@media (min-width: 1024px) {
  .ar-single-cta {
    position: sticky;
    top: calc(var(--ar-header-height, 4.75rem) + 1rem);
  }
}

.ar-single-cta {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: linear-gradient(165deg, #8B1C62 0%, #A12273 45%, #1a0033 100%);
  box-shadow:
    0 18px 48px rgba(61, 13, 40, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ar-single-cta__glow {
  position: absolute;
  inset: -20% -10% auto;
  height: 60%;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(201, 162, 39, 0.28), transparent 65%);
  filter: blur(20px);
  opacity: 0.85;
}

.ar-single-cta__inner {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.25rem 1.4rem;
  color: #faf9fc;
}

.ar-single-cta__eyebrow {
  margin: 0 0 0.45rem;
  color: #e8d48b;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ar-single-cta__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 800;
  line-height: 1.55;
  color: #fff;
}

.ar-single-cta__lead {
  margin: 0 0 1.1rem;
  color: rgba(250, 249, 252, 0.78);
  font-size: 0.88rem;
  line-height: 1.7;
}

.ar-single-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ar-single-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.65rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease, background 0.25s ease;
}

.ar-single-cta__btn:hover,
.ar-single-cta__btn:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.ar-single-cta__btn--primary {
  background: linear-gradient(160deg, #e8d48b 0%, #c9a227 100%);
  color: #1a0033 !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.ar-single-cta__btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.ar-single-cta__btn--soft {
  background: rgba(161, 34, 115, 0.35);
  color: #f3e6b0 !important;
  border: 1px solid rgba(201, 162, 39, 0.4);
}

.ar-single-cta__phone {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin: 1rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: rgba(250, 249, 252, 0.65);
}

.ar-single-cta__phone a {
  color: #e8d48b;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
}

.ar-single-cta__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.ar-single-cta__trust li {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(0, 0, 0, 0.18);
  color: rgba(243, 230, 176, 0.9);
  font-size: 0.68rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .ar-single-progress__bar,
  .ar-single-readbar__fill,
  .ar-single-cta__btn {
    transition: none !important;
  }

  .ar-single-cta__btn:hover {
    transform: none;
  }
}

/* ==========================================================================
   Phase 25.1 — Single article surface polish (4.12.5)
   ========================================================================== */

.ar-single {
  background:
    radial-gradient(ellipse 46% 30% at 100% 0%, rgba(161, 34, 115, 0.05) 0%, transparent 55%),
    linear-gradient(180deg, #fcfbfd 0%, #f7f3f9 42%, #faf9fc 100%);
}

.ar-single-article {
  padding: clamp(1.35rem, 3.2vw, 2.15rem);
  border-radius: 1.2rem;
  border: 1px solid rgba(28, 21, 40, 0.07);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 40px rgba(28, 21, 40, 0.05);
}

.ar-single-title {
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-weight: 800;
  font-size: clamp(1.55rem, 3.6vw, 2.2rem);
  line-height: 1.35;
  color: #1c1528;
  text-wrap: balance;
}

.ar-single-content.entry-content {
  font-size: clamp(0.98rem, 1.35vw, 1.05rem);
  line-height: 1.9;
  color: #3a3448;
}

.ar-single-content.entry-content h2,
.ar-single-content.entry-content h3 {
  color: #1c1528;
  font-weight: 800;
  margin-top: 1.75rem;
}

.ar-single-content.entry-content p + p {
  margin-top: 1rem;
}

.ar-single-content.entry-content blockquote {
  border-inline-start: 3px solid #A12273;
  background: rgba(161, 34, 115, 0.05);
  border-radius: 0 0.85rem 0.85rem 0;
  padding: 1rem 1.15rem;
}

.ar-single-content.entry-content img,
.ar-single-content.entry-content figure {
  border-radius: 0.85rem;
}

.ar-single-cat {
  border-color: rgba(161, 34, 115, 0.22);
  background: rgba(161, 34, 115, 0.05);
}

.ar-single-aside .ar-single-cta,
.ar-single-cta {
  border-radius: 1.15rem;
  border: 1px solid rgba(161, 34, 115, 0.16);
}
