/* استایل‌های پایه */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Vazir', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    direction: rtl;
}

/* کانتینر اصلی */
.mosques-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* هدر صفحه */
.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5eb;
}

.header-bar h2 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

/* دکمه‌ها - استایل کلی */
.btn {
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* انواع دکمه‌ها */
.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-edit {
    background-color: #f39c12;
    color: white;
}

.btn-edit:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-save {
    background-color: #27ae60;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
}

.btn-save:hover {
    background-color: #219653;
}

.btn-cancel {
    background-color: #95a5a6;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
}

.btn-cancel:hover {
    background-color: #7f8c8d;
}

.btn-delete-confirm {
    background-color: #e74c3c;
    color: white;
    padding: 12px 25px;
    font-size: 16px;
}

.btn-delete-confirm:hover {
    background-color: #c0392b;
}

.btn:active {
    transform: translateY(0);
}

/* باکس جستجو */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* جدول */
.mosque-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mosque-table thead {
    background-color: #2c3e50;
    color: white;
}

.mosque-table th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
}

.mosque-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e1e5eb;
}

.mosque-table tbody tr {
    transition: background-color 0.2s;
}

.mosque-table tbody tr:hover {
    background-color: #f8f9fa;
}

.mosque-table tbody tr:last-child td {
    border-bottom: none;
}

/* ستون عملیات */
.actions {
    display: flex;
    gap: 10px;
}

.actions .btn {
    padding: 8px 15px;
    font-size: 13px;
    min-width: 70px;
}

/* مودال - اصلاح شده */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.modal-box {
    background-color: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s;
    overflow-y: auto;
}

.delete-confirm-modal {
    max-width: 500px;
    text-align: center;
}

.delete-confirm-modal p {
    margin: 20px 0;
    font-size: 16px;
    color: #555;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-box h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 22px;
    text-align: center;
}

/* فرم داخل مودال */
#mosqueForm {
    display: flex;
    flex-direction: column;
}

#mosqueForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

#mosqueForm input,
#mosqueForm textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border 0.3s;
}

#mosqueForm input:focus,
#mosqueForm textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

#mosqueForm textarea {
    min-height: 100px;
    resize: vertical;
}

/* دکمه‌های مودال */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .mosque-table {
        display: block;
        overflow-x: auto;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-box {
        width: 95%;
        padding: 20px;
        max-height: 95vh;
    }
    
    .modal-overlay {
        padding: 10px;
    }
}

@media (max-height: 700px) {
    .modal-box {
        max-height: 98vh;
    }
    
    #mosqueForm input,
    #mosqueForm textarea {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .modal-buttons {
        margin-top: 15px;
    }
}