/**
 * Smart Bio Modal Pro - Main CSS
 * نمایش زیبا و حرفه‌ای Modal بیوگرافی
 */

/* ========================================
   1. Overlay (پس‌زمینه تیره)
======================================== */

.smart-bio-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.smart-bio-modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* ========================================
   2. Modal Container (باکس اصلی)
======================================== */

.smart-bio-modal-container {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
                opacity 0.4s ease;
}

.smart-bio-modal-overlay.active .smart-bio-modal-container {
    transform: scale(1);
    opacity: 1;
}

/* انیمیشن‌های مختلف */
.smart-bio-modal-overlay.animation-slide-up .smart-bio-modal-container {
    transform: translateY(100px);
}

.smart-bio-modal-overlay.animation-slide-up.active .smart-bio-modal-container {
    transform: translateY(0);
}

.smart-bio-modal-overlay.animation-zoom .smart-bio-modal-container {
    transform: scale(0.5);
}

.smart-bio-modal-overlay.animation-zoom.active .smart-bio-modal-container {
    transform: scale(1);
}

.smart-bio-modal-overlay.animation-flip .smart-bio-modal-container {
    transform: perspective(1000px) rotateX(-90deg);
}

.smart-bio-modal-overlay.animation-flip.active .smart-bio-modal-container {
    transform: perspective(1000px) rotateX(0);
}

/* ========================================
   3. دکمه بستن
======================================== */

.smart-bio-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.smart-bio-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

.smart-bio-modal-close svg {
    width: 20px;
    height: 20px;
}

/* ========================================
   4. Progress Bar
======================================== */

.smart-bio-modal-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 20px 20px 0 0;
    overflow: hidden;
}

.smart-bio-modal-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    transition: width linear;
    transform-origin: left;
}

/* ========================================
   5. محتوای Modal
======================================== */

.smart-bio-modal-content {
    text-align: center;
    padding-top: 10px;
}

/* تصویر پروفایل */
.smart-bio-modal-image {
    margin-bottom: 25px;
}

.smart-bio-modal-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.6s ease 0.2s both;
}

/* عنوان */
.smart-bio-modal-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
    animation: fadeInUp 0.6s ease 0.3s both;
}

/* متن */
.smart-bio-modal-text {
    font-size: 16px;
    line-height: 1.8;
    margin: 20px 0;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.smart-bio-modal-text p {
    margin: 0 0 15px 0;
}

.smart-bio-modal-text p:last-child {
    margin-bottom: 0;
}

/* ========================================
   6. لینک‌های اجتماعی
======================================== */

.smart-bio-modal-social {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.smart-bio-modal-social .social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transition: all 0.3s ease;
    text-decoration: none;
}

.smart-bio-modal-social .social-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.smart-bio-modal-social .social-link.linkedin:hover {
    background: #0077b5;
    color: white;
}

.smart-bio-modal-social .social-link.twitter:hover {
    background: #1da1f2;
    color: white;
}

.smart-bio-modal-social .social-link.github:hover {
    background: #333;
    color: white;
}

.smart-bio-modal-social .social-link.email:hover {
    background: #ea4335;
    color: white;
}

/* ========================================
   7. انیمیشن‌های کمکی
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   8. رسپانسیو - موبایل
======================================== */

@media (max-width: 768px) {
    .smart-bio-modal-container {
        width: 95%;
        padding: 30px 20px;
        max-height: 90vh;
    }
    
    .smart-bio-modal-image img {
        width: 100px;
        height: 100px;
    }
    
    .smart-bio-modal-title {
        font-size: 22px;
    }
    
    .smart-bio-modal-text {
        font-size: 15px;
    }
    
    .smart-bio-modal-social {
        gap: 10px;
    }
    
    .smart-bio-modal-social .social-link {
        width: 40px;
        height: 40px;
    }
    
    .smart-bio-modal-close {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .smart-bio-modal-container {
        padding: 25px 15px;
        border-radius: 15px;
    }
    
    .smart-bio-modal-title {
        font-size: 20px;
    }
    
    .smart-bio-modal-text {
        font-size: 14px;
        line-height: 1.6;
    }
}

/* ========================================
   9. Scrollbar سفارشی
======================================== */

.smart-bio-modal-container::-webkit-scrollbar {
    width: 8px;
}

.smart-bio-modal-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.smart-bio-modal-container::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

.smart-bio-modal-container::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

/* ========================================
   10. Dark Mode Support (اختیاری)
======================================== */

@media (prefers-color-scheme: dark) {
    .smart-bio-modal-container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .smart-bio-modal-close {
        background: rgba(255, 255, 255, 0.1);
    }
    
    .smart-bio-modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .smart-bio-modal-social .social-link {
        background: rgba(255, 255, 255, 0.1);
        color: #ffffff;
    }
}

/* ========================================
   11. Print Styles
======================================== */

@media print {
    .smart-bio-modal-overlay {
        display: none !important;
    }
}

/* ========================================
   12. محتوای SEO (مخفی)
======================================== */

.smart-bio-modal-seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ========================================
   13. RTL Support
======================================== */

body.rtl .smart-bio-modal-close {
    right: auto;
    left: 15px;
}

@media (max-width: 768px) {
    body.rtl .smart-bio-modal-close {
        left: 10px;
    }
}

/* ========================================
   14. Accessibility
======================================== */

.smart-bio-modal-close:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

.smart-bio-modal-social .social-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* کاهش انیمیشن برای کاربران با حساسیت حرکتی */
@media (prefers-reduced-motion: reduce) {
    .smart-bio-modal-overlay,
    .smart-bio-modal-container,
    .smart-bio-modal-close,
    .smart-bio-modal-social .social-link {
        transition: none;
        animation: none;
    }
}
