
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DOCTOR HEADER CARD - REDESIGNED FROM SCRATCH (v2.0)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   
   🎨 هدر کارت پروفایل دکتر - بازنویسی کامل از صفر
   📋 مطابق کامل با: style-guide.md + design-principles.md
   
   @version 2.0.0
   @date 2025-11-09
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ═══════════════════════════════════════════════════════════════════
   1. MAIN CARD CONTAINER
   ═══════════════════════════════════════════════════════════════════ */

.doctor-header-card {
    background: var(--bg-component);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.doctor-header-card:hover {
    box-shadow: var(--shadow-lg);
}

/* ═══════════════════════════════════════════════════════════════════
   2. MAIN SECTION (Avatar + Info + Actions)
   ═══════════════════════════════════════════════════════════════════ */

.card-main-section {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-xl);
    padding: var(--spacing-2xl);
    position: relative; /* برای absolute positioning دکمه 3 نقطه */
}

/* ═══════════════════════════════════════════════════════════════════
   3. AVATAR & VERIFIED BADGE
   ═══════════════════════════════════════════════════════════════════ */

.doctor-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.doctor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gray-100);
    border: 3px solid var(--border-light);
    position: relative;
}

.doctor-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.verified-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 36px;
    height: 36px;
    background: var(--success);
    color: var(--text-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--bg-component);
    box-shadow: var(--shadow-sm);
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════════
   4. DOCTOR INFO MAIN
   ═══════════════════════════════════════════════════════════════════ */

.doctor-info-main {
    flex: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* نام و عنوان */
.doctor-name-section {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.professional-title {
    font-family: var(--font-primary);
    font-size: var(--font-lg);
    font-weight: var(--font-normal);
    color: var(--text-muted);
    line-height: var(--line-height-tight);
}

.doctor-name {
    font-family: var(--font-primary);
    font-size: var(--font-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: var(--line-height-tight);
    margin: 0;
}

/* تخصص‌ها */
.doctor-specialties {
    font-family: var(--font-primary);
    font-size: var(--font-base);
    color: var(--text-muted);
    line-height: var(--line-height-normal);
}

/* شماره نظام پزشکی */
.doctor-license {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-primary);
    font-size: var(--font-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-normal);
}

.license-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

/* شهر */
.doctor-city {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-family: var(--font-primary);
    font-size: var(--font-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-normal);
}

.city-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   5. STATS ROW - ULTRA PREMIUM DESIGN (Inspired by Airbnb + Stripe)
   ═══════════════════════════════════════════════════════════════════ */

.stats-row-wrapper {
    padding: 0 var(--spacing-2xl);
    margin-top: calc(-1 * var(--spacing-2xl)); /* Negative margin to pull it up */
}

.stats-row {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: var(--spacing-xl); /* 24px */
    padding: var(--spacing-lg); /* 16px */
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(221, 221, 221, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03),
                0 1px 2px rgba(0, 0, 0, 0.02);
    margin: var(--spacing-xl) 0;           
}

.stat-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-md); /* 12px */
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-md);
    border: 1px solid rgba(221, 221, 221, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    flex: 1;
    min-width: max-content;
    overflow: hidden;
}

/* Hover Effect - Glassmorphism */
.stat-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(221, 221, 221, 0.5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08),
                0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px) scale(1.02);
}

/* Icon Wrapper with Glow Effect */
.stat-icon-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stat-item:hover .stat-icon-wrapper {
    transform: rotate(5deg) scale(1.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* SVG Icons - Larger and More Prominent */
.stat-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.3s ease;
    z-index: 2;
    position: relative;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

/* Animated Glow Effect Behind Icons */
.stat-icon-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    filter: blur(12px);
}

.stat-item:hover .stat-icon-glow {
    opacity: 0.4;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.1);
    }
}

/* Gradient Glows for Each Stat Type */
.stat-icon-glow-gold {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.6) 0%, rgba(255, 165, 0, 0.3) 100%);
}

