/* ==========================================================================
   NOTARIATUS.RU — Q&A HUB DESIGN SYSTEM (questions.css)
   Стили хаба юридических вопросов и ответов нотариусов РФ
   Соответствует стандарту DESIGN_SYSTEM.md (версия 1.0)
   ========================================================================== */

:root {
    /* Токены бренда Notariatus */
    --qa-primary: #b21b3c;
    --qa-primary-hover: #961330;
    --qa-accent: #d01a40;
    --qa-blue: #2563eb;
    --qa-blue-light: #eff6ff;
    --qa-green: #10b981;
    --qa-green-light: #ecfdf5;
    --qa-gold: #f59e0b;
    --qa-cyan: #0284c7;

    --qa-dark: #0f172a;
    --qa-slate: #1e293b;
    --qa-gray: #64748b;
    --qa-gray-light: #94a3b8;
    --qa-border: #e5eaf2;
    --qa-border-subtle: #f1f5f9;

    --qa-bg-canvas: #f4f7fb;
    --qa-bg-card: #ffffff;
    --qa-bg-light: #f8fafc;
    --qa-bg-accent: #fdf2f4;

    --qa-radius-card: 20px;
    --qa-radius-pill: 8px;
    --qa-radius-round: 9999px;

    --qa-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --qa-shadow-md: 0 6px 20px rgba(15, 23, 42, 0.05);
    --qa-shadow-hover: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* --------------------------------------------------------------------------
   Контейнер страницы
   -------------------------------------------------------------------------- */
.qa-page-wrapper {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 16px 40px;
    font-family: Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--qa-slate);
    box-sizing: border-box;
}

.qa-page-wrapper * {
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Хлебные крошки
   -------------------------------------------------------------------------- */
.qa-breadcrumbs {
    padding: 14px 0 10px;
    font-size: 13px;
    color: var(--qa-gray);
}
.qa-breadcrumbs .breadcrumb > li + li::before,
.qa-breadcrumbs li + li::before {
    content: none !important;
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
.qa-breadcrumbs ol,
.qa-breadcrumbs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.qa-breadcrumbs li {
    display: inline-flex;
    align-items: center;
}
.qa-breadcrumbs li:not(:last-child)::after {
    content: "›";
    margin-left: 6px;
    color: var(--qa-gray-light);
    font-weight: 600;
}
.qa-breadcrumbs a {
    color: var(--qa-gray);
    text-decoration: none;
    transition: color 0.15s ease;
}
.qa-breadcrumbs a:hover {
    color: var(--qa-primary);
}
.qa-breadcrumbs li:last-child {
    color: var(--qa-slate);
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   Hero-секция Q&A
   -------------------------------------------------------------------------- */
.qa-hero {
    background: linear-gradient(180deg, #ffffff 0%, var(--qa-bg-light) 100%);
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 32px 36px 28px;
    margin-bottom: 24px;
    box-shadow: var(--qa-shadow-sm);
    position: relative;
    overflow: hidden;
}

.qa-hero::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(178, 27, 60, 0.05) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
    border-radius: 50%;
}

.qa-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.qa-badge-online {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--qa-green-light);
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 5px 12px;
    border-radius: var(--qa-radius-round);
    font-size: 12.5px;
    font-weight: 600;
}

.qa-pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--qa-green);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: qaPulse 2s infinite;
}

@keyframes qaPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.qa-hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-size: 12.5px;
    color: var(--qa-gray);
}
.qa-hero-stats strong {
    color: var(--qa-dark);
    font-weight: 700;
}

.qa-hero-title {
    font-size: 32px;
    line-height: 1.22;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0 0 10px;
    letter-spacing: -0.01em;
}

.qa-hero-desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--qa-gray);
    margin: 0 0 24px;
    max-width: 780px;
}

/* Строка поиска в Hero */
.qa-search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--qa-border);
    border-radius: 12px;
    padding: 4px 6px 4px 18px;
    box-shadow: var(--qa-shadow-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 16px;
}

