/* ==========================================================================
   «Вопросы и ответы» в стиле каталога анализов: аккордеон-карточки с плавным
   раскрытием + боковая карточка-призыв. Отдельный файл, разметка — service/landing.twig.
   Заголовок секции переиспользует .analizy-catalog-section__intro каталога.
   ========================================================================== */

.analizy-qa-section { position: relative; isolation: isolate; width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 76px 0 64px; }
@media (min-width: 1400px) { .analizy-qa-section { width: min(1560px, calc(100% - 80px)); } }

/* тонированная полоса на всю ширину окна (чередование фона) */
.analizy-qa-section::before {
	content: ''; position: absolute; z-index: -1; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); pointer-events: none;
	background:
		radial-gradient(520px 260px at 12% 18%, rgba(8, 116, 249, .07), transparent 70%),
		radial-gradient(480px 260px at 92% 80%, rgba(124, 92, 255, .07), transparent 70%),
		linear-gradient(180deg, rgba(232, 240, 255, 0), #e9f1ff 14%, #edf3ff 86%, rgba(237, 243, 255, 0));
}

.aqa-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
@media (min-width: 1400px) { .aqa-layout { grid-template-columns: minmax(0, 1fr) 420px; } }

/* ---------- Аккордеон ---------- */
.aqa-list { display: grid; gap: 12px; }

