:root {
    --color-primary: #529ab1;
    --color-primary-hover: #458699;
    --color-primary-light: rgba(82, 154, 177, 0.1);
    --color-primary-opacity: rgba(82, 154, 177, 0.4);
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #e0e0e0;
    --color-background: #f8f9fa;
}

.bloque-title {
    background: rgb(61 123 144);
    background: linear-gradient(180deg, rgb(36 90 109) 0%, rgba(82, 154, 177, 1) 100%);
}

.content-busco-empleo {
    background: #e8ecef;
    padding-top: 50px;
    padding-bottom: 120px;
}

/* Estilos del buscador */
.buscador-container {
    width: 100%;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    margin-top: 20px;
    position: relative;
    min-height: 100vh;
    padding-bottom: 100px;
}

/* Botón toggle filtros */
.toggle-filtros {
    display: none;
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    color: var(--color-primary);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.toggle-filtros:hover {
    background: #f8f9fa;
    border-color: var(--color-primary);
}

.toggle-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
}

.toggle-filtros.active .toggle-icon {
    transform: rotate(180deg);
}

/* Panel de filtros */
.filtros-panel {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 85px;
    max-height: calc(100vh - 105px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) #f8f9fa;
}

/* Estilos para el scrollbar en el panel de filtros */
.filtros-panel::-webkit-scrollbar {
    width: 6px;
}

.filtros-panel::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.filtros-panel::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 10px;
    border: 2px solid #f8f9fa;
}

/* Sección de búsqueda */
.busqueda-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 12px center;
    transition: all 0.2s ease;
    box-sizing: border-box;
    margin-bottom: 24px;
}

.busqueda-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(82, 154, 177, 0.1);
}

/* Grupos de filtros */
.grupo-filtros {
    margin-bottom: 24px;
    background: #f8f9fa;
    border-radius: 8px;
    position: relative;
}

.grupo-filtros h3 {
    margin: 0;
    color: #1f1f1f;
    font-size: 16px;
    font-weight: 500;
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

/* Contenedor para los checkboxes */
.filtros-contenido {
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #1a73e8 #f8f9fa;
}

/* Labels y checkboxes */
label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
    margin-bottom: 1px;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
    height: 32px;
}

label:hover {
    background-color: #eef3fe;
}

.label-text {
    flex: 1;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    display: inline-block;
}

.count-badge {
    display: inline-block;
    color: #666;
    font-size: 13px;
    background: #e8eaed;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* Estilo personalizado para checkboxes */
input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 19px;
    height: 19px;
    min-width: 19px;
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    margin: 0;
    cursor: pointer;
    position: relative;
    background-color: white;
    transition: all 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

input[type="checkbox"]:checked::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.2);
}

input[type="checkbox"]:hover {
    border-color: var(--color-primary-hover);
    background-color: var(--color-primary-light);
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(82, 154, 177, 0.2);
}

input[type="checkbox"]:checked:hover {
    background-color: var(--color-primary-hover);
}

/* Panel de resultados */
.resultados-panel {
    min-height: 400px;
    position: relative;
}

#total-resultados {
    margin-bottom: 20px;
    font-size: 15px;
    color: #666;
    padding: 12px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Tarjetas de ofertas */
.oferta {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: grid;
    grid-template-rows: auto auto auto auto;
    gap: 0;
}

.oferta-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 80px;
    height: auto;
}

.oferta-content {
    padding-right: 0;
}

.oferta h2 {
    margin: 0 0 15px 0;
    color: var(--color-text);
    grid-row: 1;
    padding-right: 100px;
    font-size: 20px;
    line-height: 30px;
}

.oferta-info-container {
    display: grid;
    grid-template-rows: auto auto;
    gap: 10px;
    margin: 0;
}

.oferta-info-group-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 32px;
}

.oferta-info-group-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-height: 32px;
}

.oferta-sector {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
}

.sector-tag {
    display: inline-block;
    background: var(--color-primary-opacity);
    color: var(--color-text);
    padding: 4px 12px;
    border-radius: 25px;
    font-weight: 500;
}

.oferta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-light);
    font-size: 14px;
    min-height: 24px;
}

.oferta-info.inline {
    display: inline-flex;
}

.oferta-info.inline + .oferta-info.inline {
    margin-left: 8px;
}

.oferta-info.inline + .oferta-info.inline::before {
    content: "|";
    margin-right: 8px;
    color: var(--color-border);
}

.oferta-info .icon {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
}

.oferta-info.inline .icon-location {
    display: block;
}