.qa-search-form:focus-within {
    border-color: var(--qa-primary);
    box-shadow: 0 0 0 3px rgba(178, 27, 60, 0.12);
}

.qa-search-icon {
    width: 20px;
    height: 20px;
    color: var(--qa-gray-light);
    flex-shrink: 0;
    margin-right: 12px;
}

.qa-search-input {
    flex: 1;
    height: 44px;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--qa-dark);
    background: transparent;
    font-family: inherit;
}

.qa-search-input::placeholder {
    color: var(--qa-gray-light);
}

.qa-search-btn {
    height: 44px;
    padding: 0 24px;
    background: var(--qa-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--qa-radius-pill);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.15s ease, transform 0.15s ease;
    white-space: nowrap;
}

.qa-search-btn:hover {
    background: var(--qa-primary-hover);
    transform: translateY(-1px);
}

/* Чипы тем под поиском */
.qa-search-chips-wrapper {
    position: relative;
    width: 100%;
}

.qa-search-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.qa-chips-fade-right {
    display: none;
}

.qa-chips-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--qa-gray);
    margin-right: 2px;
}

.qa-chip {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--qa-border);
    color: var(--qa-slate);
    font-size: 12.5px;
    padding: 6px 12px;
    border-radius: var(--qa-radius-pill);
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.qa-chip:hover {
    background: var(--qa-bg-light);
    border-color: #cbd5e1;
    color: var(--qa-primary);
    transform: translateY(-1px);
}

.qa-chip.active {
    background: var(--qa-bg-accent);
    border-color: #fecdd3;
    color: var(--qa-primary);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Bento-сетка категорий (4 карточки)
   -------------------------------------------------------------------------- */
.qa-bento-section {
    margin-bottom: 28px;
}

.qa-bento-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.qa-bento-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0;
}

.qa-bento-all-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--qa-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}
.qa-bento-all-link:hover {
    color: var(--qa-primary);
}

.qa-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.qa-bento-card {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: 16px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
    box-shadow: var(--qa-shadow-sm);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.qa-bento-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--qa-shadow-hover);
    border-color: #cbd5e1;
}

.qa-bento-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.qa-bento-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transform: rotate(-6deg);
    transition: transform 0.2s ease;
}

.qa-bento-card:hover .qa-bento-icon-wrap {
    transform: rotate(0deg) scale(1.08);
}

/* Цвета для Bento-категорий */
.qa-bento-card.theme-nasledstvo .qa-bento-icon-wrap {
    background: #fef3c7;
    color: #d97706;
}
.qa-bento-card.theme-nedvizh .qa-bento-icon-wrap {
    background: #e0f2fe;
    color: #0284c7;
}
.qa-bento-card.theme-dover .qa-bento-icon-wrap {
    background: #ecfdf5;
    color: #059669;
}
.qa-bento-card.theme-family .qa-bento-icon-wrap {
    background: #fdf2f4;
    color: #b21b3c;
}

.qa-bento-count {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--qa-gray);
    background: var(--qa-bg-light);
    border: 1px solid var(--qa-border);
    padding: 3px 8px;
    border-radius: var(--qa-radius-round);
}

.qa-bento-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--qa-dark);
    line-height: 1.3;
    margin: 0;
    transition: color 0.15s;
}

.qa-bento-card:hover .qa-bento-name {
    color: var(--qa-primary);
}

/* --------------------------------------------------------------------------
   Основной двухколоночный Лейаут
   -------------------------------------------------------------------------- */
.qa-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
}

/* --------------------------------------------------------------------------
   Левая колонка: Табы и Листинг вопросов
   -------------------------------------------------------------------------- */
.qa-main-col {
    min-width: 0;
}

.qa-tabs-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 18px;
}

.qa-tabs-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--qa-border);
    padding-bottom: 12px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.qa-tabs-fade-right {
    display: none;
}

