@font-face {
    font-family: 'Vazir';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

* {
    font-family: 'Vazir', sans-serif;
}

body {
    background-color: #f8f9fa;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.tab {
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab.active {
    border-bottom: 3px solid #5D5CDE;
    color: #5D5CDE;
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #5D5CDE #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #5D5CDE;
    border-radius: 6px;
}

.martyrs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

@media (max-width: 640px) {
    .martyrs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .martyrs-grid {
        grid-template-columns: 1fr;
    }
}

.martyr-img-container {
    height: 180px;
    width: 100%;
    overflow: hidden;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.martyr-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.text-tiny {
    font-size: 0.85rem;
    line-height: 1.2rem;
}

.name-container {
    border-bottom: 1px solid #f3f3f3;
}

.card .edit-btn {
    transition: all 0.2s ease;
}

.card .edit-btn:hover {
    color: #3b82f6;
    transform: scale(1.05);
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.skeleton {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

.martyr-img {
    background: linear-gradient(45deg, #5D5CDE, #9494ff);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: bold;
}

.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 100; /* Increased z-index to ensure it's above other elements */
    max-height: 300px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 16px;
}

.badge {
    background-color: #5D5CDE;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f1f1f1;
}

.loading-bar {
    height: 3px;
    width: 0%;
    background-color: #5D5CDE;
    position: fixed;
    top: 0;
    left: 0;
    transition: width 0.3s ease;
    z-index: 100;
}

/* Map styles */
#gilanMap {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10; /* Lower z-index than mobile nav */
}

.city-marker-tooltip {
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    direction: rtl;
    text-align: center;
    padding: 6px 10px;
}

/* Override Leaflet default styles for RTL */
.leaflet-popup-content {
    direction: rtl;
    text-align: right;
    font-family: 'Vazir', sans-serif;
}

.leaflet-control-zoom {
    direction: ltr;
}

/* Mobile bottom navigation */
.mobile-tabs {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999999; /* Highest z-index to ensure it's always on top */
    border-top: 1px solid #e5e7eb;
    padding: 5px 0;
    justify-content: space-between; /* Distribute tabs evenly */
}

.mobile-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    font-size: 0.75rem;
    color: #6b7280;
    transition: color 0.3s ease;
    text-decoration: none;
    flex: 1; /* Make each tab take equal space */
    text-align: center; /* Center text */
}

.mobile-tab.active {
    color: #5D5CDE;
}

.mobile-tab svg {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
}

.mobile-tab-text {
    font-size: 0.7rem; /* Smaller font to fit better */
    white-space: nowrap; /* Prevent text from wrapping */
}

/* Mobile content spacer for bottom navigation */
.mobile-content-spacer {
    display: none;
    height: 90px; /* Increased height to prevent overlap */
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .mobile-tabs {
        display: flex;
    }
    
    .mobile-content-spacer {
        display: block;
    }
    
    /* Hide desktop tabs on mobile */
    .desktop-tabs {
        display: none;
    }
    
    /* Add extra padding to footer on mobile */
    footer {
        padding-bottom: 90px; /* Increased padding */
    }
    
    /* Adjust modal for mobile */
    .modal-content {
        width: 95%;
        max-height: 85vh;
        padding: 12px;
    }
    
    /* Adjust map container for mobile */
    #gilanMap {
        height: 300px; /* Reduced height on mobile */
        margin-bottom: 90px; /* Add margin to avoid overlap with tabs */
    }
}
