/* ================= صفحة الاتصال - ملف CSS منفصل ================= */

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
}

/* إصلاح مشكلة القائمة المنسدلة */
.navbar-collapse {
    z-index: 1030;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.75rem;
}

/* ضمان عمل القائمة المنسدلة على الأجهزة المحمولة */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #8e1751;
        border-radius: 0 0 15px 15px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1.5rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* تنسيق عنوان "تواصل معنا" مع الخطين */
.section-title-wrapper {
    position: relative;
    display: inline-block;
    padding: 0 3rem;
    margin-bottom: 1rem;
}

.section-title-wrapper::before,
.section-title-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #8E1751, #BD3A77);
    border-radius: 2px;
    transform: translateY(-50%);
}

.section-title-wrapper::before {
    left: -100px;
}

.section-title-wrapper::after {
    right: -100px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #8E1751;
    margin: 0;
    text-shadow: 0 2px 4px rgba(142,23,81,0.1);
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin-top: 0.5rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .section-title-wrapper {
        padding: 0 1.5rem;
    }
    
    .section-title-wrapper::before,
    .section-title-wrapper::after {
        width: 40px;
    }
    
    .section-title-wrapper::before {
        left: -50px;
    }
    
    .section-title-wrapper::after {
        right: -50px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

/* تنسيق صناديق معلومات التواصل */
.contact-info-box {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(142,23,81,0.10);
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    margin-bottom: 2rem;
    min-height: 260px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.contact-info-box:hover {
    box-shadow: 0 10px 32px rgba(142,23,81,0.13), 0 2px 8px rgba(142,23,81,0.07);
    transform: translateY(-5px);
}

.contact-info-box h5 {
    font-weight: 800;
    color: #8E1751;
    margin-bottom: 1.2rem;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    transition: transform 0.2s;
}

.contact-info-item:hover {
    transform: translateX(-5px);
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(135deg, #8E1751, #BD3A77);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    margin-left: 1rem;
    box-shadow: 0 4px 12px rgba(142,23,81,0.2);
}

.contact-info-content h6 {
    color: #8E1751;
    font-weight: 700;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.contact-info-content p {
    margin: 0;
    color: #555;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* تنسيق أزرار التواصل الاجتماعي */
.social-media-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(142,23,81,0.1);
}

.social-media-section h6 {
    color: #8E1751;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-size: 1.1rem;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.social-btn.facebook {
    background: linear-gradient(135deg, #1877f2, #0d6efd);
    color: white;
}

.social-btn.twitter {
    background: linear-gradient(135deg, #1da1f2, #0ea5e9);
    color: white;
}

.social-btn.instagram {
    background: linear-gradient(135deg, #e4405f, #dc3545);
    color: white;
}

.social-btn.youtube {
    background: linear-gradient(135deg, #ff0000, #dc3545);
    color: white;
}

.social-btn.tiktok {
    background: linear-gradient(135deg, #000000, #343a40);
    color: white;
}

.social-btn.linkedin {
    background: linear-gradient(135deg, #0077b5, #0d6efd);
    color: white;
}

/* تنسيق الخريطة */
.map-container {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(142,23,81,0.10);
}

#map {
    height: 450px;
    border-radius: 18px;
    overflow: hidden;
}

/* تنسيقات Leaflet المخصصة */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.custom-popup .leaflet-popup-tip {
    background: white;
}

.map-controls button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* تأثيرات الحركة للأيقونة المخصصة */
@keyframes markerBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.custom-marker {
    animation: markerBounce 2s ease-in-out infinite;
}

/* تنسيقات خاصة بعلامة المستخدم وخط المسافة */
.user-marker {
    animation: userMarkerPulse 2s ease-in-out infinite;
}

@keyframes userMarkerPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* تنسيق خط المسافة */
.leaflet-interactive {
    cursor: pointer;
}

/* تحسين مظهر نافذة معلومات المسافة */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Cairo', sans-serif !important;
}

.leaflet-popup-tip {
    background: white !important;
}

/* تأثيرات إضافية للخريطة */
.map-container:hover {
    box-shadow: 0 8px 30px rgba(142,23,81,0.15);
    transition: box-shadow 0.3s ease;
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .contact-info-box {
        padding: 1.5rem 1rem;
        min-height: auto;
    }
    
    #map {
        height: 350px;
    }
    
    .social-buttons {
        gap: 0.3rem;
    }
    
    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* تحسين مظهر العلامات على الأجهزة المحمولة */
    .user-marker {
        transform: scale(0.9);
    }
    
    .custom-marker {
        transform: scale(0.9);
    }
}

@media (max-width: 576px) {
    .contact-info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info-icon {
        margin-left: 0;
        margin-bottom: 0.5rem;
    }
    
    #map {
        height: 300px;
    }
    
    /* تحسين مظهر العلامات على الشاشات الصغيرة */
    .user-marker {
        transform: scale(0.8);
    }
    
    .custom-marker {
        transform: scale(0.8);
    }
}