.qa-tab-text-short {
    display: none;
}
.qa-tab-text-full {
    display: inline;
}

.qa-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--qa-radius-pill);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--qa-gray);
    text-decoration: none;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.qa-tab-btn:hover {
    color: var(--qa-slate);
    background: var(--qa-bg-light);
}

.qa-tab-btn.active {
    color: var(--qa-primary);
    background: var(--qa-bg-accent);
    border-color: #fecdd3;
    font-weight: 700;
}

.qa-tab-counter {
    font-size: 11px;
    font-weight: 700;
    background: #ffffff;
    border: 1px solid var(--qa-border);
    color: var(--qa-gray);
    padding: 1px 6px;
    border-radius: var(--qa-radius-round);
}
.qa-tab-btn.active .qa-tab-counter {
    background: var(--qa-primary);
    color: #ffffff;
    border-color: var(--qa-primary);
}

/* Список карточек */
.qa-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Карточка вопроса (Rich Question Card) */
.qa-card {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 22px 24px;
    box-shadow: var(--qa-shadow-sm);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qa-card:hover {
    box-shadow: var(--qa-shadow-hover);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Мета-шапка карточки */
.qa-card-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12.5px;
}

.qa-card-category-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--qa-bg-light);
    border: 1px solid var(--qa-border);
    color: var(--qa-slate);
    font-weight: 600;
    font-size: 11.5px;
    padding: 3px 10px;
    border-radius: var(--qa-radius-round);
    text-decoration: none;
    transition: all 0.15s;
}

.qa-card-category-tag:hover {
    background: #f1f5f9;
    color: var(--qa-primary);
}

.qa-card-author-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--qa-gray);
}

.qa-card-city-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--qa-slate);
    font-weight: 500;
}

/* Заголовок вопроса */
.qa-card-title {
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--qa-dark);
    margin: 0;
}

.qa-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.qa-card-title a:hover {
    color: var(--qa-primary);
}

/* Сниппет сути проблемы */
.qa-card-excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: var(--qa-gray);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Превью ответа нотариуса */
.qa-card-answer-preview {
    background: var(--qa-bg-light);
    border: 1px solid var(--qa-border);
    border-left: 3px solid var(--qa-green);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--qa-slate);
}

.qa-card-answer-expert {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 6px;
}

.qa-card-answer-expert svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.qa-card-answer-text {
    margin: 0;
    color: #334155;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
}

/* Подвал карточки */
.qa-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--qa-border-subtle);
    padding-top: 12px;
    font-size: 13px;
}

.qa-card-answers-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--qa-slate);
    font-weight: 600;
}

.qa-card-answers-count.has-answers {
    color: #15803d;
}

.qa-card-answers-count svg {
    width: 16px;
    height: 16px;
}

.qa-card-more-link {
    font-weight: 700;
    color: var(--qa-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.15s ease, color 0.15s ease;
}

.qa-card-more-link:hover {
    gap: 7px;
    color: var(--qa-primary-hover);
}

/* Пагинация */
.qa-pagination-wrap {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.qa-pagination-wrap ul.pagination {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
}

.qa-pagination-wrap ul.pagination li a,
.qa-pagination-wrap ul.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-pill);
    background: #ffffff;
    color: var(--qa-slate);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.qa-pagination-wrap ul.pagination li a:hover {
    border-color: #cbd5e1;
    background: var(--qa-bg-light);
    color: var(--qa-primary);
}

.qa-pagination-wrap ul.pagination li.active a,
.qa-pagination-wrap ul.pagination li.active span {
    background: var(--qa-primary);
    border-color: var(--qa-primary);
    color: #ffffff;
    font-weight: 700;
}

.qa-pagination-wrap ul.pagination li.disabled span {
    color: var(--qa-gray-light);
    background: #f8fafc;
    border-color: var(--qa-border-subtle);
    cursor: not-allowed;
}

/* Пустое состояние */
.qa-empty-state {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 48px 24px;
    text-align: center;
}
.qa-empty-icon {
    width: 48px;
    height: 48px;
    color: var(--qa-gray-light);
    margin-bottom: 12px;
}
.qa-empty-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--qa-dark);
    margin: 0 0 8px;
}
.qa-empty-desc {
    font-size: 14px;
    color: var(--qa-gray);
    margin: 0 0 20px;
}

