/**
 * Стили для карточки эксперта и страницы эксперта.
 *
 * @package AutoExpert
 */

/* ========================================================================
   Карточка эксперта под статьёй
   ======================================================================== */

.ae-expert-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 28px 32px;
    margin: 40px 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease;
}

.ae-expert-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.ae-expert-card-avatar {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ae-expert-card-avatar img,
.ae-expert-card-avatar svg {
    width: 80px;
    height: 80px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.ae-expert-card-body {
    flex: 1;
    min-width: 200px;
}

.ae-expert-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.ae-expert-card-name {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
    line-height: 1.3;
}

.ae-expert-card-name a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.ae-expert-card-name a:hover {
    color: #2563eb;
}

.ae-expert-card-position {
    font-size: 14px;
    color: #6b7280;
    font-weight: 400;
}

.ae-expert-card-description {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    margin: 8px 0 0;
}

.ae-expert-card-experience {
    font-size: 13px;
    color: #6b7280;
    margin: 6px 0 0;
    font-weight: 500;
}

.ae-expert-card-specializations {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.ae-expert-card-specialization {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    line-height: 1.4;
}

.ae-expert-card-footer {
    width: 100%;
    margin-top: 4px;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.ae-expert-card-label {
    font-size: 12px;
    color: #9ca3af;
    font-style: italic;
}

.ae-expert-card-date {
    font-size: 12px;
    color: #9ca3af;
}

/* ========================================================================
   Страница эксперта
   ======================================================================== */

.ae-expert-page {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.ae-expert-page-hero {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 36px 40px;
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    align-items: center;
}

.ae-expert-page-photo {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ae-expert-page-photo img,
.ae-expert-page-photo svg {
    width: 120px;
    height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.ae-expert-page-main {
    flex: 1;
    min-width: 250px;
}

.ae-expert-page-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
    line-height: 1.3;
}

.ae-expert-page-position {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 10px;
}

.ae-expert-page-short-desc {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.7;
    margin: 0;
}

.ae-expert-page-content {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.ae-expert-page-bio {
    flex: 1;
    min-width: 300px;
}

.ae-expert-page-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 24px 28px;
    margin-bottom: 20px;
    border: 1px solid #f3f4f6;
}

.ae-expert-page-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f3f4f6;
}

.ae-expert-page-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.7;
}

.ae-expert-page-text p {
    margin: 0 0 8px;
}

.ae-expert-page-text p:last-child {
    margin-bottom: 0;
}

.ae-expert-page-full-desc {
    font-size: 15px;
    color: #4b5563;
    line-height: 1.8;
}

.ae-expert-page-full-desc p {
    margin: 0 0 10px;
}

.ae-expert-page-full-desc p:last-child {
    margin-bottom: 0;
}

.ae-expert-page-specializations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ae-expert-page-spec-badge {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
}

.ae-expert-page-sidebar {
    flex: 0 0 240px;
    min-width: 200px;
}

.ae-expert-page-stats {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: 20px;
    border: 1px solid #f3f4f6;
    position: sticky;
    top: 20px;
}

.ae-expert-page-stat {
    text-align: center;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.ae-expert-page-stat:last-child {
    border-bottom: none;
}

.ae-stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
}

.ae-stat-label {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ae-expert-page-articles {
    margin-top: 28px;
}

.ae-expert-page-posts-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

.ae-expert-page-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ae-expert-page-post-item {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 18px 22px;
    margin-bottom: 12px;
    transition: box-shadow 0.2s ease;
}

.ae-expert-page-post-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.ae-expert-page-post-link {
    font-size: 16px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.ae-expert-page-post-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.ae-expert-page-post-date {
    font-size: 13px;
    color: #9ca3af;
}

.ae-expert-page-no-posts {
    color: #6b7280;
    font-size: 15px;
    text-align: center;
    padding: 30px;
    background: #f9fafb;
    border-radius: 12px;
}

/* ========================================================================
   Пагинация на странице эксперта
   ======================================================================== */

.ae-expert-page-pagination {
    margin-top: 28px;
    text-align: center;
}

.ae-expert-page-pagination ul.page-numbers {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ae-expert-page-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ae-expert-page-pagination .page-numbers:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #1a1a2e;
}

.ae-expert-page-pagination .page-numbers.current {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    cursor: default;
}

.ae-expert-page-pagination .page-numbers.prev,
.ae-expert-page-pagination .page-numbers.next {
    padding: 0 14px;
    font-weight: 600;
}

.ae-expert-page-pagination .page-numbers.dots {
    border: none;
    background: none;
    color: #9ca3af;
    cursor: default;
}

/* Админ-панель */
.ae-admin-photo {
    border-radius: 50%;
    object-fit: cover;
    width: 50px;
    height: 50px;
}

.ae-avatar-svg {
    width: 50px;
    height: 50px;
    display: block;
    border-radius: 50%;
}

/* ========================================================================
   Адаптивность
   ======================================================================== */

@media (max-width: 768px) {
    .ae-expert-page-sidebar {
        flex: 1 1 100%;
    }
}

@media (max-width: 600px) {
    .ae-expert-card {
        padding: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ae-expert-card-header {
        justify-content: center;
    }

    .ae-expert-card-footer {
        flex-direction: column;
        text-align: center;
    }

    .ae-expert-card-specializations {
        justify-content: center;
    }

    .ae-expert-page-hero {
        padding: 24px 20px;
        flex-direction: column;
        text-align: center;
    }

    .ae-expert-page-specializations {
        justify-content: center;
    }
}