:root {
    --vg-gradient:linear-gradient(135deg, #25D366, #128C7E); 
    --primary-gradient: linear-gradient(135deg, #007bff, #0056b3);
    --secondary-gradient: linear-gradient(135deg, #00C2FF, #007bff);
    --voip-gradient: linear-gradient(135deg, #2b6cb0, #68d391); /* گرادیان ترکیبی آبی و سبز */
    --text-primary-gradient: #007bff;
    --bg-light: #f8f9fa;
    --bg-dark: #212529;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --whatsapp: #25D366;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}


.contact-widget {
    all: initial; /* ایزوله کردن ویجت از استایل‌های والد */
    direction: rtl; /* اطمینان از جهت‌گیری راست به چپ */
    font-family: 'Heebo', 'Jost', sans-serif;
    position: fixed;
    bottom: 45px;
    right: 45px;
    z-index: 1000;
}

.widget-button {
    width: 70px;
    height: 70px;
    background: var(--vg-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    visibility: visible; /* همیشه قابل مشاهده */
    opacity: 1; /* همیشه کاملاً نمایش داده شود */
}

.widget-button:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 24px rgba(0, 123, 255, 0.3);
}

.widget-button::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.widget-button:hover::after {
    opacity: 1;
}

.widget-panel {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 300px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    direction: rtl; /* جهت‌گیری راست به چپ برای پنل */
}

.widget-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.panel-header {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.panel-header i {
    font-size: 24px;
    color: var(--text-primary-gradient);
    margin-left: 10px; /* حفظ فاصله مشابه فایل اولیه */
}

.panel-header h3 {
    color: var(--bg-dark);
    font-size: 1.3rem;
    font-weight: 600;
}

.contact-option {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 12px;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    direction: rtl; /* جهت‌گیری راست به چپ برای گزینه‌ها */
}

.contact-option:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateX(-5px); /* شیفت به چپ هنگام هاور */
}

.contact-option:hover .option-icon {
    background: white;
    color: var(--text-primary-gradient);
}

.contact-option:hover .option-arrow {
    transform: translateX(5px); /* حرکت فلش به راست برای هماهنگی با RTL */
    color: white;
}

.option-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-left: 12px; /* فاصله برای نزدیک‌تر شدن به لبه راست */
    transition: var(--transition);
}

.option-info {
    flex: 1;
    text-align: right; /* متن راست‌چین برای RTL */
    margin-right: 6px; /* فاصله برای جلوگیری از چسبیدن به آیکون */
}

.option-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px; /* فاصله بین عنوان و توضیحات */
}

.option-desc {
    font-size: 0.85rem;
    opacity: 0.7;
}

.option-arrow {
    color: var(--bg-dark);
    font-size: 14px;
    transition: var(--transition);
    margin-left: 3px; /* فاصله برای هماهنگی با فایل اولیه */
}

.whatsapp-option .option-icon {
    background: var(--whatsapp);
}

.whatsapp-option:hover {
    background: var(--whatsapp);
}

.whatsapp-option:hover .option-icon {
    background: white;
    color: var(--whatsapp);
}

.voip-option .option-icon {
    background: var(--voip-gradient);
}

.voip-option:hover {
    background: var(--voip-gradient);
    color: white;
}

.voip-option:hover .option-icon {
    background: white;
    color: #2b6cb0; /* رنگ آبی متوسط برای آیکون هنگام هاور */
}

.contact-option:focus {
    outline: 2px solid var(--text-primary-gradient);
    outline-offset: 2px;
}

/* ریسپانسیو برای تبلت‌ها و موبایل‌ها */
@media (max-width: 768px) {
    .widget-panel {
        width: 260px;
    }

    .contact-widget {
        bottom: 45px;
        right: 45px;
    }

    .widget-button {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    .widget-panel {
        bottom: 80px;
    }

    .panel-header h3 {
        font-size: 1.1rem;
    }

    .panel-header i {
        margin-right: 6px; /* فاصله کمتر برای تبلت */
    }

    .option-title {
        font-size: 1rem;
    }

    .option-desc {
        font-size: 0.75rem;
    }

    .option-icon {
        margin-right: 8px; /* فاصله کمتر برای تبلت */
    }

    .option-info {
        margin-right: 4px; /* فاصله کمتر برای تبلت */
    }

    .option-arrow {
        margin-left: 2px;
    }

    .contact-option {
        margin-bottom: 10px;
    }
}

/* ریسپانسیو برای موبایل‌های کوچک */
@media (max-width: 576px) {
    .widget-panel {
        width: 220px;
        padding: 15px;
    }

    .contact-widget {
        bottom: 45px;
        right: 45px;
    }

    .widget-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .widget-panel {
        bottom: 70px;
    }

    .panel-header i {
        font-size: 20px;
        margin-right: 5px; /* فاصله کمتر برای موبایل */
    }

    .panel-header h3 {
        font-size: 1rem;
    }

    .option-icon {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin-right: 6px; /* فاصله کمتر برای موبایل */
    }

    .option-info {
        margin-right: 3px; /* فاصله کمتر برای موبایل */
    }

    .option-title {
        font-size: 0.9rem;
    }

    .option-desc {
        font-size: 0.7rem;
    }

    .option-arrow {
        font-size: 12px;
        margin-left: 2px;
    }

    .contact-option {
        margin-bottom: 8px;
    }
}