/* --------------------------------------------------------------------------
   Правая колонка (Sticky Сайдбар доверия и конверсии)
   -------------------------------------------------------------------------- */
.qa-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 24px;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

/* Сайдбар-виджет «Задать вопрос» */
.qa-sidebar-ask-card {
    background: linear-gradient(135deg, #ffffff 0%, var(--qa-bg-accent) 100%);
    border: 1px solid var(--qa-border-red);
    border-radius: var(--qa-radius-card);
    padding: 24px;
    box-shadow: var(--qa-shadow-sm);
    position: relative;
    overflow: hidden;
}

.qa-sidebar-ask-badge {
    display: inline-block;
    background: #fecdd3;
    color: #9f1239;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.qa-sidebar-ask-title {
    font-size: 19px;
    line-height: 1.3;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0 0 8px;
}

.qa-sidebar-ask-desc {
    font-size: 13px;
    line-height: 1.45;
    color: var(--qa-gray);
    margin: 0 0 16px;
}

.qa-sidebar-ask-features {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12.5px;
    color: var(--qa-slate);
}

.qa-sidebar-ask-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qa-sidebar-ask-features svg {
    width: 16px;
    height: 16px;
    color: var(--qa-green);
    flex-shrink: 0;
}

.qa-btn-ask-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 18px;
    background: var(--qa-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--qa-radius-pill);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(178, 27, 60, 0.25);
    transition: all 0.15s ease;
}

.qa-btn-ask-full:hover {
    background: var(--qa-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(178, 27, 60, 0.35);
    color: #ffffff;
}

/* Сайдбар-виджет «Консультирующие нотариусы» */
.qa-sidebar-experts-card {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 22px 20px;
    box-shadow: var(--qa-shadow-sm);
}

.qa-sidebar-card-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qa-sidebar-experts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.qa-expert-row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 8px;
    border-radius: 10px;
    transition: background-color 0.15s;
}

.qa-expert-row:hover {
    background: var(--qa-bg-light);
}

.qa-expert-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--qa-slate);
    flex-shrink: 0;
    overflow: hidden;
    border: 2px solid #ffffff;
    box-shadow: var(--qa-shadow-sm);
}

.qa-expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qa-expert-info {
    flex: 1;
    min-width: 0;
}

.qa-expert-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--qa-dark);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qa-expert-meta {
    font-size: 12px;
    color: var(--qa-gray);
    display: flex;
    align-items: center;
    gap: 6px;
}

.qa-expert-answers-tag {
    font-size: 11px;
    font-weight: 600;
    background: var(--qa-green-light);
    color: #15803d;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Сайдбар-виджет «Официальные тарифы» */
.qa-sidebar-tariffs-card {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 20px;
    box-shadow: var(--qa-shadow-sm);
}

.qa-tariffs-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.qa-tariffs-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #eff6ff;
    color: var(--qa-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qa-tariffs-content h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--qa-dark);
    margin: 0 0 2px;
}

.qa-tariffs-content p {
    font-size: 12px;
    color: var(--qa-gray);
    margin: 0;
}

/* --------------------------------------------------------------------------
   Секция FAQ о сервисе консультаций
   -------------------------------------------------------------------------- */
.qa-faq-section {
    margin-top: 40px;
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 32px 36px;
    box-shadow: var(--qa-shadow-sm);
}

.qa-faq-header {
    margin-bottom: 20px;
}