.oferta-salario {
    color: var(--color-primary);
    font-weight: 500;
}

.oferta-footer {
    display: flex;
    align-items: center;
    margin: 6px 0 0 0;
    min-height: 32px;
    position: relative;
    padding-right: 90px;
}

.boton {
    position: absolute;
    right: 0;
    display: inline-flex;
    align-items: center;
    background: var(--color-primary);
    color: white;
    padding: 6px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.2s ease;
}

.boton:hover {
    background: var(--color-primary-hover);
    color: white;
    transform: translateY(-1px);
}

/* Scrollbar personalizado */
.filtros-contenido::-webkit-scrollbar {
    width: 6px;
}

.filtros-contenido::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.filtros-contenido::-webkit-scrollbar-thumb {
    background-color: #1a73e8;
    border-radius: 10px;
    border: 2px solid #f8f9fa;
}

/* Responsive */
@media (max-width: 991px) {
    .content-busco-empleo .container {
        flex-direction: column!important;
    }
    .buscador-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .toggle-filtros {
        display: flex;
        margin: 0;
        width: 100%;
    }

    .filtros-panel {
        display: none;
        position: static;
        margin: 0 0 15px 0;
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .resultados-panel {
        margin: 0;
        width: 100%;
    }

    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 15px;
    }

    .filtros-panel.visible {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .grupo-filtros {
        margin-bottom: 16px;
    }

    .grupo-filtros h3 {
        padding: 12px;
        font-size: 15px;
    }

    .filtros-contenido {
        padding: 12px;
    }
}

@media (max-width: 768px) {

    .buscador-container {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-top: 10px;
        padding: 0;
    }

    .toggle-filtros {
        display: flex;
        margin: 0;
        width: 100%;
    }

    .filtros-panel {
        display: none;
        position: static;
        margin: 0 0 15px 0;
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .resultados-panel {
        margin: 0;
        width: 100%;
    }

    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 15px;
    }

    .filtros-panel.visible {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .grupo-filtros {
        margin-bottom: 16px;
    }

    .grupo-filtros h3 {
        padding: 12px;
        font-size: 15px;
    }

    .filtros-contenido {
        padding: 12px;
    }

    .oferta {
        padding: 12px;
        gap: 0;
        margin-bottom: 20px;
    }

    .oferta-logo {
        width: 60px;
        top: 12px;
        right: 12px;
    }

    .oferta h2 {
        margin-bottom: 12px;
    }

    .sector-tag {
        padding: 3px 10px;
    }

    .boton {
        right: 0;
        padding: 5px 14px;
    }

    .oferta-footer {
        padding-right: 70px;
    }

    .oferta-info-group-primary {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        min-height: 32px;
    }

    .oferta-info-group-secondary {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        min-height: auto;
    }

    .oferta-info.inline {
        display: flex;
        margin-left: 0;
        width: 100%;
    }

    .oferta-info.inline + .oferta-info.inline {
        margin-left: 0;
    }

    .oferta-info.inline + .oferta-info.inline::before {
        content: none;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Ajustes para pantallas muy pequeñas */
@media (max-width: 360px) {

    .filtros-panel {
        padding: 12px;
    }

    .oferta {
        padding: 10px;
        gap: 0;
        margin-bottom: 15px;
    }

    label {
        padding: 4px 6px;
    }

    .oferta-logo {
        width: 50px;
        top: 10px;
        right: 10px;
    }

    .oferta h2 {
        margin-bottom: 10px;
    }

    .sector-tag {
        padding: 2px 8px;
    }

    .boton {
        right: 0;
        padding: 4px 12px;
    }

    .oferta-footer {
        padding-right: 60px;
    }
}

/* Estado de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Estilos para cuando no hay resultados */
.no-resultados {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Estilos para el filtro de localidades */
#filtro-localidad {
    display: none;
}

#filtro-localidad.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}


/* Loader */
.loader-container {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.loader-container.visible {
    display: flex;
}

.loader {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-primary-light);
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loader-text {
    color: var(--color-primary);
    font-size: 14px;
    margin: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estado de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Estilos para cuando no hay resultados */
.no-resultados {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Botón de ver todas las ofertas */
.boton-cargar-mas {
    display: none;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background-color: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.boton-cargar-mas:hover {
    background-color: var(--color-primary-light);
    transform: translateY(-1px);
}

.boton-cargar-mas.visible {
    display: block;
}

.oferta-info:has(.icon[viewBox="0 0 24 24"][d*="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM9 10H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm-8 4H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2z"]) {
    margin-top: 10px;
}