/* =========================================
   أيقونات التواصل العائمة
   ========================================= */

.floating-icons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    direction: ltr;
}

.floating-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.floating-icon:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ===== ألوان الأيقونات ===== */
.floating-icon.whatsapp {
    background: #25D366;
}

.floating-icon.whatsapp:hover {
    background: #1da851;
    box-shadow: 0 8px 35px rgba(37, 211, 102, 0.4);
}

.floating-icon.phone {
    background: #223970;
}

.floating-icon.phone:hover {
    background: #1a2a4a;
    box-shadow: 0 8px 35px rgba(34, 57, 112, 0.4);
}

.floating-icon.email {
    background: #EA4335;
}

.floating-icon.email:hover {
    background: #d33426;
    box-shadow: 0 8px 35px rgba(234, 67, 53, 0.4);
}

.floating-icon.linkedin {
    background: #0A66C2;
}

.floating-icon.linkedin:hover {
    background: #084a8f;
    box-shadow: 0 8px 35px rgba(10, 102, 194, 0.4);
}

/* ===== تلميح الأدوات (Tooltip) ===== */
.floating-icon .tooltip {
    position: absolute;
    right: 65px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: 'Almarai', 'Rubik', sans-serif;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.floating-icon .tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.85);
}

.floating-icon:hover .tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* =========================================
   استجابة للشاشات الصغيرة
   ========================================= */

@media (max-width: 768px) {
    .floating-icons {
        bottom: 20px;
        right: 15px;
        gap: 10px;
    }

    .floating-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .floating-icon .tooltip {
        right: 55px;
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .floating-icon .tooltip::after {
        right: -5px;
        border-width: 5px;
    }
}

@media (max-width: 480px) {
    .floating-icons {
        bottom: 15px;
        right: 10px;
        gap: 8px;
    }

    .floating-icon {
        width: 42px;
        height: 42px;
        font-size: 1rem;
        border-width: 1.5px;
    }

    .floating-icon .tooltip {
        right: 48px;
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    .floating-icon .tooltip::after {
        right: -4px;
        border-width: 4px;
    }
}

/* ===== دعم وضع RTL ===== */
html[dir="rtl"] .floating-icons {
    right: auto;
    left: 30px;
}

html[dir="rtl"] .floating-icon .tooltip {
    right: auto;
    left: 65px;
}

html[dir="rtl"] .floating-icon .tooltip::after {
    right: auto;
    left: -6px;
    border-right-color: transparent;
    border-left-color: rgba(0, 0, 0, 0.85);
}

@media (max-width: 768px) {
    html[dir="rtl"] .floating-icon .tooltip {
        left: 55px;
    }
    html[dir="rtl"] .floating-icon .tooltip::after {
        left: -5px;
        border-left-color: rgba(0, 0, 0, 0.85);
        border-right-color: transparent;
    }
}

@media (max-width: 480px) {
    html[dir="rtl"] .floating-icon .tooltip {
        left: 48px;
    }
    html[dir="rtl"] .floating-icon .tooltip::after {
        left: -4px;
    }
}