.qa-faq-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0 0 6px;
}

.qa-faq-desc {
    font-size: 14px;
    color: var(--qa-gray);
    margin: 0;
}

.qa-faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qa-faq-item {
    border: 1px solid var(--qa-border);
    border-radius: 12px;
    background: var(--qa-bg-light);
    overflow: hidden;
    transition: border-color 0.2s;
}

.qa-faq-item.is-open {
    border-color: #cbd5e1;
    background: #ffffff;
}

.qa-faq-question {
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
    color: var(--qa-dark);
    cursor: pointer;
    font-family: inherit;
}

.qa-faq-question svg {
    width: 18px;
    height: 18px;
    color: var(--qa-gray);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.qa-faq-item.is-open .qa-faq-question svg {
    transform: rotate(180deg);
    color: var(--qa-primary);
}

.qa-faq-answer {
    padding: 0 20px 16px;
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
    display: none;
}

.qa-faq-item.is-open .qa-faq-answer {
    display: block;
}

/* --------------------------------------------------------------------------
   Адаптивность (Responsive)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) and (max-height: 860px) {
    .qa-sidebar {
        top: 16px;
        gap: 12px;
    }
    .qa-sidebar-ask-card {
        padding: 18px 20px;
    }
    .qa-sidebar-ask-desc {
        margin-bottom: 12px;
    }
    .qa-sidebar-ask-features {
        margin-bottom: 14px;
        gap: 6px;
    }
    .qa-sidebar-experts-card {
        padding: 16px 18px;
    }
    .qa-sidebar-experts-list {
        gap: 6px;
    }
    .qa-expert-row {
        padding: 6px 8px;
    }
    .qa-sidebar-tariffs-card,
    .qa-sidebar-map-card {
        padding: 12px 14px;
    }
}

/* Мобильная фиксированная плавающая кнопка «Задать вопрос» (по умолчанию скрыта) */
.qa-mobile-fixed-cta {
    display: none;
}

@media (max-width: 1024px) {
    .qa-page-wrapper {
        padding-bottom: 84px;
    }
    .qa-bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .qa-layout {
        grid-template-columns: 1fr;
    }
    .qa-sidebar {
        position: static;
        margin-top: 10px;
    }
    .qa-mobile-fixed-cta {
        display: block;
        position: fixed;
        bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        z-index: 999;
        padding: 0 16px;
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }
    .qa-mobile-fixed-cta.is-hidden {
        opacity: 0;
        visibility: hidden;
        transform: translateY(24px);
        pointer-events: none;
    }
    .qa-mobile-fixed-btn {
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
        height: 48px;
        background: linear-gradient(135deg, var(--qa-primary) 0%, #961330 100%);
        color: #ffffff !important;
        border-radius: var(--qa-radius-round);
        font-size: 15px;
        font-weight: 700;
        text-decoration: none !important;
        box-shadow: 0 8px 24px rgba(178, 27, 60, 0.45), 0 2px 6px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(8px);
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .qa-mobile-fixed-btn:active {
        transform: scale(0.97);
        box-shadow: 0 4px 12px rgba(178, 27, 60, 0.35);
    }
}

@media (max-width: 768px) {
    .qa-page-wrapper {
        padding: 0 12px calc(84px + env(safe-area-inset-bottom, 0px));
    }
    .qa-hero {
        padding: 22px 18px 20px;
        border-radius: 16px;
    }
    .qa-hero-title {
        font-size: 24px;
    }
    .qa-hero-desc {
        font-size: 13.5px;
        margin-bottom: 18px;
    }
    /* Мобильная поисковая строка: единая сбалансированная строка */
    .qa-search-form {
        flex-direction: row;
        align-items: center;
        padding: 4px 6px 4px 14px;
        gap: 8px;
        border-radius: 14px;
        background: #ffffff;
        margin-bottom: 14px;
    }
    .qa-search-icon {
        display: block;
        width: 18px;
        height: 18px;
        color: var(--qa-gray-light);
        flex-shrink: 0;
        margin-right: 0;
    }
    .qa-search-input {
        flex: 1;
        height: 44px;
        font-size: 16px; /* Защита от автозума в Safari iOS */
        min-width: 0;
        padding: 0;
    }
    .qa-search-btn {
        width: auto;
        height: 38px;
        padding: 0 16px;
        font-size: 13.5px;
        border-radius: 10px;
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }
    .qa-search-btn span:first-child {
        white-space: nowrap;
    }

    /* Мобильная свайп-лента чипов категорий */
    .qa-search-chips-wrapper {
        position: relative;
        margin: 0 -18px;
        padding: 0 18px;
        overflow: hidden;
    }
    .qa-search-chips {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 8px;
        padding-bottom: 2px;
        padding-right: 36px;
    }
    .qa-search-chips::-webkit-scrollbar {
        display: none;
    }
    .qa-chips-label {
        flex-shrink: 0;
        font-size: 12px;
        white-space: nowrap;
        margin-right: 2px;
    }
    .qa-chip {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 12.5px;
        padding: 6px 12px;
        border-radius: 20px;
    }
    .qa-chips-fade-right {
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 36px;
        background: linear-gradient(to right, rgba(248, 250, 252, 0), var(--qa-bg-light) 95%);
        pointer-events: none;
        z-index: 2;
    }

    /* Мобильные табы с явным скроллом и градиентным фейдом */
    .qa-tabs-wrapper {
        margin: 0 -12px 16px;
        padding: 0 12px;
        overflow: hidden;
    }
    .qa-tabs-nav {
        gap: 6px;
        padding-right: 48px;
        border-bottom: 1px solid var(--qa-border);
        scrollbar-width: none;
    }
    .qa-tabs-nav::-webkit-scrollbar {
        display: none;
    }
    .qa-tabs-fade-right {
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 1px;
        width: 44px;
        background: linear-gradient(to right, rgba(244, 247, 251, 0), var(--qa-bg-canvas) 85%);
        pointer-events: none;
        z-index: 2;
    }
    .qa-tab-text-full {
        display: none;
    }
    .qa-tab-text-short {
        display: inline;
    }
    .qa-tab-btn {
        padding: 7px 12px;
        font-size: 13px;
        flex-shrink: 0;
    }
    .qa-bento-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .qa-card {
        padding: 16px;
        border-radius: 16px;
    }
    .qa-card-title {
        font-size: 16px;
    }
    .qa-card-excerpt {
        font-size: 13px;
    }
    .qa-card-answer-preview {
        padding: 10px 12px;
        font-size: 13px;
    }
    .qa-faq-section {
        padding: 22px 16px;
        border-radius: 16px;
    }
    .qa-faq-title {
        font-size: 18px;
    }
    .qa-faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }
    .qa-faq-answer {
        padding: 0 16px 14px;
        font-size: 13px;
    }
}

/* ==========================================================================
   Страница отдельного вопроса (pageq2.php) — ДЕТАЛЬНЫЙ ВИД
   ========================================================================== */

/* Карточка вопроса */
.qa-detail-card {
    background: var(--qa-bg-card);
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 32px 36px;
    margin-bottom: 24px;
    box-shadow: var(--qa-shadow-sm);
    position: relative;
    overflow: hidden;
}

.qa-detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 13px;
}

.qa-detail-meta-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qa-detail-category-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--qa-bg-accent);
    border: 1px solid var(--qa-border-red);
    color: var(--qa-primary);
    border-radius: var(--qa-radius-round);
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
}

