/* جزئیات مقاله */
.ad-wrap { padding-top: clamp(40px, 5vw, 64px); }
.ad-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }

/* ستون اصلی */
.ad-main { position: relative; overflow: hidden; border-radius: 26px; background: #fff; border: 1px solid rgba(235, 228, 231, .9); box-shadow: 0 40px 80px -56px rgba(22, 26, 44, .55); }
.ad-main::before { content: ''; position: absolute; z-index: 3; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--rose), var(--red), var(--red-2)); }

/* تصویر شاخص و گالری */
.ad-cover { position: relative; }
.ad-cover__main { position: relative; margin: 0; aspect-ratio: 16 / 8; overflow: hidden; background: #eceef4; }
.ad-cover__main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(22, 14, 30, .35), transparent 45%); pointer-events: none; }
.ad-cover__main img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .8s var(--ease); }
.ad-cover__main:hover img { transform: scale(1.03); }
.ad-zoom { position: absolute; z-index: 2; left: 18px; bottom: 18px; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 14px; color: var(--red); background: rgba(255, 255, 255, .92); cursor: pointer; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .5); transition: transform .3s var(--ease), background .3s, color .3s; }
.ad-zoom:hover { transform: scale(1.08); background: var(--red); color: #fff; }
.gallery-thumbnails { display: flex; gap: 12px; padding: 14px clamp(20px, 3vw, 40px) 0; }
.gallery-thumbnail { width: 110px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; cursor: pointer; opacity: .6; border: 2px solid transparent; transition: opacity .25s, border-color .25s, transform .25s var(--ease); }
.gallery-thumbnail:hover { opacity: 1; transform: translateY(-2px); }
.gallery-thumbnail.active { opacity: 1; border-color: var(--red); }

/* جایگزین تصویر برای مقاله‌های بدون عکس */
.ad-cover--art { display: grid; place-items: center; align-content: center; gap: 1rem; aspect-ratio: 16 / 7; overflow: hidden; isolation: isolate; color: #fff; background: radial-gradient(rgba(255, 255, 255, .18) 1.2px, transparent 1.6px) 0 0 / 16px 16px, linear-gradient(140deg, var(--red-2), var(--red-d) 70%, #7d0c12); }
.ad-cover--art::after { content: ''; position: absolute; z-index: -1; right: -90px; top: -120px; width: 360px; height: 360px; border-radius: 50%; border: 60px solid rgba(255, 255, 255, .06); }
.ad-cover__ring { position: absolute; left: 50%; top: 50%; z-index: -1; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%); }
.ad-cover__ring--1 { width: min(46%, 300px); border: 1px dashed rgba(255, 255, 255, .4); animation: isoSpin 40s linear infinite; }
.ad-cover__ring--2 { width: min(70%, 460px); border: 1px solid rgba(255, 255, 255, .14); }
.ad-cover__ico { display: grid; place-items: center; width: 108px; height: 108px; border-radius: 50%; color: var(--red); background: #fff; box-shadow: 0 24px 46px -18px rgba(60, 0, 8, .7), 0 0 0 10px rgba(255, 255, 255, .14); }
.fl .ad-cover__ico svg { width: 48px; height: 48px; stroke-width: 1.6; }
.ad-cover__label { position: relative; padding: .3rem 1rem; border-radius: 999px; font-weight: 700; font-size: .92rem; color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }

.ad-body { padding: clamp(24px, 3.4vw, 44px) clamp(20px, 3.6vw, 48px) clamp(26px, 3.4vw, 40px); }

/* مشخصات مقاله */
.ad-meta { list-style: none; margin: 0; padding: 0 0 1.6rem; display: flex; flex-wrap: wrap; gap: .8rem 2rem; border-bottom: 1px dashed var(--line); }
.ad-meta li { display: flex; align-items: center; gap: .7rem; }
.ad-meta__ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: var(--red); background: #fde8e9; }
.fl .ad-meta__ico svg { width: 20px; height: 20px; }
.ad-meta small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.5; }
.ad-meta b { display: block; font-size: .95rem; color: var(--ink); line-height: 1.6; }

/* متن مقاله */
.ad-prose { margin-top: 1.8rem; }
.ad-prose > p:first-child { font-size: 1.12rem; color: var(--ink); }
.ad-prose h2 { position: relative; scroll-margin-top: 120px; padding-inline-start: 1.1rem; font-size: 1.35rem; }
.ad-prose h2::before { content: ''; position: absolute; right: 0; top: .3em; bottom: .3em; width: 4px; border-radius: 4px; background: linear-gradient(180deg, var(--red-2), var(--red-d)); }
.ad-points { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .7rem; }
.ad-points li { display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem; border-radius: 16px; background: linear-gradient(150deg, #fff6f7, #fff); border: 1px solid #f6e1e4; }
.ad-points li + li { margin-top: 0; }
.fl .ad-points svg { flex: none; width: 22px; height: 22px; margin-top: .35rem; padding: 4px; border-radius: 50%; color: #fff; background: var(--badge); stroke-width: 3; }
.ad-points b { color: var(--ink); }
.ad-callout { position: relative; margin-top: 2rem !important; padding: 1.3rem 1.4rem 1.3rem 1.4rem; padding-inline-start: 4.4rem; border-radius: 18px; color: var(--ink); font-weight: 600; background: radial-gradient(rgba(227, 36, 43, .12) 1.2px, transparent 1.6px) 0 0 / 14px 14px, linear-gradient(150deg, #fff1f2, #fff); border: 1px solid #f3d3d7; }
.ad-callout::before { content: ''; position: absolute; right: 1.1rem; top: 1.2rem; width: 38px; height: 38px; border-radius: 12px; background: var(--badge) ; box-shadow: 0 10px 20px -10px rgba(227, 36, 43, .8); }
.ad-callout::after { content: ''; position: absolute; right: calc(1.1rem + 11px); top: calc(1.2rem + 11px); width: 16px; height: 16px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* پایین مقاله */
.ad-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px dashed var(--line); }
.ad-tag { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem 1rem; border-radius: 999px; color: var(--red-d); background: #fde8e9; font-weight: 700; font-size: .88rem; }
.fl .ad-tag svg { width: 16px; height: 16px; }
.ad-share { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ستون کناری */
.ad-side { position: sticky; top: 110px; display: grid; gap: 24px; }
.ad-toc { padding: 1.6rem 1.4rem; }
.ad-toc h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.05rem; font-weight: 800; color: var(--ink); margin: 0 0 .9rem; }
.fl .ad-toc h3 svg { color: var(--red); }
.ad-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.ad-toc a { display: flex; align-items: flex-start; gap: .6rem; padding: .5rem .6rem; border-radius: 12px; font-size: .9rem; line-height: 1.7; color: var(--ink-2); transition: background .2s, color .2s; }
.ad-toc a span { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: .1rem; border-radius: 8px; font-size: .75rem; font-weight: 800; color: var(--red-d); background: #fde8e9; transition: background .2s, color .2s; }
.ad-toc a:hover, .ad-toc a.is-current { background: #fff4f5; color: var(--red-d); }
.ad-toc a.is-current span { background: var(--red); color: #fff; }

.ad-cta { position: relative; overflow: hidden; isolation: isolate; padding: 1.8rem 1.6rem; border-radius: 24px; color: #fff; background: radial-gradient(rgba(255, 255, 255, .15) 1.2px, transparent 1.6px) 0 0 / 16px 16px, linear-gradient(150deg, var(--red-2), var(--red) 45%, var(--red-d)); box-shadow: 0 34px 60px -40px rgba(179, 20, 27, .9); }
.ad-cta::after { content: ''; position: absolute; z-index: -1; left: -70px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; border: 40px solid rgba(255, 255, 255, .07); }
.ad-cta__ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 16px; color: var(--red); background: #fff; box-shadow: 0 0 0 7px rgba(255, 255, 255, .14); }
.fl .ad-cta__ico svg { width: 26px; height: 26px; }
.ad-cta h3 { margin-top: 1.1rem; font-size: 1.2rem; font-weight: 800; }
.ad-cta p { margin-top: .5rem; font-size: .92rem; opacity: .92; }
.ad-cta .f-btn { margin-top: 1.2rem; }
.ad-cta__tel { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; margin-top: 1rem; font-weight: 700; opacity: .92; }
.ad-cta__tel:hover { opacity: 1; }

/* مقاله یافت نشد */
.ad-missing { display: grid; justify-items: center; gap: .8rem; max-width: 640px; margin-inline: auto; text-align: center; }
.ad-missing h2 { font-size: 1.3rem; font-weight: 800; color: var(--ink); }
.ad-missing p { color: var(--muted); }
.ad-missing .f-btn { margin-top: .6rem; }

/* نمایش بزرگ تصویر */
.image-modal { display: none; position: fixed; inset: 0; z-index: 2000; align-items: center; justify-content: center; padding: 70px 16px; background: rgba(14, 10, 20, .88); backdrop-filter: blur(6px); }
.image-modal .modal-content { max-width: min(1200px, 100%); max-height: 100%; border-radius: 16px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.close-modal { position: absolute; top: 18px; left: 18px; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .14); cursor: pointer; transition: background .25s; }
.close-modal:hover { background: var(--red); }
.modal-navigation { position: absolute; inset-inline: 18px; top: 50%; display: flex; justify-content: space-between; transform: translateY(-50%); pointer-events: none; }
.nav-btn { pointer-events: auto; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; color: #fff; background: rgba(255, 255, 255, .14); cursor: pointer; transition: background .25s; }
.nav-btn:hover { background: var(--red); }

@media (max-width: 1100px) {
    .ad-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; }
}
@media (max-width: 980px) {
    .ad-layout { grid-template-columns: 1fr; }
    .ad-side { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (max-width: 600px) {
    .ad-cover__main { aspect-ratio: 16 / 10; }
    .ad-cover--art { aspect-ratio: 16 / 10; }
    .ad-cover__ico { width: 84px; height: 84px; }
    .fl .ad-cover__ico svg { width: 38px; height: 38px; }
    .ad-meta { gap: .8rem 1.2rem; }
    .gallery-thumbnail { width: 80px; }
    .ad-foot, .ad-share { flex-direction: column; align-items: stretch; }
    .ad-share .f-btn { justify-content: center; }
    .ad-callout { padding-inline-start: 1.2rem; padding-top: 4.2rem; }
}
@media (max-width: 600px) {
    .ad-body { padding-inline: 18px; }
    .ad-points li { padding: .7rem .75rem; gap: .55rem; }
    .ad-prose { font-size: 1rem; }
    .ad-prose > p:first-child { font-size: 1.05rem; }
}
