:root {
    --primary-color: #c4a77d;
    --secondary-color: #2c3e50;
    --bg-color: #f4f4f4;
    --sidebar-width: 300px;
    --text-color: #333;
    --border-color: #ddd;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    height: 100vh;
    overflow: hidden;
}

#app {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 7px;
    background: var(--secondary-color);
    color: white;
}

@media screen and (max-width: 768px) {
    .sidebar-header {
        display: none;
    }
    
}

.sidebar-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.sidebar-header nav a {
    color: #ccc;
    text-decoration: none;
    margin-right: 15px;
    font-weight: bold;
    padding-bottom: 5px;
}

.sidebar-header nav a.active {
    color: white;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-header nav a:hover {
    color: white;
}

.search-container {
    padding: 5px;
    border-bottom: 1px solid var(--border-color);
}

.selectors {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 5px;
}

.map-selector-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.map-selector-btn {
    padding: 5px 5px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
    transition: all 0.2s;
    color: #555;
}

.map-selector-btn:hover {
    background: #f0f0f0;
    border-color: #bbb;
}

.map-selector-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: bold;
}

.region-select {
    width: 100%;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
}

/* Search */
.search-wrapper {
    position: relative;
    width: 100%;
}

#search-input {
    width: 100%;
    padding: 6px 30px 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: none;
}

.search-clear:hover {
    color: #333;
}

.search-clear.visible {
    display: block;
}

/* Filter Controls */
.filter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 5px;
    margin-bottom: 5px;
}

.control-group {
    display: flex;
    gap: 5px;
}

.filter-btn {
    padding: 6px 10px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-btn:hover {
    background: #f0f0f0;
    border-color: #999;
}

.sidebar-footer {
    padding: 5px;
    border-top: 1px solid var(--border-color);
    background: #f8f9fa;
}

/* Toggle Control */
.toggle-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    padding: 6px 10px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    white-space: nowrap;
    transition: all 0.2s;
}

.toggle-control:hover {
    background: #f0f0f0;
    border-color: #999;
}

.toggle-control input {
    cursor: pointer;
}

.language-selector-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.language-selector {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 0.85rem;
    cursor: pointer;
}

.language-selector:hover {
    border-color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        max-height: 50vh;
        position: relative;
        order: 2;
    }

    .map-container, .content-container {
        height: 60vh;
        order: 1;
    }
    
    .content-container {
        overflow-y: auto;
    }
}

.copyright {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.maplibregl-popup-close-button {
    font-size: 16px;
    color: #333;
    padding: 2px 6px;
}

li {
    margin-left: 20px;
}
.marker-popup-category {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.marker-popup-icon {
    width: 20px;
    height: 20px;
}
.marker-popup-category strong {
    color: #1a00a3;
}
.marker-popup-image img {
    width: 100%;
    height: auto;
}

/* Image Overlay */
.image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
}

.image-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.image-overlay .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}