/**Menu**/

.menu{
    height: 80px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /*position: fixed;*/
    z-index: 1;
    background-color: var(--azul_oficial);
}

.menu_items {
    display: flex;
    list-style: none;   
    margin-right: 30px;
}

.logo{
    width: 70px;
    margin: 0 10px 0 0;
}

.menu_items li a{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    height: 80px;
    text-decoration: none;
    font-size: 18px;
    color: var(--blanco);
    transition: all 0.5s;
    min-width: 150px;
    font-weight: 500;
}

.menu_items li:hover, li.active{
    transition: .4;
}

.menu li a:hover{
    background-color: var(--azul_oscuro);
}

.btn_menu {
    margin-right: 30px;
    font-size: 25px;
    color: var(--gris__claro);
    display: none;
}

.btn_menu_pointer{
    cursor: pointer;
}


.mid_logo{
    color: white;
    font-size: 20px;
    font-weight: 700;
}





.submenu {
    display: none;
    position: absolute;
    top: 50px;
    background-color: var(--gris__oscuro);
    padding: 10px;
    }

.menu_items li.open > .submenu {
    display: block;
    }

@media screen and (max-width: 850px){
    .menu {
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        z-index: 2;
    }
    .logo{
        position: relative;
        right: 25px;
        z-index: 4;
    }
    .btn_menu{
        display: inline-flex;
        position: relative;
        left: 15px;
        z-index: 4;
        
    }
    .menu_items{
        position: fixed;
        z-index: 3;
        width: 80%;
        height: 100vh;
        left: -100vh;
        text-align: left;
        transition: all .3s;
        flex-direction: column;
        justify-content: center;
        margin: 0%;
        background-color: var(--azul_oscuro);
    }
    .menu_items li{
        margin: 20px 0 0 0;
    }
    .menu_items li:hover{
        background: none;
    }
    .menu_items li a{
        font-size: 16px;
        color: var(--blanco);
        position: relative;
    }
    .menu_items li a:hover{
        color: var(--gris__claro);
    }
    .logo {
        padding-left: 35px;
    }
    .logo_show{
        display: block;
        z-index: 3;
    }
    ul.show{
        left: 0px;
        opacity: 1;
        pointer-events: unset;
    }
    ul{
        top: 0px;
    }
    
    .submenu {
        position: absolute;
        background-color: var(--gris__oscuro);
        left: 0;
        bottom: 0;
        top: 50px;
        right: 0px;
        padding: 20px;
    }
    

}








@media screen and (max-width: 850px) and (orientation: landscape){
    .menu_items li{
        margin: 5px 0 0 0;
        top: 100px;
    }
    .menu_items{
        overflow: scroll;
    }
}






/* ===== BUSCADOR COMPACTO MEJORADO ===== */
.buscador-compacto {
    margin: 0 15px;
    position: relative;
    z-index: 100;
}

.btn-buscador-toggle {
    background: transparent;
    border: none;
    color: var(--blanco);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    background: rgba(255, 255, 255, 0.1);
}

.btn-buscador-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn-buscador-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.buscador-compacto.active .btn-buscador-toggle {
    background: var(--azul_oficial);
    transform: scale(1.05);
}

.buscador-compacto.active .btn-buscador-toggle svg {
    transform: rotate(90deg);
}

/* ===== BUSCADOR EXPANDIBLE MEJORADO ===== */
.buscador-expandible {
    position: absolute;
    top: 100%;
    right: 0;
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    margin-top: 10px;
    transform: translateY(-10px);
}

.buscador-compacto.active .buscador-expandible {
    width: 350px; /* Más ancho */
    opacity: 1;
    transform: translateY(0);
}

.form-buscador {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    background: var(--blanco);
    border-radius: 50px; /* Bordes redondeados como botón */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid var(--azul_oficial);
    overflow: hidden;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-buscador {
    flex: 1;
    padding: 12px 20px;
    border: none;
    font-size: 15px;
    background: transparent;
    color: var(--negro);
    outline: none;
    min-height: 44px;
}

.input-buscador::placeholder {
    color: #666;
    opacity: 0.7;
    font-weight: 400;
}

.input-buscador:focus {
    box-shadow: none;
}

.btn-buscador-submit {
    background: var(--azul_oficial);
    border: none;
    color: var(--blanco);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-right: 2px;
    border-radius: 0 50px 50px 0;
}

.btn-buscador-submit:hover {
    background: var(--azul_oscuro);
}

.btn-buscador-submit svg {
    width: 18px;
    height: 18px;
}

/* Efecto de búsqueda activa */
.form-buscador:focus-within {
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.2);
    border-color: var(--azul_oscuro);
}

/* ===== EFECTO DE BÚSQUEDA CON RESULTADOS (OPCIONAL) ===== */
.resultados-busqueda {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--blanco);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.resultados-busqueda.visible {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resultado-item {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
}

.resultado-item:hover {
    background: rgba(26, 115, 232, 0.05);
}

.resultado-item:last-child {
    border-bottom: none;
}

.resultado-titulo {
    font-weight: 600;
    color: var(--azul_oscuro);
    margin-bottom: 4px;
    font-size: 14px;
}

.resultado-fecha {
    font-size: 12px;
    color: #666;
}

.resultado-vacio {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* ===== RESPONSIVE MEJORADO ===== */
@media (max-width: 950px) {
    .buscador-compacto {
        margin: 0 10px;
        order: 3; /* Para posicionarlo bien en móvil */
    }
    
    .buscador-compacto.active .buscador-expandible {
        width: 300px;
        right: -50px;
    }
    
    .form-buscador {
        border-radius: 40px;
    }
    
    .input-buscador {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 40px;
    }
    
    .btn-buscador-submit {
        width: 40px;
        height: 40px;
    }
    
    .btn-buscador-submit svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    .buscador-compacto.active .buscador-expandible {
        width: 280px;
        right: -40px;
    }
    
    .btn-buscador-toggle {
        width: 36px;
        height: 36px;
    }
    
    .btn-buscador-toggle svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .buscador-compacto.active .buscador-expandible {
        width: calc(100vw - 40px);
        right: calc(-50vw + 40px);
        left: auto;
    }
    
    .form-buscador {
        border-radius: 35px;
    }
    
    .input-buscador {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .btn-buscador-toggle {
        width: 34px;
        height: 34px;
        background: rgba(255, 255, 255, 0.15);
    }
}

/* ===== VERSIÓN MINIMALISTA (ALTERNATIVA) ===== */
.buscador-minimalista .form-buscador {
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(26, 115, 232, 0.3);
}

.buscador-minimalista .input-buscador {
    font-size: 14px;
    padding: 10px 16px;
}

.buscador-minimalista .btn-buscador-submit {
    background: linear-gradient(135deg, var(--azul_oficial), #0d47a1);
    border-radius: 0 30px 30px 0;
    margin-right: 0;
}

/* ===== VERSIÓN ELEGANTE (ALTERNATIVA) ===== */
.buscador-elegante .form-buscador {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.buscador-elegante .input-buscador {
    background: transparent;
}

.buscador-elegante .btn-buscador-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.buscador-elegante .btn-buscador-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.buscador-elegante .btn-buscador-submit:hover::before {
    left: 100%;
}
