/* مودال التواصل عبر واتساب */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: linear-gradient(135deg, #1e2a3a 0%, #0d1117 100%);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid rgba(37, 211, 102, 0.3);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.whatsapp-modal-content {
    background: linear-gradient(135deg, #1e2a3a 0%, #0d1117 100%);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(255, 77, 77, 0.2);
    transform: rotate(90deg);
    color: #ff4d4d;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
    background: transparent;
    padding: 0;
}

.modal-icon {
    display: inline-flex;
    margin-bottom: 1.5rem;
    animation: bounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: #25D366;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 20px rgba(37, 211, 102, 0.4);
}

.modal-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #25D366, transparent);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(37, 211, 102, 0.5);
}

.modal-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    margin-top: 1rem;
}

.whatsapp-contacts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.whatsapp-contact-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15) 0%, rgba(37, 211, 102, 0.05) 100%);
    border: 1.5px solid rgba(37, 211, 102, 0.3);
    border-radius: 16px;
    text-decoration: none;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.whatsapp-contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.2), transparent);
    transition: left 0.5s ease;
}

.whatsapp-contact-btn:hover::before {
    left: 100%;
}

.whatsapp-contact-btn:hover {
    transform: translateX(-8px) scale(1.02);
    border-color: #25D366;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.25) 0%, rgba(37, 211, 102, 0.1) 100%);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
}

.whatsapp-contact-btn:active {
    transform: translateX(-8px) scale(0.98);
}

.contact-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.whatsapp-contact-btn:hover .contact-icon {
    transform: rotate(10deg) scale(1.1);
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.contact-number {
    font-size: 1.25rem;
    color: #25D366;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-arrow {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.whatsapp-contact-btn:hover .contact-arrow {
    color: #25D366;
    transform: translateX(-5px);
}

.modal-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(37, 211, 102, 0.2);
    background: transparent;
}

.modal-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    background: transparent;
}

.modal-note svg {
    flex-shrink: 0;
    stroke: #25D366;
}

/* الرسوم المتحركة لظهور الأزرار */
.modal.active .whatsapp-contact-btn:nth-child(1) {
    animation: slideInRight 0.5s ease 0.1s both;
}

.modal.active .whatsapp-contact-btn:nth-child(2) {
    animation: slideInRight 0.5s ease 0.2s both;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 600px) {
    .modal-content {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .contact-number {
        font-size: 1.1rem;
    }

    .whatsapp-contact-btn {
        padding: 1rem;
    }
}