/**
 * PCM Author Box Styles
 * طراحی مدرن با Gradient و Shadow برای بخش درباره نویسنده
 * 
 * @package PillarClusterManager
 * @since 2.3.3
 */

/* ==================== Main Container ==================== */
.pcm-author-box {
    margin: 50px 0 30px;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    direction: rtl;
    text-align: right;
    clear: both;
    overflow: hidden;
}

.pcm-author-box-inner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.pcm-author-box-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 18px;
    z-index: 1;
}

.pcm-author-box-inner > * {
    position: relative;
    z-index: 2;
}

/* ==================== Header Section ==================== */
.pcm-author-box-header {
    display: flex;
    align-items: flex-start;
    gap: 25px;
    padding: 30px 30px 20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 18px 18px 0 0;
}

.pcm-author-avatar {
    flex-shrink: 0;
}

.pcm-author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pcm-author-avatar img:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.pcm-author-info {
    flex: 1;
    min-width: 0;
}

.pcm-author-name {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.pcm-about-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 8px;
}

.pcm-author-job-title {
    margin: 0 0 15px;
    font-size: 18px;
    font-weight: 500;
    color: #764ba2;
    line-height: 1.4;
}

.pcm-author-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 12px;
}

.pcm-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: rgba(102, 126, 234, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.pcm-meta-item:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.pcm-meta-item i {
    color: #667eea;
    font-size: 13px;
}

/* ==================== Biography Section ==================== */
.pcm-author-biography {
    padding: 25px 30px;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    background: #fff;
}

.pcm-author-biography p {
    margin: 0 0 15px;
}

.pcm-author-biography p:last-child {
    margin-bottom: 0;
}

/* ==================== Expertise Section ==================== */
.pcm-author-expertise {
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.pcm-author-expertise h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcm-author-expertise p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: #444;
}

/* ==================== Skills Section ==================== */
.pcm-author-skills {
    padding: 20px 30px;
    background: #fff;
}

.pcm-author-skills h4 {
    margin: 0 0 15px;
    font-size: 16px;
    font-weight: 700;
    color: #764ba2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcm-skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pcm-skill-tag {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
}

.pcm-skill-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.35);
}

/* ==================== Achievements Section ==================== */
.pcm-author-achievements {
    padding: 20px 30px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 193, 7, 0.1) 100%);
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.pcm-author-achievements h4 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #f59e0b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pcm-author-achievements p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

/* ==================== Footer Section ==================== */
.pcm-author-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 0 0 18px 18px;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

/* ==================== Social Links ==================== */
.pcm-author-social {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pcm-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pcm-social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.pcm-social-link i {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.pcm-social-link:hover {
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.pcm-social-link:hover::before {
    opacity: 1;
}

.pcm-social-link:hover i {
    color: #fff;
}

/* رنگ‌بندی اختصاصی هر شبکه */
.pcm-phone:hover { background: #10b981; }
.pcm-whatsapp:hover { background: #25D366; }
.pcm-telegram:hover { background: #0088cc; }
.pcm-eitaa:hover { background: #2196F3; }
.pcm-linkedin:hover { background: #0077b5; }
.pcm-twitter:hover { background: #1da1f2; }
.pcm-instagram:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.pcm-github:hover { background: #333; }
.pcm-website:hover { background: #667eea; }
.pcm-email:hover { background: #d63638; }

.pcm-phone:hover::before,
.pcm-whatsapp:hover::before,
.pcm-telegram:hover::before,
.pcm-eitaa:hover::before,
.pcm-linkedin:hover::before,
.pcm-twitter:hover::before,
.pcm-instagram:hover::before,
.pcm-github:hover::before,
.pcm-website:hover::before,
.pcm-email:hover::before {
    opacity: 0;
}

/* ==================== View All Posts Button ==================== */
.pcm-author-posts-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 25px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.pcm-author-posts-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    color: #fff;
}

.pcm-author-posts-link i {
    transition: transform 0.3s ease;
}

.pcm-author-posts-link:hover i {
    transform: translateX(-5px);
}

/* ==================== Responsive Design ==================== */

/* تبلت */
@media (max-width: 768px) {
    .pcm-author-box-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 25px 20px 15px;
    }
    
    .pcm-author-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .pcm-author-info {
        text-align: center;
    }
    
    .pcm-author-name {
        font-size: 22px;
    }
    
    .pcm-author-job-title {
        font-size: 16px;
    }
    
    .pcm-author-meta {
        justify-content: center;
    }
    
    .pcm-author-biography,
    .pcm-author-expertise,
    .pcm-author-skills,
    .pcm-author-achievements {
        padding: 20px 20px;
    }
    
    .pcm-author-footer {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }
    
    .pcm-author-social {
        justify-content: center;
    }
}

/* موبایل */
@media (max-width: 480px) {
    .pcm-author-box {
        margin: 30px 0 20px;
    }
    
    .pcm-author-box-header {
        padding: 20px 15px 10px;
    }
    
    .pcm-author-avatar img {
        width: 85px;
        height: 85px;
    }
    
    .pcm-author-name {
        font-size: 20px;
    }
    
    .pcm-about-label {
        font-size: 12px;
        display: block;
        margin-bottom: 5px;
    }
    
    .pcm-author-job-title {
        font-size: 15px;
    }
    
    .pcm-author-biography {
        font-size: 15px;
        padding: 15px;
    }
    
    .pcm-author-expertise,
    .pcm-author-skills,
    .pcm-author-achievements {
        padding: 15px;
    }
    
    .pcm-author-expertise h4,
    .pcm-author-skills h4,
    .pcm-author-achievements h4 {
        font-size: 15px;
    }
    
    .pcm-skill-tag {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .pcm-author-footer {
        padding: 15px;
    }
    
    .pcm-social-link {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }
    
    .pcm-author-posts-link {
        font-size: 14px;
        padding: 10px 20px;
        width: 100%;
        justify-content: center;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .pcm-author-box {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .pcm-social-link,
    .pcm-author-posts-link {
        display: none;
    }
}

/* ==================== Dark Mode Support (Optional) ==================== */
@media (prefers-color-scheme: dark) {
    .pcm-author-box-inner::before {
        background: #1a1a2e;
    }
    
    .pcm-author-name {
        color: #fff;
    }
    
    .pcm-author-biography {
        background: #1a1a2e;
        color: #ddd;
    }
    
    .pcm-author-skills {
        background: #1a1a2e;
    }
}

/* ==================== Animation ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pcm-author-box {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== Accessibility ==================== */
.pcm-author-box *:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.pcm-social-link:focus,
.pcm-author-posts-link:focus {
    outline: 3px solid #667eea;
}
