/* Mountain Huts Explorer - Styles */

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

body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    display: flex;
    overflow: hidden;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    -webkit-touch-callout: none;
}

/* Allow text selection in important areas */
.sidebar-content, .leaflet-popup-content {
    -webkit-user-select: text;
    user-select: text;
}

/* Left Sidebar */
.sidebar {
    width: 350px;
    height: 100vh;
    background: #ffffff;
    color: #1e293b;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.08);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateX(0);
}

.sidebar.hidden {
    transform: translateX(-100%);
}

/* Sidebar Toggle Button (Desktop) */
.sidebar-toggle-btn {
    position: fixed;
    left: 350px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 80px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: none;
    border-radius: 0 8px 8px 0;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    width: 36px;
    box-shadow: 3px 0 15px rgba(0,0,0,0.25);
}

.sidebar-toggle-btn.sidebar-hidden {
    left: 0;
}

.sidebar-toggle-btn .toggle-icon {
    transition: transform 0.3s ease;
}

.sidebar-toggle-btn.sidebar-hidden .toggle-icon {
    transform: rotate(180deg);
}

/* Sidebar Navigation Tabs */
.sidebar-nav {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 0;
}

.sidebar-nav-btn {
    flex: 1;
    padding: 10px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sidebar-nav-btn span:first-child {
    font-size: 16px;
}

.sidebar-nav-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}

.sidebar-nav-btn.active {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-color: #1e293b;
    color: white;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.2);
}

.sidebar-nav-btn .badge {
    background: #f59e0b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-nav-btn.active .badge {
    background: #d97706;
}

.sidebar-header {
    padding: 20px 25px 16px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.sidebar-header h1 {
    font-size: 22px;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.sidebar-header p {
    margin: 0 0 12px 0;
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.5;
}

/* Detail Sidebar - Overlays filter sidebar */
.detail-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 350px;
    height: 100vh;
    background: #ffffff;
    z-index: 1002;
    box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.detail-sidebar.open {
    transform: translateX(0);
}

.detail-header {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 3px solid #475569;
    flex-shrink: 0;
}

.back-button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-button:hover {
    background: rgba(255,255,255,0.3);
    transform: translateX(-2px);
}

.back-button:active {
    transform: translateX(-1px) scale(0.95);
}

.detail-title {
    flex: 1;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.detail-section {
    margin-bottom: 20px;
}

.detail-section h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-right: 8px;
    margin-bottom: 8px;
}

.detail-badge .badge-icon {
    font-size: 18px;
}

.detail-info-box {
    background: #f8fafc;
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 12px;
}

.detail-info-box .info-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-info-box .info-value {
    font-size: 14px;
    color: #1e293b;
    font-weight: 600;
}

.detail-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    margin-bottom: 10px;
}

.detail-button.primary {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.detail-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

.detail-button.secondary {
    background: #10b981;
    color: white;
}

.detail-button.secondary:hover {
    background: #059669;
}

.detail-button.tertiary {
    background: #8b5cf6;
    color: white;
}

.detail-button.tertiary:hover {
    background: #7c3aed;
}

/* Favorite Button Styling */
.favorite-btn {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    padding: 16px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.25);
    margin: 8px 0;
}

.favorite-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(100, 116, 139, 0.35);
}

.favorite-btn.favorited {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.favorite-btn.favorited:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

/* Favorites List */
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.favorite-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.favorite-item:hover {
    border-color: #f59e0b;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
    transform: translateY(-1px);
}

.favorite-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.favorite-item-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    line-height: 1.3;
    flex: 1;
}

.favorite-item-remove {
    background: #fee2e2;
    border: none;
    color: #dc2626;
    font-size: 16px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.favorite-item-remove:hover {
    background: #fecaca;
    transform: scale(1.1);
}

.favorite-item-meta {
    font-size: 11px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.favorite-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* Sidebar Toggle Button - Mobile Hidden */
@media (max-width: 768px) {
    .sidebar-toggle-btn {
        display: none;
    }
}

/* Footer Bar */
.footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    padding: 5px 16px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 10000;
    flex-wrap: wrap;
    line-height: 1.3;
}

.footer-bar a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-bar a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

.footer-divider {
    color: #475569;
    font-weight: 300;
    padding: 0 2px;
}

@media (max-width: 768px) {
    .footer-bar {
        padding: 4px 10px;
        font-size: 9px;
        gap: 8px;
        justify-content: center;
        text-align: center;
    }
    
    .footer-divider {
        display: none;
    }
}

/* Search Box */
.search-container {
    position: relative;
    margin-top: 12px;
}

.search-box {
    width: 100%;
    padding: 12px 40px 12px 40px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255,255,255,0.95);
    color: #1e293b;
    transition: all 0.3s ease;
    font-weight: 500;
}

