.cf24-buscador{
    width: 100%;
    padding: 40px 20px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    
    &::before{
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1;
    }

    /* Capas para crossfade de portadas */
    .bg-layer{
        position: absolute;
        inset: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0;
        transition: opacity 0.5s ease;
        z-index: 0;
    }
    .bg-layer.visible{ opacity: 1; }

    .portada-caption{
        position: absolute;
        right: 0;
        bottom: 20px;
        max-width: min(400px, 70%);
        padding: 0;
        color: #fff;
        z-index: 3;
        opacity: 0;
        transition: opacity 0.3s ease;
        text-align: right;

        .titulo{
            margin: 0 0 8px 0;
            font-size: 1.8rem;
            font-weight: 700;
            line-height: 3.5rem;
            text-shadow: 2px 2px 8px rgba(0,0,0,0.7), 0 1px 0 #222;
        }
        .texto{
            margin: 0;
            font-size: 1rem;
            line-height: 1.4;
            text-shadow: 2px 2px 8px rgba(0,0,0,0.7), 0 1px 0 #222;
        }
    }
    .portada-caption.visible{ opacity: 1; }

    > div{
        position: relative;
        z-index: 2;
    }

    > div .buscador{
        width: 100%;
        max-width: 400px;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        padding: 30px;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        cursor: default;

        select, input[type="text"]{
            margin-top: 0;
            padding: 10px 12px;
            border: 1px solid #dee2e6;
            border-radius: 6px;
            font-size: 0.95rem;
            color: #2c3e50;
            background: #fff;
            transition: all 0.3s ease;
            cursor: pointer;

            &:focus{
                outline: none;
                border-color: #0dafcc;
                box-shadow: 0 0 0 3px rgba(13, 175, 204, 0.1);
            }

            &:hover{
                border-color: #0dafcc;
            }
        }
        select{
            option.optgroup-header{
                font-weight: 700;
                color: #274198;
                background: #f8f9fa;
                font-size: 0.85rem;
                text-transform: uppercase;
                letter-spacing: 0.5px;
            }
            
            option.optgroup-separator{
                color: #adb5bd;
                background: #f8f9fa;
                font-size: 0.75rem;
            }
        }
    }

    .slider{ /* Estilos unificados para todos los sliders */
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 0;
        
        > div:first-child{
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 0.9rem;
            font-weight: 600;
            
            span{
                color: #0dafcc;
            }
        }
        
        > div:last-child{
            position: relative;
            height: 40px;
            
            > div:first-child{
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                width: 100%;
                height: 6px;
                background: #e9ecef;
                border-radius: 3px;
            }
            
            > div:nth-child(2){
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                height: 6px;
                background: linear-gradient(90deg, #274198 0%, #0dafcc 100%);
                border-radius: 3px;
                pointer-events: none;
                z-index: 1;
            }
            
            input[type="range"]{
                position: absolute;
                width: 100%;
                height: 40px;
                top: 0;
                left: 0;
                -webkit-appearance: none;
                appearance: none;
                background: transparent;
                pointer-events: none;
                cursor: pointer;
                
                &::-webkit-slider-thumb{
                    -webkit-appearance: none;
                    appearance: none;
                    width: 20px;
                    height: 20px;
                    background: linear-gradient(135deg, #274198 0%, #0dafcc 100%);
                    border: 3px solid #ffffff;
                    border-radius: 50%;
                    cursor: pointer;
                    pointer-events: all;
                    box-shadow: 0 2px 8px rgba(39, 65, 152, 0.3);
                    transition: all 0.2s ease;
                    position: relative;
                    z-index: 3;
                    
                    &:hover{
                        transform: scale(1.2);
                        box-shadow: 0 3px 12px rgba(39, 65, 152, 0.5);
                    }
                    
                    &:active{
                        transform: scale(1.1);
                    }
                }
                
                &::-moz-range-thumb{
                    width: 20px;
                    height: 20px;
                    background: linear-gradient(135deg, #274198 0%, #0dafcc 100%);
                    border: 3px solid #ffffff;
                    border-radius: 50%;
                    cursor: pointer;
                    pointer-events: all;
                    box-shadow: 0 2px 8px rgba(39, 65, 152, 0.3);
                    transition: all 0.2s ease;
                    position: relative;
                    z-index: 3;
                    
                    &:hover{
                        transform: scale(1.2);
                        box-shadow: 0 3px 12px rgba(39, 65, 152, 0.5);
                    }
                    
                    &:active{
                        transform: scale(1.1);
                    }
                }
                
                &:last-of-type{
                    z-index: 2;
                }
            }
        }
    }
    button[type="submit"]{
        margin-top: 8px;
        padding: 14px 24px;
        background: linear-gradient(90deg, #274198 0%, #0dafcc 100%);
        color: #ffffff;
        border: none;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(39, 65, 152, 0.3);
        text-align: center;
        
        &:hover{
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(39, 65, 152, 0.4);
            background: linear-gradient(90deg, #1e3278 0%, #0a8fa8 100%);
        }
        
        &:active{
            transform: translateY(0);
            box-shadow: 0 2px 8px rgba(39, 65, 152, 0.3);
        }
        &.bus_avanzada{
            color: #444;
            background: linear-gradient(90deg, #adc6cb 0%, #fff 100%) !important;
            padding: 10px;
            font-size: 14px;
            text-transform: capitalize;
        }
    }
}

/* Responsive tablet */
@media (max-width: 1024px) {
    .cf24-buscador{
        min-height: 350px;
        padding: 30px 20px;

        > div:first-child{
            max-width: 350px;
            padding: 25px;

            label div{
                font-size: 0.9rem;
            }

            select, input[type="text"]{
                font-size: 0.9rem;
                padding: 9px 11px;
            }
        }
    }
}

/* Responsive móvil */
@media (max-width: 768px) {
    .cf24-buscador{
        min-height: 300px;
        padding: 20px;
        justify-content: center;

        > div:first-child{
            max-width: 100%;
            padding: 20px;
            gap: 12px;

            label{
                div{
                    font-size: 0.85rem;
                }

                select, input[type="text"]{
                    padding: 8px 10px;
                    font-size: 0.9rem;
                }
            }
        }
    }
}

/* Responsive móvil pequeño */
@media (max-width: 480px) {
    .cf24-buscador{
        min-height: 280px;
        padding: 15px;

        &::before{
            background: rgba(0,0,0,0.5);
        }

        > div:first-child{
            padding: 15px;
            gap: 10px;

            label{
                div{
                    font-size: 0.8rem;
                }

                select, input[type="text"]{
                    padding: 8px;
                    font-size: 0.85rem;
                }
            }
        }
    }
}