/* Enhanced Social Media Icons and Boxes - أيقونات ومربعات التواصل الاجتماعي المحسنة */
/* ملف CSS محسن ومتقدم لأيقونات التواصل الاجتماعي */

/* ===== متغيرات الألوان المحسنة ===== */
:root {
    --social-facebook: #1877f2;
    --social-instagram: #e4405f;
    --social-twitter: #1da1f2;
    --social-location: #34a853;
    --social-phone: #ea4335;
    --social-email: #fbbc04;
    
    --social-glow-primary: rgba(168, 212, 154, 0.6);
    --social-glow-secondary: rgba(244, 162, 97, 0.6);
    --social-glow-accent: rgba(231, 111, 81, 0.6);
    
    --social-shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
    --social-shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.15);
    --social-shadow-heavy: 0 15px 35px rgba(0, 0, 0, 0.2);
    --social-shadow-glow: 0 0 20px rgba(168, 212, 154, 0.3);
}

/* ===== تصميم أساسي محسن لأيقونات التواصل الاجتماعي ===== */
.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 25px;
    padding: 0 10px;
}

/* ===== تصميم الأيقونات فقط ===== */
.social-links:has(.social-icon-only) {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.social-link-item.social-icon-only {
    width: 70px;
    height: 70px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link-item.social-icon-only a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.social-link-item.social-icon-only i {
    font-size: 2.2rem;
    width: auto;
    height: auto;
    background: none;
    border: none;
    margin: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== تأثيرات hover للأيقونات فقط ===== */
.social-link-item.social-icon-only:hover {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(168, 212, 154, 0.3),
        0 0 25px rgba(168, 212, 154, 0.2);
}

.social-link-item.social-icon-only:hover i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 15px currentColor) brightness(1.2);
}

.social-link-item.social-icon-only:active {
    transform: translateY(-4px) scale(1.1);
    transition: all 0.1s ease;
}

.social-link-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px 30px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.05) 100%);
    border-radius: 25px;
    border: 2px solid rgba(168, 212, 154, 0.2);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
    perspective: 1000px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(168, 212, 154, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* ===== خلفية متدرجة متقدمة ===== */
.social-link-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(168, 212, 154, 0.1) 0%, 
        rgba(244, 162, 97, 0.1) 50%, 
        rgba(231, 111, 81, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

.social-link-item:hover::before {
    opacity: 1;
}

/* ===== تأثيرات الحدود المتوهجة ===== */
.social-link-item::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--social-glow-primary), 
        var(--social-glow-secondary), 
        var(--social-glow-accent), 
        var(--social-glow-primary));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.6s ease;
    background-size: 400% 400%;
    animation: borderGlow 3s ease-in-out infinite;
}