.stat-icon-glow-green {
    background: radial-gradient(circle, rgba(0, 201, 167, 0.6) 0%, rgba(0, 166, 153, 0.3) 100%);
}

.stat-icon-glow-purple {
    background: radial-gradient(circle, rgba(79, 70, 229, 0.6) 0%, rgba(124, 58, 237, 0.3) 100%);
}

/* Stat Content */
.stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

/* Stat Numbers - Bold and Premium */
.stat-number {
    font-family: var(--font-primary);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #000000 0%, #2d2d2d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
    transform: scale(1.05);
    letter-spacing: -0.03em;
}

/* Stat Labels - Elegant Typography */
.stat-label {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.2;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

.stat-item:hover .stat-label {
    color: var(--text-secondary);
}

/* Specific Stat Item Styling */
.stat-rating:hover {
    background: linear-gradient(135deg, rgba(255, 247, 230, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.stat-satisfaction:hover {
    background: linear-gradient(135deg, rgba(230, 247, 245, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.stat-bookings:hover {
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.9) 0%, rgba(255, 255, 255, 0.95) 100%);
}

/* Separator Line Between Stats (Optional Decorative Element) */
.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 40px;
    background: linear-gradient(
        to bottom,
        rgba(221, 221, 221, 0) 0%,
        rgba(221, 221, 221, 0.4) 50%,
        rgba(221, 221, 221, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stats-row:hover .stat-item:not(:last-child)::after {
    opacity: 1;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE - TABLET (max-width: 1024px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 1024px) {
    .stat-item {
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .stat-icon-wrapper {
        width: 42px;
        height: 42px;
    }

    .stat-icon {
        width: 24px;
        height: 24px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE - MOBILE (max-width: 768px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {
    .stats-row-wrapper {
        padding: 0 var(--spacing-xl);
        margin-top: 0;
    }

    .stat-item {
        flex: 1 1 33.333%;
        min-width: 0;
        gap: var(--spacing-xs);
        padding: var(--spacing-sm) var(--spacing-xs);
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .stat-icon-wrapper {
        width: 36px;
        height: 36px;
    }

    .stat-icon {
        width: 20px;
        height: 20px;
    }

    .stat-content {
        align-items: center;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 11px;
        white-space: nowrap;
    }

    /* No transform on mobile hover */
    .stat-item:hover {
        transform: none;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE - SMALL MOBILE (max-width: 412px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 412px) {
    .stat-item {
        gap: 2px;
        padding: var(--spacing-xs);
    }

    .stat-icon-wrapper {
        width: 30px;
        height: 30px;
    }

    .stat-icon {
        width: 16px;
        height: 16px;
    }

    .stat-number {
        font-size: 17px;
    }

    .stat-label {
        font-size: 9px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   6. DROPDOWN MENU (منوی 3 نقطه)
   ═══════════════════════════════════════════════════════════════════ */

.card-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.card-actions-desktop {
    display: flex;
}

/* Dropdown wrapper */
.dropdown-menu-wrapper {
    position: relative;
}

/* دکمه 3 نقطه */
.action-btn {
    width: 44px;
    height: 44px;
    min-height: 44px;
    min-width: 44px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: var(--font-primary);
    font-size: var(--font-base);
}

.action-btn:hover {
    background: var(--bg-component);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.action-btn i {
    font-size: 18px;
}


/* Dropdown menu - Override Bootstrap */
.doctor-header-card .dropdown-menu {
    position: absolute !important;
    top: calc(100% + var(--spacing-xs)) !important;
    left: 0 !important;
    display: block !important; /* Override Bootstrap display: none */
    background: var(--bg-component);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    padding: var(--spacing-xs) 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-base);
    z-index: 1;
}

.doctor-header-card .dropdown-menu-wrapper:hover .dropdown-menu,
.doctor-header-card .dropdown-menu-wrapper .action-btn[aria-expanded="true"] ~ .dropdown-menu,
.doctor-header-card .dropdown-menu-wrapper.is-open .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Dropdown items */
.doctor-header-card .dropdown-item {
    width: 100%;
    display: flex !important; /* Override inline style */
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: transparent;
    border: none;
    font-family: var(--font-primary);
    font-size: var(--font-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: right;
}

.doctor-header-card .dropdown-item:hover {
    background: var(--bg-hover);
}

.doctor-header-card .dropdown-item i {
    display: inline-block !important; /* اطمینان از نمایش آیکون */
    font-size: 16px;
    color: var(--text-muted);
    width: 20px;
    flex-shrink: 0;
}

.doctor-header-card .dropdown-item span {
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════
   7. INFO SECTION (ساده‌تر و تمیزتر)
   ═══════════════════════════════════════════════════════════════════ */

.card-info-section {
    padding: var(--spacing-lg) var(--spacing-2xl);
    border-top: 1px solid var(--border-light);
    background: var(--bg-component);
}

.info-items {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-lg);
    font-family: var(--font-primary);
}

.info-item {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-sm);
    color: var(--text-secondary);
    line-height: var(--line-height-normal);
}

.info-icon {
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    flex-shrink: 0;
}

/* مشاوره آنلاین - با رنگ سبز */
.info-online {
    color: var(--success-dark);
}

.info-online .info-icon {
    fill: var(--success);
}

/* جداکننده بین آیتم‌ها */
.info-item:not(:last-child)::after {
    content: '•';
    margin-right: var(--spacing-lg);
    color: var(--border-default);
    font-weight: var(--font-bold);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   9. RESPONSIVE - TABLET (max-width: 1024px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 1024px) {
    .doctor-avatar {
        width: 100px;
        height: 100px;
    }

    .doctor-name {
        font-size: var(--font-2xl);
    }

    .verified-badge {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   10. RESPONSIVE - MOBILE (max-width: 768px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 768px) {
    /* Layout تغییر به عمودی */
    .card-main-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--spacing-xl);
        gap: var(--spacing-lg);
    }

    /* Avatar کوچکتر و گرد */
    .doctor-avatar {
        width: 100px;
        height: 100px;
        border-radius: var(--radius-full); /* گرد کامل در موبایل */
    }

    .verified-badge {
        width: 30px;
        height: 30px;
        font-size: 13px;
        border-width: 3px;
    }

    /* اطلاعات وسط‌چین */
    .doctor-info-main {
        align-items: center;
        text-align: center;
    }

    .doctor-name-section {
        align-items: center;
    }

    .doctor-name {
        font-size: var(--font-2xl);
    }

    .professional-title {
        font-size: var(--font-base);
    }

    /* دکمه 3 نقطه در موبایل */
    .card-actions-desktop {
        position: absolute;
        top: var(--spacing-md);
        left: var(--spacing-md);
    }

}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   11. RESPONSIVE - SMALL MOBILE (max-width: 412px)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media (max-width: 412px) {
    .card-main-section {
        padding: var(--spacing-lg);
    }

    .doctor-avatar {
        width: 90px;
        height: 90px;
        border-radius: var(--radius-full); /* گرد کامل در موبایل کوچک */
    }

    .doctor-name {
        font-size: var(--font-xl);
    }

    .professional-title {
        font-size: var(--font-sm);
    }

    .info-item {
        font-size: var(--font-xs);
    }

    .card-info-section {
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   12. ACCESSIBILITY - TOUCH TARGETS & FOCUS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Touch targets حداقل 44×44 */
@media (hover: none) and (pointer: coarse) {
    .action-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .badge {
        min-height: 44px;
        padding: var(--spacing-md);
    }
}

/* Focus states */
.action-btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.action-btn:focus:not(:focus-visible) {
    outline: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   END OF DOCTOR HEADER CARD STYLES