.qa-detail-category-tag:hover {
    background: var(--qa-primary);
    color: #ffffff;
    border-color: var(--qa-primary);
}

.qa-detail-city-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--qa-gray);
    font-size: 13px;
    font-weight: 500;
    background: var(--qa-bg-light);
    border: 1px solid var(--qa-border);
    padding: 3px 10px;
    border-radius: var(--qa-radius-round);
}

.qa-detail-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--qa-radius-round);
    font-size: 12px;
    font-weight: 700;
}

.qa-detail-status-badge.is-answered {
    background: var(--qa-green-light);
    color: #166534;
    border: 1px solid #bbf7d0;
}

.qa-detail-status-badge.is-pending {
    background: #f1f5f9;
    color: var(--qa-gray);
    border: 1px solid var(--qa-border);
}

.qa-detail-meta-right {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--qa-gray);
    font-size: 13px;
}

.qa-detail-author {
    color: var(--qa-slate);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.qa-detail-title {
    font-size: 28px;
    line-height: 1.32;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.qa-detail-body {
    font-size: 16px;
    line-height: 1.7;
    color: #334155;
    margin-bottom: 24px;
    word-break: break-word;
}

.qa-detail-body p {
    margin: 0 0 14px;
}

.qa-detail-body p:last-child {
    margin-bottom: 0;
}

.qa-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 18px;
    border-top: 1px solid var(--qa-border-subtle);
}

.qa-btn-jump {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: var(--qa-blue-light);
    color: var(--qa-blue);
    border: 1px solid #bfdbfe;
    border-radius: var(--qa-radius-pill);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.qa-btn-jump:hover {
    background: var(--qa-blue);
    color: #ffffff;
    border-color: var(--qa-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.qa-btn-ask-similar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    background: var(--qa-bg-light);
    color: var(--qa-slate);
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-pill);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.qa-btn-ask-similar:hover {
    background: #e2e8f0;
    color: var(--qa-dark);
}

/* --------------------------------------------------------------------------
   Секция ответов экспертов
   -------------------------------------------------------------------------- */
.qa-answers-section {
    margin-bottom: 36px;
    scroll-margin-top: 24px;
}

.qa-answers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.qa-answers-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qa-answers-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--qa-primary);
    color: #ffffff;
    border-radius: var(--qa-radius-round);
    font-size: 12px;
    font-weight: 800;
    padding: 2px 9px;
    min-width: 22px;
}

.qa-answer-card {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 24px 28px;
    box-shadow: var(--qa-shadow-sm);
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.qa-answer-card:hover {
    box-shadow: var(--qa-shadow-md);
}

.qa-answer-card.is-best {
    border: 2px solid #fbbf24;
    background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
    box-shadow: 0 6px 24px rgba(245, 158, 11, 0.1);
}

.qa-best-ribbon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--qa-radius-round);
    margin-bottom: 14px;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}

