/**
 * باکس نویسنده — صفحه خبر (فایل جدا برای deploy روی سرور)
 * نسخه: 20260520
 */
.author-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.15rem 1.35rem;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    background: linear-gradient(135deg, #faf8ff 0%, #f3f0ff 48%, #f8fafc 100%);
    border: 1px solid rgba(109, 40, 217, 0.12);
    box-shadow: 0 4px 20px rgba(109, 40, 217, 0.06);
    overflow: hidden;
    box-sizing: border-box;
}

.author-card__accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #8b5cf6, #6d28d9, #34d399);
    border-radius: 0 1rem 1rem 0;
    transition: width 0.3s ease;
}

.author-card__main {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    min-width: 0;
    flex: 1;
}

.author-card__avatar-wrap {
    flex-shrink: 0;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9, #34d399);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.author-card__avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    background: #fff;
}

.author-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.author-card__body {
    min-width: 0;
    text-align: right;
}

.author-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #6d28d9;
    background: rgba(109, 40, 217, 0.1);
    border-radius: 9999px;
}

.author-card__name {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e1b4b;
    line-height: 1.35;
}

.author-card__role {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.author-card__action {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(109, 40, 217, 0.28);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, gap 0.3s ease;
}

.author-card__action-text {
    white-space: nowrap;
}

.author-card__action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, background 0.3s ease;
}

a.author-card--linked {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        background 0.35s ease;
}

a.author-card--linked:hover,
a.author-card--linked:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(109, 40, 217, 0.35);
    background: linear-gradient(135deg, #ffffff 0%, #f5f0ff 55%, #ecfdf5 100%);
    box-shadow: 0 14px 40px rgba(109, 40, 217, 0.16), 0 0 0 1px rgba(109, 40, 217, 0.08);
    outline: none;
}

a.author-card--linked:hover .author-card__accent,
a.author-card--linked:focus-visible .author-card__accent {
    width: 7px;
}

a.author-card--linked:hover .author-card__avatar-wrap,
a.author-card--linked:focus-visible .author-card__avatar-wrap {
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(109, 40, 217, 0.25);
}

a.author-card--linked:hover .author-card__avatar img,
a.author-card--linked:focus-visible .author-card__avatar img {
    transform: scale(1.08);
}

a.author-card--linked:hover .author-card__name,
a.author-card--linked:focus-visible .author-card__name {
    color: #6d28d9;
}

a.author-card--linked:hover .author-card__role,
a.author-card--linked:focus-visible .author-card__role {
    color: #5b21b6;
}

a.author-card--linked:hover .author-card__badge,
a.author-card--linked:focus-visible .author-card__badge {
    background: rgba(109, 40, 217, 0.18);
}

a.author-card--linked:hover .author-card__action,
a.author-card--linked:focus-visible .author-card__action {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    gap: 0.75rem;
}

a.author-card--linked:hover .author-card__action-icon,
a.author-card--linked:focus-visible .author-card__action-icon {
    transform: translateX(-4px);
    background: rgba(255, 255, 255, 0.28);
}

a.author-card--linked:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .author-card,
    a.author-card--linked {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1.25rem 1rem;
    }

    .author-card__main {
        flex-direction: column;
        align-items: center;
    }

    .author-card__body {
        text-align: center;
    }

    .author-card__action {
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
    }
}