.aqa-item { border: 1px solid rgba(255, 255, 255, .9); border-radius: 20px; background: #fff; box-shadow: 0 10px 24px rgba(42, 79, 142, .06), inset 0 1px 0 #fff; transition: box-shadow .3s ease, border-color .3s ease, transform .25s ease; }
.aqa-item:hover { box-shadow: 0 16px 30px rgba(42, 79, 142, .11), inset 0 1px 0 #fff; }
.aqa-item.is-open { border-color: rgba(8, 116, 249, .28); box-shadow: 0 22px 40px -18px rgba(8, 116, 249, .35), inset 0 1px 0 #fff; }

.aqa-item summary { display: flex; align-items: center; gap: 16px; padding: 18px 20px; list-style: none; cursor: pointer; border-radius: 20px; }
.aqa-item summary::-webkit-details-marker { display: none; }
.aqa-item summary::marker { content: ''; }
.aqa-item summary:focus-visible { outline: 3px solid rgba(8, 116, 249, .35); outline-offset: 2px; }

.aqa-num { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; color: #0874f9; background: #eaf2ff; font: 800 14px/1 Inter, sans-serif; letter-spacing: -.02em; transition: background .3s ease, color .3s ease, box-shadow .3s ease, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.aqa-item:hover .aqa-num { transform: scale(1.06); }
.aqa-item.is-open .aqa-num { color: #fff; background: linear-gradient(135deg, #0874f9, #7c5cff); box-shadow: 0 12px 22px -10px rgba(8, 116, 249, .7); }

.aqa-q { flex: 1 1 auto; min-width: 0; color: #08163b; font: 600 17px/1.35 Inter, sans-serif; letter-spacing: -.03em; }

/* плюс → крестик */
.aqa-plus { position: relative; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #eaf2ff; transition: background .25s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1); }
.aqa-plus::before, .aqa-plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: #0874f9; transition: transform .35s cubic-bezier(.22, 1, .36, 1), background .25s ease; }
.aqa-plus::after { transform: rotate(90deg); }
.aqa-item:hover .aqa-plus { background: #dcebff; }
.aqa-item.is-open .aqa-plus { background: #0874f9; transform: rotate(180deg); }
.aqa-item.is-open .aqa-plus::before, .aqa-item.is-open .aqa-plus::after { background: #fff; }
.aqa-item.is-open .aqa-plus::after { transform: rotate(0deg); }

/* ответ: высота анимируется скриптом, без JS — обычное раскрытие details */
.aqa-a { height: auto; overflow: hidden; transition: height .45s cubic-bezier(.22, 1, .36, 1); }
.aqa-a__in { padding: 0 20px 22px 78px; opacity: 0; transform: translateY(-6px); transition: opacity .4s ease .08s, transform .45s cubic-bezier(.22, 1, .36, 1) .08s; }
.aqa-item.is-open .aqa-a__in { opacity: 1; transform: none; }
.aqa-item:not(.is-open)[open] .aqa-a__in { opacity: 1; transform: none; }
.aqa-a p { max-width: 720px; margin: 0; padding-top: 14px; border-top: 1px solid #e9f0fb; color: #5d6b96; font: 400 15.5px/1.6 Inter, sans-serif; letter-spacing: -.01em; }

/* ---------- Боковая карточка ---------- */
.aqa-help { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; padding: 32px 30px 30px; overflow: hidden; isolation: isolate; border: 1px solid rgba(120, 160, 255, .3); border-radius: 26px; color: #fff; background: radial-gradient(120% 90% at 100% 0%, rgba(124, 92, 255, .55), transparent 60%), radial-gradient(100% 80% at 0% 100%, rgba(34, 211, 238, .25), transparent 60%), linear-gradient(150deg, #0d7bff 0%, #0a4fd6 55%, #2f3fe0 100%); box-shadow: 0 40px 70px -34px rgba(10, 79, 214, .75), inset 0 1px 0 rgba(255, 255, 255, .3); }
.aqa-help::before { content: ''; position: absolute; z-index: -1; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 68%); }
.aqa-help__ico { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; color: #fff; background: rgba(255, 255, 255, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34); animation: aqa-twinkle 3s ease-in-out infinite; }
.aqa-help__ico svg { width: 28px; height: 28px; }
@keyframes aqa-twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.08) rotate(10deg); } }
.aqa-help h3 { margin: 6px 0 0; color: #fff; font: 800 26px/1.15 Inter, sans-serif; letter-spacing: -.05em; }
.aqa-help p { margin: 0 0 8px; color: rgba(225, 236, 255, .88); font: 400 15.5px/1.5 Inter, sans-serif; letter-spacing: -.015em; }
/* цвета явно для всех состояний — в теме есть глобальный a:hover */
.aqa-help .aqa-help__btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px 15px 24px; border-radius: 16px; color: #0a3fb0; background: #fff; box-shadow: 0 16px 30px -14px rgba(0, 0, 40, .6); font: 600 16px/1 Inter, sans-serif; letter-spacing: -.02em; text-decoration: none; transition: transform .25s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease; }
.aqa-help .aqa-help__btn:hover, .aqa-help .aqa-help__btn:focus, .aqa-help .aqa-help__btn:active { color: #0a3fb0; background: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 20px 36px -14px rgba(0, 0, 40, .75), 0 0 0 5px rgba(255, 255, 255, .2); }
.aqa-help__btn svg { transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.aqa-help__btn:hover svg { transform: translateX(4px); }

/* ---------- Планшет / телефон ---------- */
@media (max-width: 991px) {
	.analizy-qa-section { width: auto; padding: 56px 16px 48px; }
	.aqa-layout { grid-template-columns: 1fr; gap: 16px; }
	.aqa-help { position: static; padding: 26px 22px; border-radius: 20px; }
	.aqa-item { border-radius: 18px; }
	.aqa-item summary { gap: 12px; padding: 14px 14px; }
	.aqa-num { width: 36px; height: 36px; border-radius: 11px; font-size: 13px; }
	.aqa-q { font-size: 15.5px; }
	.aqa-plus { width: 30px; height: 30px; }
	.aqa-a__in { padding: 0 16px 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.aqa-item, .aqa-num, .aqa-plus, .aqa-plus::before, .aqa-plus::after, .aqa-a, .aqa-a__in, .aqa-help__ico, .aqa-help__btn, .aqa-help__btn svg { transition: none; animation: none; }
}

/* Блок «Лучше один раз увидеть» закрепляется при прокрутке секции вопросов.
   Sticky не работал: у html и body стоит overflow-x: hidden — он делает их
   контейнерами прокрутки, и sticky привязывается к body, а не к окну.
   clip так же прячет горизонтальный «вылет», но контейнером прокрутки не является. */
html:has(.aqa-help), body:has(.aqa-help) { overflow: visible !important; overflow-x: clip !important; }
@media (min-width: 900px) { .aqa-help { align-self: start; } }
