@media screen and (max-width: 768px) {

    .container {
        display: flex !important;
        flex-direction: column !important;
        height: 100vh !important;
    }

    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
        background: #ffffff;
        border-bottom: 1px solid #e5e5e5;
        z-index: 1001;
    }

    .mobile-menu-btn {
        font-size: 24px;
        cursor: pointer;
        background: none;
        border: none;
    }

    .mobile-search-input {
        flex: 1;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid #ccc;
        font-size: 14px;
    }

    .mobile-filters-panel {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        height: 100vh;
        background: #fff;
        z-index: 2000;
        padding: 20px;
        overflow-y: auto;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    }

    .mobile-filters-panel.active {
        left: 0;
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1500;
        display: none;
    }

    .mobile-overlay.active {
        display: block;
    }

    .mobile-filters-panel .control-group {
        width: 100%;
        margin-bottom: 10px;
    }

    .mobile-filters-panel select,
    .mobile-filters-panel input {
        width: 100%;
    }

    .mobile-filters-panel .btn-reset {
        width: 100%;
    }

    .map-section {
        flex: 1 !important;
        width: 100% !important;
    }

    #map {
        height: 100% !important;
    }

    .controls {
        display: none !important;
    }

}

.mobile-header{
    position:fixed;
    top:50px;
    left:0;
    width:100%;
    height:55px;
    background:#fff;
    display:flex;
    align-items:center;
    padding:0 10px;
    z-index:9999;
    box-shadow:0 2px 6px rgba(0,0,0,0.1);
    border-bottom:1px solid #e5e5e5;
}

.hamburger{
    font-size:22px;
    background:none;
    border:none;
    margin-right:10px;
    cursor:pointer;
}

.mobile-search-input{
    flex:1;
    height:35px;
    border-radius:6px;
    border:1px solid #ccc;
    padding:0 10px;
}

.mobile-panel{
    position:fixed;
    top:50px;
    left:-100%;
    width:80%;
    max-width:350px;
    height:calc(100vh - 50px);
    background:#fff;
    z-index:10000;
    overflow-y:auto;
    transition:0.3s;
    padding:20px;
    box-shadow:2px 0 10px rgba(0,0,0,0.15);
}

.mobile-panel.active{
    left:0;
}

.mobile-overlay{
    position:fixed;
    top:50px;
    left:0;
    width:100%;
    height:calc(100vh - 50px);
    background:rgba(0,0,0,0.5);
    display:none;
    z-index:9998;
}

.mobile-overlay.active{
    display:block;
}

.container{
    margin-top:130px;
}

.controls.mobile-panel{
    display:block !important;
}

.mobile-panel #departamento-control-group,
.mobile-panel #distrito-control-group{
    display:none !important;
}

/* ===== MEJORAS VISUALES PARA EL BUSCADOR ===== */

#departamento-options .option-item,
.search-results .result-item {
    padding: 10px 10px !important;
    margin-bottom: 0px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-family: Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
}

#departamento-options .option-item:last-child,
.search-results .result-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
}

#departamento-options .option-item small,
.search-results .result-item small {
    font-family: Arial, sans-serif !important;
    font-size: 12px !important;
    color: #666 !important;
    margin-left: 5px !important;
}

#departamento-options .option-item:hover,
.search-results .result-item:hover {
    background-color: #f5f5f5 !important;
    cursor: pointer !important;
}

#departamento-options,
.search-results {
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    padding: 8px !important;
    background: white !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* ===== BOTONES MÓVIL ===== */
/* ===== ESTILO BOTÓN LIMPIAR ===== */
.btn-reset {
    background: #ff0000da !important;
    color: #ffffff !important;
    border: 1px solid #e6dede !important;
    padding: 12px 18px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    
    /* ESTO CENTRA EL TEXTO PERFECTAMENTE */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;  
    line-height: 1 !important;
}

.btn-reset:hover {
    background: #f40a0a !important;
    border-color: #000000 !important;
}

/* ===== ESTILO BOTÓN BUSCAR ===== */
.btn-buscar {
    background: #07b910 !important;        /* Color de fondo */
    color: white !important;                 /* Color del texto */
    border: none !important;
    padding: 12px 18px !important;          /* Alto y ancho */
    font-size: 15px !important;             /* Tamaño de letra */
    border-radius: 8px !important;          /* Bordes redondeados */
    font-weight: 600 !important;            /* Grosor de letra */
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.btn-buscar:hover {
    background: #0056b3 !important;
}

.mobile-buttons {
    display: none;
}

@media screen and (max-width: 768px) {
    .mobile-buttons {
        display: flex !important;
        gap: 10px;
        margin-top: 20px;
    }
    
    .btn-reset,
    .btn-buscar {
        flex: 1 !important;
        padding: 14px !important;
        font-size: 16px !important;
    }
    
    .controls > .btn-reset {
        display: none !important;
    }
}



/* ===== ESTILOS PARA RESULTADOS DE BÚSQUEDA ===== */
.search-results {
    position: absolute;
    top: 100%;
    left: 50px;
    right: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
}

.search-results.active {
    display: block;
}

.result-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.result-item:hover {
    background-color: #f5f5f5;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item small {
    color: #666;
    font-size: 12px;
    margin-left: 5px;
}

.result-item.no-result {
    color: #999;
    text-align: center;
    cursor: default;
}

.result-item.no-result:hover {
    background: none;
}

/* ===== QUITAR MARGEN SUPERIOR EN PC ===== */
@media screen and (min-width: 769px) {
    .container {
        margin-top: 50px !important;
    }
}
/* ===== SUBIR MAPA EN MÓVIL ===== */
@media screen and (max-width: 768px) {
    .container {
        margin-top: 100px !important;  /* Valor original: 130px */
    }
}
/* ===== ESPACIADO ENTRE FILTROS DEL MENÚ LATERAL ===== */
.mobile-panel .control-group {
    width: 100%;
    margin-bottom: 10px !important;
}
