/* تنسيقات خاصة بالخرائط */
.map-container {
    padding: 10px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ratio-16x9 {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* نسبة 16:9 */
}

.ratio-16x9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.card {
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 1.5rem;
}

/* تحسين مظهر العناوين في البطاقات */
.card-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.card-text {
    margin-bottom: 0.75rem;
}

/* تنسيقات الخرائط */
.map-container {
    margin-top: 20px;
    margin-bottom: 10px;
}

.map-container iframe {
    border: none;
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.ratio-16x9 {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* نسبة العرض إلى الارتفاع 16:9 */
}

.ratio-16x9 iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* أنماط الخرائط */
.map-display {
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 15px;
    margin-bottom: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* أنماط النافذة المنبثقة للخريطة */
.map-popup {
    padding: 10px;
    text-align: center;
}

.map-popup h5 {
    color: #0056b3;
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 16px;
}

.map-popup p {
    color: #333;
    margin-bottom: 10px;
    font-size: 14px;
}

.map-popup a.btn {
    background-color: #0056b3;
    color: white;
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    display: inline-block;
    transition: all 0.3s ease;
}

.map-popup a.btn:hover {
    background-color: #004494;
    transform: translateY(-2px);
}

/* تخصيص أنماط Google Maps */
.gm-style .gm-style-iw-c {
    padding: 12px !important;
    border-radius: 8px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
}

.gm-style .gm-style-iw-t::after {
    background: linear-gradient(45deg, rgba(255, 255, 255, 1) 50%, rgba(255, 255, 255, 0) 51%, rgba(255, 255, 255, 0) 100%) !important;
}

.gm-style button.gm-ui-hover-effect {
    top: 0 !important;
    right: 0 !important;
}

/* تنسيقات الخرائط الثابتة */
.static-map {
    height: 250px;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.static-map:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.static-map::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: radial-gradient(circle, #ffffff33 1px, transparent 1px);
    background-size: 15px 15px;
    opacity: 0.5;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.map-overlay:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.map-content {
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 85%;
    transition: all 0.3s ease;
}

.map-overlay:hover .map-content {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.map-marker {
    color: #0d6efd;
    font-size: 2rem;
    margin-bottom: 10px;
}

.map-marker i {
    animation: pulse 2s infinite;
}

.map-title {
    margin-bottom: 5px;
    color: #212529;
}

.map-address {
    color: #6c757d;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.map-coords {
    font-family: monospace;
    color: #0d6efd;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

/* تنسيقات خرائط OpenStreetMap */
.leaflet-popup-content {
    text-align: center;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
}

.leaflet-container {
    font-family: 'Cairo', sans-serif !important;
}

.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 5px;
}

.leaflet-popup-content p {
    margin: 5px 0;
    font-size: 14px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* تخصيص للشاشات الصغيرة */
@media (max-width: 768px) {
    .map-display {
        height: 200px;
    }
}
