/* ==========================================
   استایل‌های پایه کارت کارشناس (برای شورت‌کدها و کارت شناور)
   ========================================== */
.expert-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'IRANYekan', 'IRANSans', Tahoma, sans-serif;
}
.expert-card:hover {
    box-shadow: 0 15px 50px rgba(0, 172, 193, 0.25);
    transform: translateY(-5px);
}

/* پروفایل کارشناس - عکس راست، نام چپ */
.expert-profile {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 5px;
    padding: 15px;
}
.expert-image-wrap {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #00ACC1;
    box-shadow: 0 5px 20px rgba(0, 172, 193, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.expert-image-wrap:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(0, 172, 193, 0.45);
}
.expert-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.expert-info {
    flex: 1;
    text-align: right;
}
.expert-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}
.expert-department {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    padding-top: 6px;
    border-top: 2px dashed #e0e0e0;
}

/* آیتم‌های ارتباطی قدیمی */
.expert-item {
    margin: 7px 0;
    padding: 14px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}
.expert-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}
.expert-label {
    font-weight: 700;
    color: #555;
    min-width: 90px;
    font-size: 14px;
}
.expert-value {
    color: #333;
    flex: 1;
    font-weight: 600;
    font-size: 15px;
}
.expert-call-btn {
    background: #2fa434;
    padding-top: 7px;
    font-size: 30px;
    color: #fff !important;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.35);
}
.expert-call-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}
.expert-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    width: 100%;
    padding: 4px 0;
    transition: all 0.3s ease;
}
.expert-link:hover {
    color: #00ACC1;
}
.expert-link-icon {
    font-size: 22px;
    flex-shrink: 0;
}
.expert-link-text {
    font-weight: 600;
    font-size: 14px;
}
.expert-item.expert-ai {
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
}

/* ==========================================
   استایل‌های اختصاصی برای شورت‌کد خطی (Inline Box)
   ========================================== */
.expert-inline-box {
    width: 100%;
    padding: 20px;
    direction: rtl;
    font-family: 'IRANYekan', 'IRANSans', Tahoma, sans-serif;
}

.expert-main-container {
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 25px;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: row; /* در دسکتاپ حتماً در یک خط */
    align-items: center;
    gap: 30px;
}

/* بخش پروفایل - نام، خط چین، عکس */
.expert-profile-section {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 280px;
    flex-shrink: 0;
}

.expert-info-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* در RTL یعنی راست‌چین */
    flex: 1; /* این باعث می‌شود خط چین کشیده شود */
}

.expert-name {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.expert-dashed-line {
    width: 100%;
    border-top: 2px dashed #e0e0e0;
    margin: 4px 0;
}

.expert-department {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-top: 4px;
}

/* بخش دکمه‌های ارتباطی */
.expert-buttons-section {
    flex: 1; /* فضای باقی‌مانده را پر می‌کند */
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: stretch;
}

.expert-contact-box {
    flex: 1; /* هر دکمه فضای مساوی می‌گیرد */
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.expert-contact-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.expert-contact-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
}

.expert-icon-phone {
    background: linear-gradient(135deg, #2fa434 0%, #4CAF50 100%);
    color: #fff;
}

.expert-icon-bale {
    background: linear-gradient(135deg, #48d4aa 0%, #2e3773 100%);
    color: #fff;
}

.expert-icon-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #fff;
}

.expert-icon-ai {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.expert-contact-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.expert-contact-label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.expert-contact-number {
    font-size: 15px;
    font-weight: 700;
    color: #00ACC1;
}

.expert-contact-box .expert-contact-details span {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.expert-call-action,
.expert-link-action {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.expert-call-action {
    background: #2fa434;
    color: #fff !important;
    box-shadow: 0 3px 12px rgba(47, 164, 52, 0.35);
}

.expert-call-action:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 6px 20px rgba(47, 164, 52, 0.5);
}

.expert-link-action {
    background: #f5f5f5;
    color: #333 !important;
}

.expert-link-action:hover {
    background: #00ACC1;
    color: #fff !important;
    transform: scale(1.1);
}

.expert-ai-box {
    background: linear-gradient(135deg, #f0f8ff 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
}

/* ==========================================
   حالت ریسپانسیو تبلت و موبایل
   ========================================== */
@media (max-width: 992px) {
    .expert-main-container {
        flex-direction: column; /* تغییر به حالت ستونی */
        gap: 20px;
        padding: 20px;
    }
    
    .expert-profile-section {
        width: 100%;
        min-width: unset;
        /* عکس و نام در یک ردیف باقی می‌مانند */
    }
    
    .expert-info-text {
        align-items: flex-start;
    }
    
    .expert-buttons-section {
        width: 100%;
        flex-direction: column; /* دکمه‌ها در موبایل زیر هم */
        gap: 10px;
    }
    
    .expert-contact-box {
        width: 100%;
        padding: 12px;
    }
    
    .expert-contact-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .expert-contact-box .expert-contact-details span {
        font-size: 12px !important;
    }
    
    .expert-call-action,
    .expert-link-action {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .expert-inline-box {
        padding: 15px;
    }
    
    .expert-main-container {
        border-radius: 16px;
    }
    
    .expert-profile-section {
        flex-direction: row; /* عکس و نام در موبایل هم در یک ردیف */
    }
    
    .expert-image-wrap {
        width: 80px;
        height: 80px;
    }
    
    .expert-name {
        font-size: 16px;
    }
    
    .expert-department {
        font-size: 12px;
    }
}

/* پرینت */
@media print {
    .expert-inline-box, .expert-card {
        display: none;
    }
}