/* =========================================================
   Experts carousel (home page + shared cards)
   ========================================================= */
.experts {
    background: var(--bg);
    overflow: hidden;
}

.experts-shell {
    position: relative;
}

.experts-viewport {
    overflow: hidden;
    border-radius: calc(var(--radius) + 6px);
    /* Room for hover shadows without clipping them */
    padding: 6px;
    margin: -6px;
}

.experts-track {
    display: flex;
    gap: 22px;
    transition: transform .65s var(--ease);
    will-change: transform;
}

.expert-card {
    flex: 0 0 calc((100% - 44px) / 3);
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}

.expert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: transparent;
}

.expert-photo {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, var(--primary-pale), var(--accent-pale));
    overflow: hidden;
}

.expert-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .6s var(--ease);
}

.expert-card:hover .expert-photo img {
    transform: scale(1.06);
}

.expert-initial {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    font-weight: 800;
    color: var(--primary);
    opacity: .38;
}

.expert-photo-tag {
    position: absolute;
    inset: auto 0 0 0;
    padding: 34px 16px 12px;
    background: linear-gradient(to top, rgba(23, 36, 32, .74), transparent);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}

.expert-card:hover .expert-photo-tag,
.expert-photo:focus-visible .expert-photo-tag {
    opacity: 1;
    transform: translateY(0);
}

.expert-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 18px 20px;
    flex: 1;
}

.expert-body h3 {
    font-size: 16.5px;
    line-height: 1.6;
    margin: 0;
}

.expert-body h3 a {
    color: var(--ink);
}

.expert-body h3 a:hover {
    color: var(--primary);
}

.expert-role {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.expert-bio {
    font-size: 13px;
    line-height: 1.85;
    color: var(--ink-soft);
    margin: 2px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
}

.expert-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
}

.expert-actions .btn {
    flex: 1;
    padding: 10px 10px;
    font-size: 13px;
    justify-content: center;
}

/* Controls */
.experts-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.experts-arrow {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .25s, color .25s, border-color .25s, transform .25s;
}

.experts-arrow svg {
    width: 20px;
    height: 20px;
}

.experts-arrow:hover:not(:disabled) {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.experts-arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.experts-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-faint);
    min-width: 104px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.experts-more {
    text-align: center;
    margin-top: 26px;
}

/* Tablet: 2 cards per view */
@media (max-width: 991.98px) {
    .expert-card {
        flex-basis: calc((100% - 22px) / 2);
    }
}

/* Mobile: 1 card per view */
@media (max-width: 639.98px) {
    .expert-card {
        flex-basis: 100%;
    }

    .experts-track {
        gap: 16px;
    }

    .expert-body {
        padding: 16px;
    }

    .expert-bio {
        min-height: 0;
    }
}