.qa-best-ribbon svg {
    width: 14px;
    height: 14px;
}

.qa-notary-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--qa-border-subtle);
}

.qa-notary-avatar-box {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.qa-notary-avatar-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

.qa-notary-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qa-notary-avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b21b3c 0%, #6b0c20 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
}

.qa-notary-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.qa-notary-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qa-notary-name {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--qa-dark);
    text-decoration: none;
    transition: color 0.15s ease;
}

.qa-notary-name:hover {
    color: var(--qa-primary);
}

.qa-notary-verify {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #166534;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--qa-radius-round);
}

.qa-notary-meta-sub {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12.5px;
}

.qa-notary-chamber {
    color: var(--qa-gray);
    font-weight: 400;
}

.qa-dot-sep {
    color: var(--qa-gray-light);
    font-weight: 700;
}

.qa-answer-date-compact {
    color: var(--qa-gray);
    font-weight: 500;
}

.qa-answer-body {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--qa-slate);
    margin-bottom: 0;
    word-break: break-word;
}

.qa-answer-body p {
    margin: 0 0 12px;
}

.qa-answer-body p:last-child {
    margin-bottom: 0;
}

.qa-answer-body blockquote {
    margin: 14px 0;
    padding: 12px 18px;
    background: var(--qa-bg-light);
    border-left: 4px solid var(--qa-primary);
    border-radius: 0 10px 10px 0;
    font-style: normal;
    color: var(--qa-slate);
    font-size: 14px;
    line-height: 1.6;
}

