/* ─────────────────────────────────────────
   DIRECTORIO DE EMPLEOS — Estilos v3.1
   ───────────────────────────────────────── */

#directorio-empleos {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    color: #1a1a1a;
}


/* ── FILTROS ── */

.de-filtros {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.de-busqueda {
    display: flex;
    gap: 8px;
}

.de-busqueda input[type="text"] {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
    color: #1a1a1a;
}

.de-busqueda input[type="text"]:focus {
    border-color: #378ADD;
}

.de-busqueda button {
    padding: 9px 14px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
    color: #555;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.de-busqueda button:hover {
    background: #f0f0f0;
}

.de-selectores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.de-selectores select {
    width: 100%;
    padding: 9px 30px 9px 14px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 14px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    appearance: none;
    cursor: pointer;
    color: #1a1a1a;
    transition: border-color 0.2s;
}

.de-selectores select:focus {
    outline: none;
    border-color: #378ADD;
}


/* ── BARRA DE RESULTADOS (contador + toggle) ── */

.de-barra-resultados {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}


/* ── CONTADOR ── */

.de-contador {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.de-contador span {
    font-weight: 600;
    color: #1a1a1a;
}


/* ── BOTONES TOGGLE LISTA / COLUMNAS ──
   Se usa !important en cada propiedad para que los estilos
   del tema de WordPress no sobreescriban estos valores.
   ────────────────────────────────────────────────────── */

.de-vista-toggle {
    display: flex !important;
    gap: 4px !important;
    align-items: center !important;
}

.de-vista-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    min-width: unset !important;
    min-height: unset !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    background: #f9f9f9 !important;
    color: #999 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: 1 !important;
    font-size: 0 !important;
    outline: none !important;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.de-vista-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

.de-vista-btn:hover {
    background: #efefef !important;
    border-color: #bbb !important;
    color: #555 !important;
    box-shadow: none !important;
}

.de-vista-btn.active {
    background: #fff !important;
    border-color: #aaa !important;
    color: #333 !important;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1) !important;
}

.de-vista-btn:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(55,138,221,0.25) !important;
}


/* ── TARJETAS ── */

#de-resultados {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.de-tarjeta {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

.de-tarjeta:hover {
    border-color: #b5d4f4;
    box-shadow: 0 2px 8px rgba(55, 138, 221, 0.08);
}

.de-tarjeta__logo {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #666;
    letter-spacing: 0.5px;
}

.de-tarjeta__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.de-tarjeta__cabecera {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.de-tarjeta__titulo {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    line-height: 1.3;
}

.de-tarjeta__titulo:hover {
    color: #185FA5;
    text-decoration: underline;
}

.de-tarjeta__empresa {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.de-tarjeta__meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}


/* ── BADGES DE TIPO ── */

.de-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.de-badge--remoto,
.de-badge--remote {
    background: #E1F5EE;
    color: #085041;
}

.de-badge--full-time,
.de-badge--fulltime {
    background: #E6F1FB;
    color: #0C447C;
}

.de-badge--part-time,
.de-badge--parttime {
    background: #FAEEDA;
    color: #633806;
}

.de-badge--freelance {
    background: #EEEDFE;
    color: #3C3489;
}


/* ── SPINNER ── */

#de-spinner {
    text-align: center;
    padding: 2rem;
    font-size: 14px;
    color: #888;
}

.de-spinner-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #378ADD;
    border-radius: 50%;
    animation: de-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes de-spin {
    to { transform: rotate(360deg); }
}


/* ── SIN RESULTADOS ── */

.de-sin-resultados {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #888;
    font-size: 14px;
    border: 1px dashed #e0e0e0;
    border-radius: 10px;
}


/* ── VISTA COLUMNAS ── */

#de-resultados.de-columnas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

#de-resultados.de-columnas .de-tarjeta {
    flex-direction: column;
    gap: 10px;
}

#de-resultados.de-columnas .de-tarjeta__cabecera {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

#de-resultados.de-columnas .de-tarjeta__logo {
    width: 100%;
    height: 48px;
    border-radius: 6px;
    font-size: 13px;
}


/* ── SHORTCODE EMPLEOS RECIENTES (3 columnas fijas) ── */

.de-recientes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.de-recientes .de-tarjeta {
    flex-direction: column;
    gap: 10px;
}

.de-recientes .de-tarjeta__cabecera {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}


/* ── BOTÓN VER MÁS ── */

#de-ver-mas-wrap {
    text-align: center;
    margin-top: 1.5rem;
}

.de-btn-ver-mas {
    display: inline-block;
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 500;
    color: #378ADD;
    background: #fff;
    border: 1.5px solid #378ADD;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.de-btn-ver-mas:hover {
    background: #378ADD;
    color: #fff;
}

.de-btn-ver-mas:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* ── RESPONSIVE ── */

@media (max-width: 700px) {
    #de-resultados.de-columnas {
        grid-template-columns: 1fr;
    }
    .de-recientes {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .de-busqueda {
        flex-direction: column;
    }
    .de-tarjeta {
        flex-direction: column;
        gap: 10px;
    }
    .de-tarjeta__cabecera {
        flex-direction: column;
    }
    #de-resultados.de-columnas {
        grid-template-columns: 1fr;
    }
    .de-recientes {
        grid-template-columns: 1fr;
    }
}