.search-box:focus {
    outline: none;
    border-color: rgba(255,255,255,0.6);
    background: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-box::placeholder {
    color: #94a3b8;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    opacity: 0.7;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #64748b;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-clear:hover {
    background: #475569;
    transform: translateY(-50%) scale(1.1);
}

.search-clear.visible {
    display: flex;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.search-results.visible {
    display: block;
}

.search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: #f8fafc;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    font-weight: 600;
    color: #1e293b;
    font-size: 14px;
    margin-bottom: 3px;
}

.search-result-meta {
    font-size: 12px;
    color: #64748b;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
}

.stats-mini {
    margin-top: 8px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 6px;
    font-size: 12px;
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.stats-mini-item {
    flex: 1;
}

.stats-mini-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stats-mini-label {
    font-size: 10px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-content {
    padding: 25px;
    flex: 1;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-section h3 {
    font-size: 16px;
    margin: 0 0 15px 0;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 8px;
    color: #0f172a;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #475569;
    font-weight: 500;
}

.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
}

.filter-group input[type="text"]::placeholder {
    color: #94a3b8;
}

.filter-group input[type="text"]:focus,
.filter-group input[type="number"]:focus,
.filter-group select:focus {
    outline: none;
    background: #ffffff;
    border-color: #334155;
    box-shadow: 0 0 0 3px rgba(51, 65, 85, 0.1);
}

.checkbox-list {
    max-height: 250px;
    overflow-y: auto;
    background: #f8fafc;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.checkbox-list label {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s ease;
    font-size: 13px;
    color: #475569;
}

.checkbox-list label:hover {
    background: #e2e8f0;
}

.checkbox-list input[type="checkbox"] {
    margin-right: 10px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.action-buttons {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #1e293b;
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.15);
}

.btn-primary:hover {
    background: #334155;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 41, 59, 0.25);
}

.btn-secondary {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* Altitude Slider */
.slider-container {
    margin-top: 10px;
}

.slider-values {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    opacity: 0.9;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    margin: 8px 0;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #334155;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
    border: 2px solid white;
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: #1e293b;
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #334155;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    background: #1e293b;
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
}

input[type="range"]::-moz-range-track {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
}

#map { 
    flex: 1;
    height: 100vh;
    position: relative;
    transition: margin-left 0.3s ease;
}

#map.sidebar-hidden {
    margin-left: -350px;
}

.stats-display {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.stats-display .number {
    font-size: 32px;
    display: block;
    margin-bottom: 5px;
}

.legend {
    margin-top: 20px;
}

.legend h4 {
    font-size: 14px;
    margin: 0 0 12px 0;
    font-weight: 600;
    opacity: 0.9;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-size: 13px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255,255,255,0.5);
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.checkbox-list::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.checkbox-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb,
.checkbox-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.checkbox-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Modern Minimal Marker Cluster Styling */
.marker-cluster-small {
    background-color: rgba(100, 116, 139, 0.3);
    border: 2px solid rgba(71, 85, 105, 0.5);
}
.marker-cluster-small div {
    background-color: rgba(71, 85, 105, 0.9);
    color: white;
    font-weight: 600;
    font-size: 13px;
}
.marker-cluster-medium {
    background-color: rgba(51, 65, 85, 0.3);
    border: 2px solid rgba(30, 41, 59, 0.5);
}
.marker-cluster-medium div {
    background-color: rgba(30, 41, 59, 0.9);
    color: white;
    font-weight: 600;
    font-size: 14px;
}
.marker-cluster-large {
    background-color: rgba(30, 41, 59, 0.3);
    border: 2px solid rgba(15, 23, 42, 0.6);
}
.marker-cluster-large div {
    background-color: rgba(15, 23, 42, 0.95);
    color: white;
    font-weight: 600;
    font-size: 15px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 10001;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border: 3px solid white;
    padding: 12px 18px;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.4);
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    min-width: 60px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.mobile-menu-btn .menu-icon {
    font-size: 26px;
    line-height: 1;
}

.mobile-menu-btn .menu-text {
    font-size: 13px;
    font-weight: 700;
}

/* Tablet Optimization */
@media (max-width: 1024px) {
    .sidebar {
        width: 320px;
    }
    .sidebar-header h1 {
        font-size: 20px;
    }
    .sidebar-header p {
        font-size: 13px;
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        overflow: auto;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        width: 100%;
        height: auto;
        max-height: 85vh;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        transform: translateY(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
        border-right: none;
        border-top: 4px solid #334155;
        z-index: 10000;
    }
    
    .sidebar.open {
        transform: translateY(0);
    }
    
    .sidebar-header {
        padding: 20px;
        cursor: pointer;
        position: relative;
        min-height: 56px;
        display: flex;
        align-items: center;
    }
    
    .sidebar-header::before {
        content: '☰';
        position: absolute;
        left: 20px;
        font-size: 28px;
        font-weight: 700;
        opacity: 0.9;
    }
    
    .sidebar-header::after {
        content: 'Tap to open filters';
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 13px;
        opacity: 0.8;
        font-weight: 600;
        transition: opacity 0.3s ease;
    }
    
    .sidebar.open .sidebar-header::after {
        content: 'Tap to close';
    }
    
    .sidebar-header h1 {
        font-size: 20px;
        margin-left: 40px;
    }
    
    .sidebar-header p {
        display: none;
    }
    
    .sidebar-content {
        padding: 20px;
        max-height: calc(85vh - 100px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    #map {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        z-index: 1;
    }
    
    .detail-sidebar {
        width: 100%;
        max-height: 100vh;
        transform: translateY(100%);
        bottom: 0;
        top: auto;
        left: 0;
        z-index: 10001;
        box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
    }
    
    .detail-sidebar.open {
        transform: translateY(0);
    }
    
    .detail-header {
        padding: 18px 20px;
        min-height: 60px;
    }
    
    .back-button {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
    
    .detail-title {
        font-size: 17px;
    }
    
    .detail-content {
        padding: 18px;
        max-height: calc(100vh - 80px);
    }
    
    .detail-button {
        min-height: 48px;
        font-size: 15px;
    }
    
    .btn {
        min-height: 48px;
        font-size: 15px;
        padding: 14px 20px;
    }
    
    .checkbox-list label {
        min-height: 44px;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    
    input[type="range"]::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
    
    .filter-section {
        margin-bottom: 20px;
    }
    
    .filter-section h3 {
        font-size: 14px;
    }
    
    .checkbox-list {
        max-height: 200px;
    }
    
    .action-buttons {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 15px 0 0;
        margin-top: 20px;
        border-top: 2px solid #e2e8f0;
    }
    
    .search-box {
        font-size: 16px;
        padding: 14px 42px;
        min-height: 48px;
    }
    
    .search-icon {
        left: 16px;
        font-size: 18px;
    }
    
    .search-clear {
        right: 14px;
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
    
    .search-results {
        max-height: 40vh;
        font-size: 15px;
    }
    
    .search-result-item {
        padding: 14px 16px;
        min-height: 56px;
    }
    
    .search-result-name {
        font-size: 15px;
    }
    
    .search-result-meta {
        font-size: 13px;
    }
    
    .stats-mini {
        padding: 10px;
        margin-top: 10px;
    }
    
    .stats-mini-value {
        font-size: 18px;
    }
    
    .stats-mini-label {
        font-size: 11px;
    }
    
    .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 40px) !important;
    }
    
    .custom-popup {
        font-size: 13px !important;
    }
}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .sidebar {
        max-height: 90vh;
    }
    
    .mobile-menu-btn {
        top: 12px;
        left: 12px;
        padding: 10px 14px;
        min-width: 54px;
        min-height: 48px;
    }
    
    .mobile-menu-btn .menu-icon {
        font-size: 24px;
    }
    
    .mobile-menu-btn .menu-text {
        font-size: 12px;
    }
    
    .sidebar-header {
        padding: 16px 18px;
        min-height: 52px;
    }
    
    .sidebar-header h1 {
        font-size: 18px;
        margin-left: 36px;
    }
    
    .sidebar-content {
        padding: 16px;
        max-height: calc(90vh - 90px);
    }
    
    .filter-section h3 {
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 14px;
        min-height: 48px;
    }
    
    .search-box {
        font-size: 16px;
    }
    
    .marker-cluster {
        width: 48px !important;
        height: 48px !important;
        margin-left: -24px !important;
        margin-top: -24px !important;
    }
    
    .marker-cluster div {
        width: 44px !important;
        height: 44px !important;
        margin-left: 2px !important;
        margin-top: 2px !important;
        font-size: 16px !important;
    }
    
    .marker-cluster-small {
        background-color: rgba(181, 226, 140, 0.7) !important;
    }
    
    .marker-cluster-small div {
        background-color: rgba(110, 204, 57, 0.7) !important;
    }
    
    .marker-cluster-medium {
        background-color: rgba(241, 211, 87, 0.7) !important;
    }
    
    .marker-cluster-medium div {
        background-color: rgba(240, 194, 12, 0.7) !important;
    }
    
    .marker-cluster-large {
        background-color: rgba(253, 156, 115, 0.7) !important;
    }
    
    .marker-cluster-large div {
        background-color: rgba(241, 128, 23, 0.7) !important;
    }
}