.qa-answer-admin-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #fecdd3;
}

/* Пустое состояние ответов */
.qa-no-answer-card {
    background: linear-gradient(180deg, #ffffff 0%, var(--qa-bg-light) 100%);
    border: 1px dashed #cbd5e1;
    border-radius: var(--qa-radius-card);
    padding: 36px 32px;
    text-align: center;
    margin-bottom: 24px;
}

.qa-no-answer-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 12px 0 6px;
}

.qa-no-answer-card p {
    font-size: 13.5px;
    color: var(--qa-gray);
    max-width: 520px;
    margin: 0 auto 18px;
    line-height: 1.5;
}

/* Блок онлайн консультации Feedot */
.qa-feedot-banner {
    background: #ffffff;
    border: 1px solid var(--qa-border);
    border-radius: var(--qa-radius-card);
    padding: 24px 28px;
    margin-bottom: 30px;
    box-shadow: var(--qa-shadow-sm);
    text-align: center;
}

/* Блок похожих вопросов */
.qa-related-section {
    margin-top: 36px;
}

.qa-related-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--qa-dark);
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qa-related-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Панель модератора */
.qa-admin-panel {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

.qa-admin-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.qa-admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #e11d48;
    background: #ffffff;
    color: #e11d48;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.qa-admin-btn:hover {
    background: #e11d48;
    color: #ffffff;
}

.qa-admin-btn-active {
    background: #10b981;
    border-color: #10b981;
    color: #ffffff;
}

.qa-admin-btn-inactive {
    background: #64748b;
    border-color: #64748b;
    color: #ffffff;
}

.qa-admin-select {
    padding: 5px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12.5px;
    max-width: 260px;
    background: #ffffff;
}

/* Мобильная адаптивность для страницы детального вопроса */
@media (max-width: 768px) {
    .qa-detail-card {
        padding: 20px 18px;
        border-radius: 16px;
    }
    .qa-detail-title {
        font-size: 21px;
        line-height: 1.3;
    }
    .qa-detail-body {
        font-size: 14.5px;
        line-height: 1.65;
        margin-bottom: 0;
    }
    .qa-answer-card {
        padding: 18px 16px;
        border-radius: 16px;
    }
    .qa-notary-profile {
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    .qa-notary-avatar-box {
        width: 46px;
        height: 46px;
    }
    .qa-notary-avatar-fallback {
        font-size: 15px;
    }
    .qa-notary-name {
        font-size: 15px;
    }
    .qa-notary-meta-sub {
        font-size: 12px;
        gap: 4px;
    }
    .qa-answer-body {
        font-size: 14.5px;
        line-height: 1.65;
    }
    .qa-feedot-banner {
        padding: 18px 16px;
        border-radius: 16px;
    }
}

/* --------------------------------------------------------------------------
   Блок прямого бесплатного звонка в сайдбаре вопросов
   -------------------------------------------------------------------------- */
.qa-sidebar-direct-phone {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(178, 27, 60, 0.2);
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.qa-sidebar-direct-phone__label {
    font-size: 12px;
    color: var(--qa-gray);
    font-weight: 500;
}

.qa-sidebar-direct-phone__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #ffffff;
    border: 1.5px solid #fecdd3;
    border-radius: var(--qa-radius-pill);
    color: var(--qa-primary) !important;
    font-size: 15.5px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(178, 27, 60, 0.06);
}

.qa-sidebar-direct-phone__link:hover {
    background: #fff1f2;
    border-color: var(--qa-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(178, 27, 60, 0.15);
    color: var(--qa-primary-hover) !important;
}

.qa-sidebar-direct-phone__link svg {
    color: var(--qa-primary);
    flex-shrink: 0;
}


