/* ... Previous styles remain ... */
/* Keep existing styles, adding new ones below */

:root {
    --primary-green: #2ecc71;
    --dark-green: #27ae60;
    --header-bg: #32a852;
    --footer-bg: #1e272e;
    --bg-light: #f8f9fa;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --border-color: #dfe6e9;
    
    /* Category Colors */
    --cat-gov: #2980b9;
    --cat-sec: #e74c3c;
    --cat-com: #f39c12;
    --cat-rel: #3498db;
    --cat-res: #9b59b6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    background-color: var(--header-bg);
    color: white;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-area h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    font-size: 1.8rem;
    border: 2px solid white;
    border-radius: 50%;
    padding: 5px;
}

#custom-logo-img {
    max-height: 50px;
    max-width: 150px;
    border-radius: 5px;
    border: 2px solid white;
}

.btn-admin {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
}

.btn-admin:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
main {
    flex: 1;
    padding-bottom: 40px;
}

.active-view {
    display: block;
}

.hidden-view {
    display: none;
}

/* Search Section */
.search-section {
    background: white;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.search-box {
    max-width: 800px;
    margin: 0 auto 20px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

.search-box input:focus {
    border-color: var(--header-bg);
    background: white;
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

.filter-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.filter-btn {
    background: white;
    border: 1px solid #eee;
    padding: 8px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.filter-btn i {
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: var(--header-bg);
    color: white;
    border-color: var(--header-bg);
}

/* Content Container */
.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    position: relative;
    width: 100%;
}

.section-header::before,
.section-header::after {
    content: "";
    flex: 1;
    height: 2px;
    background-color: #e0e0e0;
    margin: 0 15px;
    opacity: 0.5;
}

.section-header h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    padding: 0 15px;
    display: inline-block;
    font-weight: 700;
}

/* Category Specific Header Colors (Lines and Text) */
.cat-government .section-header::before,
.cat-government .section-header::after { background-color: var(--cat-gov); opacity: 0.7; }
.cat-government .section-header h2 { color: var(--cat-gov); }

.cat-security .section-header::before,
.cat-security .section-header::after { background-color: var(--cat-sec); opacity: 0.7; }
.cat-security .section-header h2 { color: var(--cat-sec); }

.cat-commercial .section-header::before,
.cat-commercial .section-header::after { background-color: var(--cat-com); opacity: 0.7; }
.cat-commercial .section-header h2 { color: var(--cat-com); }

.cat-religious .section-header::before,
.cat-religious .section-header::after { background-color: var(--cat-rel); opacity: 0.7; }
.cat-religious .section-header h2 { color: var(--cat-rel); }

.cat-residential .section-header::before,
.cat-residential .section-header::after { background-color: var(--cat-res); opacity: 0.7; }
.cat-residential .section-header h2 { color: var(--cat-res); }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Responsive Grid */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

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

/* Place Card */
.place-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-bottom: 4px solid #ddd; /* Default */
    transition: transform 0.3s;
    width: 100%;
}

.place-card:hover {
    transform: translateY(-2px);
}

/* Card Bottom Borders */
.place-card.border-government { border-bottom-color: var(--cat-gov); }
.place-card.border-security { border-bottom-color: var(--cat-sec); }
.place-card.border-commercial { border-bottom-color: var(--cat-com); }
.place-card.border-religious { border-bottom-color: var(--cat-rel); }
.place-card.border-residential { border-bottom-color: var(--cat-res); }

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.bg-government { background-color: var(--cat-gov); }
.bg-security { background-color: var(--cat-sec); }
.bg-commercial { background-color: var(--cat-com); }
.bg-religious { background-color: var(--cat-rel); }
.bg-residential { background-color: var(--cat-res); }
.bg-other { background-color: #95a5a6; }

.place-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.card-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f2f6;
    color: #7f8c8d;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

.distance-text {
    color: #f39c12;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: block;
}

.card-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 8px 15px;
    border-radius: 8px;
    border: none;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    justify-content: center;
    flex: 1;
    min-width: 100px;
}

.btn-route {
    background: #eaf2f8;
    color: #3498db;
}

.btn-call {
    background: #eafaf1;
    color: #2ecc71;
}

.btn-action:hover {
    opacity: 0.9;
}

/* Admin Styles */
.admin-header {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.admin-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 30px;
}

.admin-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.admin-section h3 {
    margin-bottom: 20px;
    color: var(--text-dark);
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.admin-divider {
    border: 0;
    height: 1px;
    background: #e0e0e0;
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
}

.help-text {
    font-size: 0.8rem;
    color: #777;
    margin-top: 5px;
}

.coords-input {
    display: flex;
    gap: 10px;
}

.btn-primary {
    background: var(--header-bg);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    width: 100%;
    font-size: 1rem;
}

.btn-delete {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
}

.btn-edit {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    margin-left: 5px;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
}


#admin-map {
    height: 300px;
    width: 100%;
    margin-top: 10px;
    border-radius: 5px;
    z-index: 1; /* Ensure it stays below modal */
}

.places-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.places-table th, .places-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: right;
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
    align-items: center;
    justify-content: center;
}

.modal.active-modal {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.close-modal {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 15px;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal h2 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--header-bg);
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.footer-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot.yellow { background: #f1c40f; }
.dot.blue { background: #3498db; }
.dot.green { background: #2ecc71; }
