/* ===== Виджет TopDirections — hover на карточках ===== */

a.direction-card {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}

a.direction-card:hover {
    border-color: #0d7a5f;
    box-shadow: 0 4px 14px rgba(13, 122, 95, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

a.direction-card:hover .direction-card__name {
    color: #0d7a5f;
}

a.direction-card:hover .direction-card__count {
    color: #0d7a5f;
}

/* ===== Страница направления права /q/alias/ ===== */

/* Статистика в шапке */
.direction-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0 24px;
}

.direction-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f4faf6;
    border: 1px solid #c8e6d4;
    border-radius: 10px;
    padding: 14px 24px;
    min-width: 140px;
    flex: 1;
}

.direction-stats__value {
    font-size: 28px;
    font-weight: 700;
    color: #0d7a5f;
    line-height: 1;
}

.direction-stats__value--link:hover {
    text-decoration: underline;
}

.direction-stats__label {
    font-size: 12px;
    color: #777;
    margin-top: 4px;
    text-align: center;
}

/* CTA-кнопка */
.direction-cta {
    margin: 0 0 32px;
    background: linear-gradient(135deg, #f0faf6 0%, #e8f7f0 100%);
    border: 1px solid #c8e6d4;
    border-radius: 14px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.direction-cta--after-lawyers {
    margin-top: 24px;
}

.direction-cta--after-questions {
    margin-top: 24px;
}

.direction-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    font-size: 15px;
    font-weight: 700;
    padding: 14px 28px;
    background: linear-gradient(135deg, #0d7a5f 0%, #33836E 100%);
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(13, 122, 95, 0.3);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.direction-cta__btn::after {
    content: '';
    display: inline-block;
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.direction-cta__btn:hover {
    background: linear-gradient(135deg, #0a6450 0%, #2a6d5c 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(13, 122, 95, 0.45);
    transform: translateY(-2px);
    text-decoration: none;
}

.direction-cta__btn:hover::after {
    transform: translateX(4px);
}

.direction-cta__note {
    font-size: 13px;
    color: #5a8a75;
    line-height: 1.6;
}

.direction-cta__note strong {
    display: block;
    font-size: 14px;
    color: #1a4a3a;
    margin-bottom: 2px;
}

@media (max-width: 600px) {
    .direction-cta {
        flex-direction: column;
        align-items: stretch;
        padding: 18px 16px;
        gap: 12px;
    }

    .direction-cta__btn {
        justify-content: center;
        width: 100%;
        white-space: normal;
        text-align: center;
    }
}

/* Вводный текст */
.direction-intro {
    font-size: 15px;
    color: #444;
    margin: 0 0 20px;
    line-height: 1.6;
}

/* Топ юристов */
.direction-lawyers {
    margin: 0 0 36px;
}

.direction-lawyers__title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 16px;
}

.direction-lawyers__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.direction-lawyer-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    min-width: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.direction-lawyer-card:hover {
    border-color: #0d7a5f;
    box-shadow: 0 2px 10px rgba(13, 122, 95, 0.12);
    text-decoration: none;
    color: inherit;
}

.direction-lawyer-card__avatar {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
}

.direction-lawyer-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.direction-lawyer-card__info {
    flex: 1;
    min-width: 0;
}

.direction-lawyer-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.direction-lawyer-card__name {
    font-size: 14px;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
}

.direction-lawyer-card__verified {
    font-size: 11px;
    font-weight: 600;
    color: #0d7a5f;
    background: #f0faf6;
    border: 1px solid #b2dece;
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

.direction-lawyer-card__type {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
}

.direction-lawyer-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #0d7a5f;
}

.direction-lawyer-card__rating {
    color: #888;
    font-size: 14px;
}

/* Список вопросов */
.direction-questions__title {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 16px;
}


/* Ссылки в LawyerDirections */
a.lawyer-practice__name {
    color: #222;
    text-decoration: none;
}

a.lawyer-practice__name:hover {
    color: #0d7a5f;
    text-decoration: underline;
}

a.lawyer-practice__bar {
    text-decoration: none;
    height: 100%;
    border-radius: 4px;
}

/* Ссылки в специализациях на профиле юриста */
.lawyer-specialization-item a {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.lawyer-specialization-item a:hover .lawyer-specialization-item-title {
    color: #0d7a5f;
    text-decoration: underline;
}

/* Hero — правая колонка с аватарками юристов */
.cat-services__right.direction-hero__right {
    margin-top: 0;
}

.direction-hero__right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
}

.direction-hero__avatars {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    /*max-width: 320px;*/
    padding-left: 20px; /* компенсация отрицательного margin первого ряда */
}

.direction-hero__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    background: #e0e0e0;
    flex-shrink: 0;
    margin-left: -20px;
    margin-bottom: -20px;
}

.direction-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.direction-hero__lawyers-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.direction-hero__lawyers-num {
    font-size: 32px;
    font-weight: 800;
    color: #0d7a5f;
    line-height: 1;
}

.direction-hero__lawyers-label {
    font-size: 13px;
    color: #555;
    text-align: center;
    line-height: 1.4;
}

/* Адаптив */
@media (max-width: 900px) {
    .direction-lawyers__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .direction-lawyers__list {
        grid-template-columns: 1fr;
    }

    .direction-stats__item {
        min-width: 100px;
        padding: 10px 14px;
    }

    .direction-stats__value {
        font-size: 22px;
    }
}

/* Виджет compact направлений — ховеры на тегах-ссылках */
a.direction-tag {
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

a.direction-tag:hover {
    border-color: #0d7a5f;
    background: #f0faf6;
    color: #0d7a5f;
    text-decoration: none;
}

a.direction-tag:hover .direction-tag__count {
    color: #0d7a5f;
}

/* ===== Карточка вопроса на странице направления ===== */

.dq-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dq-item:hover {
    border-color: #0d7a5f;
    box-shadow: 0 2px 12px rgba(13, 122, 95, 0.09);
}

.dq-item__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dq-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    white-space: nowrap;
}

.dq-badge--solved {
    background: #e8f7f1;
    color: #0d7a5f;
    border: 1px solid #b2dece;
}

.dq-badge--answered {
    background: #f0faf6;
    color: #0d7a5f;
    border: 1px solid #c8e6d4;
}

.dq-badge--waiting {
    background: #f5f5f5;
    color: #5a5959;
    border: 1px solid #e0e0e0;
}

.dq-badge--paid {
    background: #e8f7f1;
    color: #0a5f4a;
    border: 1px solid #b2dece;
}

.dq-badge--free {
    background: #f5f5f5;
    color: #5a5959;
    border: 1px solid #e8e8e8;
}

.dq-item__title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.45;
    text-decoration: none;
}

.dq-item__title:hover {
    color: #0d7a5f;
    text-decoration: none;
}

.dq-item__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 2px;
}

.dq-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: 11px;
    color: #aaa;
}

.dq-item__meta-item + .dq-item__meta-item::before {
    content: '·';
    margin-right: 12px;
    color: #ccc;
}

.dq-item__cta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 14px;
    font-weight: 600;
    color: #0d7a5f;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.dq-item__cta:hover {
    color: #0a5f4a;
    text-decoration: none;
}

@media (max-width: 600px) {
    .dq-item {
        padding: 14px 14px;
    }

    .dq-item__footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