.social-link-item:hover::after {
    opacity: 1;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== تأثيرات الأيقونات المحسنة ===== */
.social-link-item i {
    font-size: 2.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    position: relative;
    filter: drop-shadow(0 0 12px currentColor);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== ألوان مخصصة لكل منصة ===== */
.social-link-item[data-platform="facebook"] i {
    color: var(--social-facebook);
}

.social-link-item[data-platform="facebook"]:hover {
    border-color: rgba(24, 119, 242, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(24, 119, 242, 0.3),
        0 0 40px rgba(24, 119, 242, 0.2);
}

.social-link-item.social-icon-only[data-platform="facebook"]:hover {
    background: radial-gradient(circle, rgba(24, 119, 242, 0.2) 0%, rgba(24, 119, 242, 0.05) 100%);
    border-color: rgba(24, 119, 242, 0.6);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(24, 119, 242, 0.4),
        0 0 25px rgba(24, 119, 242, 0.3);
}

.social-link-item[data-platform="instagram"] i {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.social-link-item[data-platform="instagram"]:hover {
    border-color: rgba(225, 48, 108, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(225, 48, 108, 0.3),
        0 0 40px rgba(225, 48, 108, 0.2);
}

.social-link-item.social-icon-only[data-platform="instagram"]:hover {
    background: radial-gradient(circle, rgba(225, 48, 108, 0.2) 0%, rgba(225, 48, 108, 0.05) 100%);
    border-color: rgba(225, 48, 108, 0.6);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(225, 48, 108, 0.4),
        0 0 25px rgba(225, 48, 108, 0.3);
}


.social-link-item[data-platform="twitter"] i {
    color: var(--social-twitter);
}

.social-link-item[data-platform="location"] i {
    color: var(--social-location);
}

.social-link-item[data-platform="location"]:hover {
    border-color: rgba(52, 168, 83, 0.4);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(52, 168, 83, 0.3),
        0 0 40px rgba(52, 168, 83, 0.2);
}

.social-link-item.social-icon-only[data-platform="location"]:hover {
    background: radial-gradient(circle, rgba(52, 168, 83, 0.2) 0%, rgba(52, 168, 83, 0.05) 100%);
    border-color: rgba(52, 168, 83, 0.6);
    box-shadow: 
        0 15px 30px rgba(0, 0, 0, 0.2),
        0 8px 20px rgba(52, 168, 83, 0.4),
        0 0 25px rgba(52, 168, 83, 0.3);
}

.social-link-item[data-platform="phone"] i {
    color: var(--social-phone);
}

.social-link-item[data-platform="email"] i {
    color: var(--social-email);
}

/* ===== تأثيرات hover للأيقونات ===== */
.social-link-item:hover i {
    transform: scale(1.4) rotate(10deg);
    filter: drop-shadow(0 0 25px currentColor) brightness(1.1);
    animation: iconPulse 2s ease-in-out infinite alternate;
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 20px currentColor,
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

@keyframes iconPulse {
    from {
        filter: drop-shadow(0 0 25px currentColor) brightness(1.1);
        transform: scale(1.4) rotate(10deg);
        box-shadow: 
            0 0 20px currentColor,
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    to {
        filter: drop-shadow(0 0 35px currentColor) brightness(1.3);
        transform: scale(1.5) rotate(15deg);
        box-shadow: 
            0 0 30px currentColor,
            0 0 50px rgba(255, 255, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
    }
}

/* ===== تأثيرات النص ===== */
.social-link-item a {
    color: #e8f4fd;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.4s ease;
    z-index: 2;
    position: relative;
    flex: 1;
}

.social-link-item:hover a {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transform: translateX(5px);
}

/* ===== تأثيرات hover الرئيسية ===== */
.social-link-item:hover {
    transform: translateY(-12px) scale(1.05);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 10px 25px rgba(168, 212, 154, 0.3),
        0 0 40px rgba(168, 212, 154, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(168, 212, 154, 0.6);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.25) 0%, 
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.1) 100%);
}

/* ===== تأثيرات النقر ===== */
.social-link-item:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s ease;
}

/* ===== تأثيرات Ripple ===== */
.social-link-item .ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
    z-index: 1;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== تأثيرات التحميل ===== */
.social-link-item.loading {
    position: relative;
    overflow: hidden;
}

.social-link-item.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    animation: loadingShimmer 1.5s infinite;
    z-index: 3;
}

@keyframes loadingShimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== تأثيرات الجزيئات المتحركة ===== */
.social-link-item .particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.social-link-item .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(168, 212, 154, 0.6);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
}

.social-link-item .particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.social-link-item .particle:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.social-link-item .particle:nth-child(3) {
    bottom: 30%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translateY(-10px) scale(1.2);
        opacity: 1;
    }
}

/* ===== تأثيرات التركيز لإمكانية الوصول ===== */
.social-link-item:focus-within {
    outline: 3px solid var(--social-glow-primary);
    outline-offset: 4px;
    box-shadow: 
        0 0 0 3px rgba(168, 212, 154, 0.3),
        var(--social-shadow-glow);
}

/* ===== تأثيرات الظهور التدريجي ===== */
.social-link-item {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.social-link-item:nth-child(1) { animation-delay: 0.1s; }
.social-link-item:nth-child(2) { animation-delay: 0.2s; }
.social-link-item:nth-child(3) { animation-delay: 0.3s; }
.social-link-item:nth-child(4) { animation-delay: 0.4s; }

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

/* ===== تصميم متجاوب محسن ===== */
@media (max-width: 768px) {
    .social-links {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 0 5px;
    }
    
    /* تصميم متجاوب للأيقونات فقط */
    .social-links:has(.social-icon-only) {
        gap: 15px;
        margin-top: 25px;
    }
    
    .social-link-item.social-icon-only {
        width: 60px;
        height: 60px;
    }
    
    .social-link-item.social-icon-only i {
        font-size: 1.8rem;
    }
    
    .social-link-item {
        padding: 22px 25px;
        gap: 18px;
        border-radius: 20px;
    }
    
    .social-link-item i {
        font-size: 2rem;
        width: 35px;
        height: 35px;
    }
    
    .social-link-item a {
        font-size: 1.05rem;
        font-weight: 600;
    }
    
    .social-link-item:hover {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 
            0 15px 30px rgba(0, 0, 0, 0.12),
            0 8px 20px rgba(168, 212, 154, 0.25),
            0 0 35px rgba(168, 212, 154, 0.15);
    }
    
    .social-link-item:hover i {
        transform: scale(1.3) rotate(8deg);
        animation: iconPulse 1.8s ease-in-out infinite alternate;
    }
}

@media (max-width: 480px) {
    .social-links {
        gap: 15px;
        margin-top: 20px;
    }
    
    /* تصميم متجاوب للأيقونات فقط - شاشات صغيرة */
    .social-links:has(.social-icon-only) {
        gap: 12px;
        margin-top: 20px;
    }
    
    .social-link-item.social-icon-only {
        width: 55px;
        height: 55px;
    }
    
    .social-link-item.social-icon-only i {
        font-size: 1.6rem;
    }
    
    .social-link-item.social-icon-only:hover {
        transform: translateY(-6px) scale(1.1);
    }
    
    .social-link-item {
        padding: 20px 22px;
        gap: 15px;
        border-radius: 18px;
    }
    
    .social-link-item i {
        font-size: 1.8rem;
        width: 32px;
        height: 32px;
    }
    
    .social-link-item a {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .social-link-item:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 
            0 12px 25px rgba(0, 0, 0, 0.1),
            0 6px 15px rgba(168, 212, 154, 0.2),
            0 0 30px rgba(168, 212, 154, 0.12);
    }
    
    .social-link-item:hover i {
        transform: scale(1.25) rotate(6deg);
        animation: iconPulse 1.5s ease-in-out infinite alternate;
    }
}

/* ===== تحسينات إضافية للشاشات الصغيرة جداً ===== */
@media (max-width: 360px) {
    .social-links {
        gap: 12px;
        margin-top: 18px;
        padding: 0;
    }
    
    /* تصميم متجاوب للأيقونات فقط - شاشات صغيرة جداً */
    .social-links:has(.social-icon-only) {
        gap: 10px;
        margin-top: 15px;
    }
    
    .social-link-item.social-icon-only {
        width: 50px;
        height: 50px;
    }
    
    .social-link-item.social-icon-only i {
        font-size: 1.4rem;
    }
    
    .social-link-item {
        padding: 18px 20px;
        gap: 12px;
        border-radius: 16px;
    }
    
    .social-link-item i {
        font-size: 1.6rem;
        width: 28px;
        height: 28px;
    }
    
    .social-link-item a {
        font-size: 0.95rem;
        font-weight: 600;
    }
}

/* ===== دعم الوضع المظلم ===== */
@media (prefers-color-scheme: dark) {
    .social-link-item {
        background: linear-gradient(135deg, 
            rgba(0, 0, 0, 0.3) 0%, 
            rgba(0, 0, 0, 0.1) 100%);
        border-color: rgba(168, 212, 154, 0.1);
    }
    
    .social-link-item:hover {
        background: linear-gradient(135deg, 
            rgba(0, 0, 0, 0.4) 0%, 
            rgba(0, 0, 0, 0.2) 100%);
        border-color: rgba(168, 212, 154, 0.3);
    }
}

/* ===== دعم تقليل الحركة ===== */
@media (prefers-reduced-motion: reduce) {
    .social-link-item,
    .social-link-item i,
    .social-link-item a {
        animation: none;
        transition: none;
    }
    
    .social-link-item:hover {
        transform: none;
    }
    
    .social-link-item:hover i {
        transform: none;
        animation: none;
    }
    
    .particle {
        animation: none;
    }
}

/* ===== تأثيرات إضافية للتفاعل ===== */
.social-link-item .interaction-indicator {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 8px;
    height: 8px;
    background: var(--social-glow-primary);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 3;
}

.social-link-item:hover .interaction-indicator {
    opacity: 1;
    transform: scale(1.5);
    box-shadow: 0 0 10px var(--social-glow-primary);
}

/* ===== تأثيرات الحالة النشطة ===== */
.social-link-item.active {
    background: linear-gradient(135deg, 
        rgba(168, 212, 154, 0.2) 0%, 
        rgba(244, 162, 97, 0.2) 100%);
    border-color: var(--social-glow-primary);
    box-shadow: var(--social-shadow-glow);
}

.social-link-item.active i {
    animation: activeIcon 2s ease-in-out infinite;
}

@keyframes activeIcon {
    0%, 100% {
        transform: scale(1.2) rotate(0deg);
        filter: drop-shadow(0 0 15px currentColor);
    }
    50% {
        transform: scale(1.3) rotate(5deg);
        filter: drop-shadow(0 0 25px currentColor) brightness(1.1);
    }
}

/* ===== تأثيرات الطباعة ===== */
@media print {
    .social-link-item {
        background: white !important;
        border: 2px solid #333 !important;
        color: #333 !important;
        box-shadow: none !important;
        animation: none !important;
    }
    
    .social-link-item i {
        color: #333 !important;
        filter: none !important;
        animation: none !important;
    }
    
    .social-link-item a {
        color: #333 !important;
        text-shadow: none !important;
    }
    
    .particle,
    .ripple-effect,
    .interaction-indicator {
        display: none !important;
    }
}
