@import url('https://fonts.googleapis.com/css2?family=Droid+Kufi&display=swap');

:root {
    --bg: #f5f6fa;
    --primary: #0f1d45;
    --accent: #ef8024;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Droid Kufi", sans-serif;
    direction: rtl;
    margin: 0;
    padding: 20px;
    color: var(--primary);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 18px;
}

.saudi-map {
    font-family: "Droid Arabic Kufi", "Lato", serif !important;
    text-align: center;
    position: relative;
    margin-bottom: 40px;
    padding: 40px 20px 80px 20px;
    background: url(../images/back6.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#map-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

#error {
    color: #b00020;
}

/* new modal */
#region-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

#region-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* close modal */
.close-modal {
    position: absolute;
    left: 15px;
    top: 15px;
    width: 35px;
    height: 35px;
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 35px;
    text-align: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #c53030;
    transform: rotate(90deg);
}

/* modal */
.modal-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-title {
    text-align: center;
    color: var(--primary);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.modal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal-link {
    display: block;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1aa48b 0%, #15876f 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 500;
}

.modal-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 164, 139, 0.4);
    background: linear-gradient(135deg, #15876f 0%, #1aa48b 100%);
}

/* map */
#map {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
}

/* btns under map */
.map-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.map-btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, #1aa48b 0%, #15876f 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 164, 139, 0.3);
    border: 2px solid transparent;
}

.map-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 164, 139, 0.5);
    background: linear-gradient(135deg, #15876f 0%, #1aa48b 100%);
}

.map-btn.secondary {
    background: linear-gradient(135deg, #ef8024 0%, #d86f1a 100%);
    box-shadow: 0 4px 15px rgba(239, 128, 36, 0.3);
}

.map-btn.secondary:hover {
    background: linear-gradient(135deg, #d86f1a 0%, #ef8024 100%);
    box-shadow: 0 6px 20px rgba(239, 128, 36, 0.5);
}

.hidden {
    display: none;
}

/* media */
@media (max-width: 768px) {
    .saudi-map {
        min-height: 500px;
        padding: 30px 15px 70px 15px;
    }
    
    #map {
        max-width: 100%;
    }
    
    /* منع أي hover effects على الموبايل */
    #map * {
        pointer-events: auto !important;
    }
    
    .map-buttons {
        margin-top: 20px;
        gap: 15px;
    }
    
    .map-btn {
        padding: 12px 28px;
        font-size: 16px;
    }
    
    .modal-content {
        padding: 20px;
        max-width: 95%;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-image {
        width: 120px;
        height: 120px;
    }
    
    .modal-link {
        font-size: 14px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .saudi-map {
        min-height: 400px;
        padding: 20px 10px 60px 10px;
    }
    
    .map-btn {
        padding: 10px 24px;
        font-size: 14px;
        width: 100%;
        max-width: 280px;
    }
}