* {
    margin: 0;
    padding: 0;
}

.ContenedorCentral {
    flex: 1;
    width: auto;
    max-width: none;
    position: relative;
}

#map {
    margin-top: 0;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100%;
    z-index: 0;
    position: absolute;
    cursor: default;
}

#boton {
    padding: 14px;
    background: #00541C;
    color: white;
    border: none;
    width: 200px;
    border-radius: 10px;
    font-size: 16px;
    margin: 15px;
    padding: 15px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#boton:hover {
    color: white;
    box-shadow: inset 0 -100px 0 0 #00541C;
    background-color: #00330F;
    transform: translateY(-1px);
}

#boton:active {
    transform: translateY(0px);
}

#oculto {
    display: none;
    /* Oculto por defecto */
    position: fixed;
    /* Fijo en pantalla */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 3;
    justify-content: center;
    align-items: center;
}

#oculto.mostrar-modal {
    display: flex !important;
}

#form_actividad {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    position: relative;

}

h2 {
    text-align: center;
    color: #00541C;
    font-size: 28px;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
}

#boton_crearActividad {
    width: 100%;
    padding: 14px;
    background: #00541C;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    margin-right: 10%;
}

#boton_crearActividad:hover {
    transform: translateY(-3px);

}

.grupo-formulario {

    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 30px;
    font-size: 15px;
    transition: color 0.3s ease;
}

.grupo-formulario input,
.grupo-formulario textarea,
.grupo-formulario select {
    width: 100%;
    padding: 10px;
    background-color: #F8F9FA;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Estilos del buscador */
.search-container {
    display: flex;
    align-items: center;
    margin: 1%;
    z-index: 1;
    position: absolute;
    top: 5%;
    left: 0;
    width: 100%;
    gap: 15px;
}

.filter-container {
    order: 1;
    margin: 0;
}

#search-form {
    order: 2;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Separación entre la barra de escribir y la lupa/botón buscar */
}

#boton {
    order: 3;
    margin-left: 45%;
}

.tipo-select {
    padding: 8px 10px;
    border: 2px solid #00541C;
    border-radius: 4px;
    background-color: white;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.tipo-select:hover {
    background-color: #f0f0f0;
    border-color: #00330F;
}

.tipo-select:focus {
    outline: none;
    border-color: #00330F;
    box-shadow: 0 0 0 2px rgba(0, 84, 28, 0.1);
}

.search-input {
    padding: 8px 10px;
    border: 2px solid #00541C;
    border-radius: 4px;
    width: 300px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-button {
    padding: 8px 15px;
    border-radius: 4px;
    background-color: #00541C;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: bold;
}

.search-button:hover {
    background-color: #00330F;
    transform: translateY(-1px);
}

.search-button:active {
    transform: translateY(0px);
}

.ContenedorIzquierdaMapa {
    width: 18%;
    min-width: 220px;
    position: sticky;
    top: 0;
    overflow-y: auto;
    height: 100vh;
    justify-content: center;
    margin-left: 0px;
    border-right: 1px solid rgba(0, 0, 0, 0.268);
    background-color: #35CB83;
}

/* Cada item del menú del mapa: una sola línea (icono + texto al lado) */
.ContenedorIzquierdaMapa .BotonBarra {
    white-space: nowrap;
    display: inline-block;
}

/* Dentro del menú del mapa los .Icono no deben ocupar 60% de ancho
   (regla heredada de Base.css que descoloca en el contexto del mapa) */
.ContenedorIzquierdaMapa .Icono {
    width: auto;
    display: inline;
    vertical-align: middle;
}

/* Espaciado consistente entre icono y texto */
.ContenedorIzquierdaMapa .Icono + .Icono {
    margin-left: 8px;
}

.ContenedorIzquierdaMapa ul li:last-child {
    position: absolute;
    bottom: 0;
}

.ContenedorIzquierdaMapa ul li#Iniciar {
    position: absolute;
    bottom: 65px;
}

.ContenedorIzquierdaMapa ul {
    padding-left: 10%;
}

/* ============== Móvil ============== */
@media (max-width: 600px) {
    .ContenedorIzquierdaMapa {
        display: none;
    }

    /* El mapa deja hueco arriba para los controles y abajo para el footer móvil */
    #map {
        height: calc(100vh - 50px); /* 50px del Footer */
    }

    /* Controles apilados verticalmente, ocupando el ancho disponible */
    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        top: 10px;
        left: 0;
        right: 0;
        width: auto;
        margin: 0 10px;
        padding: 0;
    }

    #search-form {
        order: 1;
        width: 100%;
        gap: 6px;
    }

    .search-input {
        flex: 1;
        width: auto;
        min-width: 0;
    }

    .search-button {
        white-space: nowrap;
    }

    .filter-container {
        order: 2;
        width: 100%;
        margin: 0;
    }

    .tipo-select {
        width: 100%;
        box-sizing: border-box;
    }

    /* Botón "Añadir actividad": ancho completo, sin el margin-left de escritorio */
    #boton {
        order: 3;
        width: 100%;
        margin: 0;
        padding: 12px;
        box-sizing: border-box;
        font-size: 15px;
    }

    /* El modal del formulario ocupa casi toda la pantalla en móvil */
    #form_actividad {
        width: 92%;
        max-width: none;
        padding: 20px;
        max-height: 85vh;
        overflow-y: auto;
    }

    h2 {
        font-size: 22px;
    }

    #boton_crearActividad {
        margin-right: 0;
    }
}

/* Tablet pequeña: solo apilar controles, dejar sidebar fuera por estética */
@media (min-width: 601px) and (max-width: 900px) {
    .search-input {
        width: 200px;
    }
    #boton {
        margin-left: 10px;
    }
}